Skip to content
This repository has been archived by the owner on Jan 27, 2022. It is now read-only.

Commit

Permalink
Bump topolvm version 0.7.0 + lvmd as a container
Browse files Browse the repository at this point in the history
  • Loading branch information
kfirfer committed Jan 19, 2021
1 parent 0e5d3dd commit 2286c3a
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 43 deletions.
8 changes: 4 additions & 4 deletions charts/topolvm/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apiVersion: v1
appVersion: 0.6.0
apiVersion: v2
appVersion: 0.7.0
description: Topolvm
name: topolvm
version: 1.1.1
version: 1.2.0
home: https://github.com/topolvm/topolvm
sources:
- https://github.com/topolvm/helm/tree/master/charts/topolvm
- https://github.com/topolvm/topolvm
- https://github.com/topolvm/topolvm
11 changes: 2 additions & 9 deletions charts/topolvm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
----------------------------------------

## Pre Requisites
* Kubernetes 1.16+
* `lvmd` installed on the underlying nodes, ref: https://github.com/topolvm/topolvm/blob/master/docs/lvmd.md
* Kubernetes 1.17+
* Configure `kube-scheduler` on the underlying nodes, ref: https://github.com/topolvm/topolvm/tree/master/deploy#configure-kube-scheduler
* `cert-manager` version `v1.0.0+` installed. ref: https://cert-manager.io/
* Requires at least `v3.2.3` version of helm to support
Expand All @@ -25,7 +24,7 @@ The chart can be customized using the following configurable parameters:
| Parameter | Description | Default |
| ------------------------------- | ----------------------------------------------------------------------------------------------------| -----------------------------|
| `image.repository` | TopoLVM Container image name | `quay.io/topolvm/topolvm` |
| `image.tag` | TopoLVM Container image tag | `0.6.0` |
| `image.tag` | TopoLVM Container image tag | `0.7.0` |
| `image.pullPolicy` | TopoLVM Container pull policy | `IfNotPresent` |
| `controller.replicaCount` | Number of TopoLVM controllers pods to deploy | `2` |
| `podSecurityPolicy.create` | Specify if a pod security policy must be created | `true` |
Expand All @@ -38,9 +37,3 @@ Alternatively a YAML file that specifies the values for the parameters can be pr
helm upgrade -i topolvm -f values.yaml charts/topolvm
```

---

Dont forget to:
kubectl label namespace kube-system topolvm.cybozu.com/webhook=ignore
install the kube-scheduler plugin as described in the "Configure kube-scheduler" section of /deploy/README.md
Config is automatically copied to the masters at /etc/topolvm/scheduler when deployed as a daemonset and kubeScheduler.managed=true
3 changes: 3 additions & 0 deletions charts/topolvm/templates/controller/clusterroles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ rules:
- apiGroups: ["storage.k8s.io"]
resources: ["volumeattachments"]
verbs: ["get", "list", "watch", "update", "patch"]
- apiGroups: ["storage.k8s.io"]
resources: ["volumeattachments/status"]
verbs: ["patch"]

---

Expand Down
2 changes: 1 addition & 1 deletion charts/topolvm/templates/controller/csidriver.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: storage.k8s.io/v1beta1
apiVersion: storage.k8s.io/v1
kind: CSIDriver
metadata:
name: topolvm.cybozu.com
Expand Down
3 changes: 1 addition & 2 deletions charts/topolvm/templates/controller/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,8 @@ spec:
- /csi-provisioner
- "--csi-address=/run/topolvm/csi-topolvm.sock"
- "--feature-gates=Topology=true"
- --enable-leader-election
- --leader-election
- --leader-election-namespace={{ .Release.Namespace }}
- --leader-election-type=leases
volumeMounts:
- name: socket-dir
mountPath: /run/topolvm
Expand Down
2 changes: 0 additions & 2 deletions charts/topolvm/templates/kube-scheduler/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,4 @@ metadata:
data:
scheduler-config.yaml: |
{{ toYaml .Values.kubeScheduler.config | indent 4 }}
scheduler-policy.json: |
{{ toJson .Values.kubeScheduler.policy | indent 4 }}
{{- end }}
2 changes: 0 additions & 2 deletions charts/topolvm/templates/kube-scheduler/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ spec:
- -ec
- |
cat /config/scheduler-config.yaml > /etc/topolvm/scheduler/.scheduler-config.yaml
cat /config/scheduler-policy.json > /etc/topolvm/scheduler/.scheduler-policy.json
mv /etc/topolvm/scheduler/.scheduler-config.yaml /etc/topolvm/scheduler/scheduler-config.yaml
mv /etc/topolvm/scheduler/.scheduler-policy.json /etc/topolvm/scheduler/scheduler-policy.json
volumeMounts:
- mountPath: /config
name: config
Expand Down
2 changes: 1 addition & 1 deletion charts/topolvm/templates/lvmd/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spec:
hostPID: true
containers:
- name: lvmd
image: "{{ .Values.lvmd.image.repository | default .Values.image.repository }}:{{ .Values.lvmd.image.tag | default .Values.image.tag }}"
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
securityContext:
privileged: true
command:
Expand Down
2 changes: 2 additions & 0 deletions charts/topolvm/templates/lvmd/psp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ metadata:
spec:
privileged: true
allowPrivilegeEscalation: true
hostPID: true
volumes:
- 'configMap'
- 'hostPath'
- 'secret'
allowedHostPaths:
- pathPrefix: "/run/topolvm"
readOnly: false
Expand Down
34 changes: 12 additions & 22 deletions charts/topolvm/values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
image:
repository: quay.io/topolvm/topolvm
tag: 0.6.0
tag: 0.7.0
pullPolicy: IfNotPresent


Expand Down Expand Up @@ -44,7 +44,8 @@ scheduler:
operator: Exists
- effect: NoSchedule
key: node-role.kubernetes.io/master

- effect: NoSchedule
key: node-role.kubernetes.io/control-plane

## Node labels for default backend pod assignment
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
Expand Down Expand Up @@ -80,29 +81,21 @@ scheduler:
kubeScheduler:
managed: false
config:
apiVersion: kubescheduler.config.k8s.io/v1alpha1
apiVersion: kubescheduler.config.k8s.io/v1beta1
kind: KubeSchedulerConfiguration
schedulerName: default-scheduler
algorithmSource:
policy:
file:
path: /etc/topolvm/scheduler/scheduler-policy.cfg
leaderElection:
leaderElect: true
clientConnection:
kubeconfig: /etc/kubernetes/scheduler.conf
policy:
kind: Policy
apiVersion: v1
extenders:
- urlPrefix: http://127.0.0.1:9251
filterVerb: predicate
prioritizeVerb: prioritize
nodeCacheCapable: false
weight: 1
managedResources:
- name: topolvm.cybozu.com/capacity
ignoredByScheduler: true
- urlPrefix: "http://127.0.0.1:9251"
filterVerb: "predicate"
prioritizeVerb: "prioritize"
nodeCacheCapable: false
weight: 1
managedResources:
- name: "topolvm.cybozu.com/capacity"
ignoredByScheduler: true
resources: {}
# requests:
# memory: 50Mi
Expand All @@ -119,9 +112,6 @@ lvmd:
# volume-group: myvg1
# default: true
# spare-gb: 10
image:
repository:
tag:
resources: {}
# requests:
# memory: 100Mi
Expand Down

0 comments on commit 2286c3a

Please sign in to comment.