diff --git a/charts/topolvm/Chart.yaml b/charts/topolvm/Chart.yaml index 1f0caa6..2d5d0f4 100755 --- a/charts/topolvm/Chart.yaml +++ b/charts/topolvm/Chart.yaml @@ -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 \ No newline at end of file diff --git a/charts/topolvm/README.md b/charts/topolvm/README.md index 231e359..7e0fc6f 100644 --- a/charts/topolvm/README.md +++ b/charts/topolvm/README.md @@ -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 @@ -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` | @@ -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 diff --git a/charts/topolvm/templates/controller/clusterroles.yaml b/charts/topolvm/templates/controller/clusterroles.yaml index 0625069..edfdbde 100644 --- a/charts/topolvm/templates/controller/clusterroles.yaml +++ b/charts/topolvm/templates/controller/clusterroles.yaml @@ -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"] --- diff --git a/charts/topolvm/templates/controller/csidriver.yaml b/charts/topolvm/templates/controller/csidriver.yaml index fcc4ec4..59dea12 100644 --- a/charts/topolvm/templates/controller/csidriver.yaml +++ b/charts/topolvm/templates/controller/csidriver.yaml @@ -1,4 +1,4 @@ -apiVersion: storage.k8s.io/v1beta1 +apiVersion: storage.k8s.io/v1 kind: CSIDriver metadata: name: topolvm.cybozu.com diff --git a/charts/topolvm/templates/controller/deployment.yaml b/charts/topolvm/templates/controller/deployment.yaml index 3498cc4..84a24c5 100644 --- a/charts/topolvm/templates/controller/deployment.yaml +++ b/charts/topolvm/templates/controller/deployment.yaml @@ -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 diff --git a/charts/topolvm/templates/kube-scheduler/configmap.yaml b/charts/topolvm/templates/kube-scheduler/configmap.yaml index 0d1760c..5bd4b33 100644 --- a/charts/topolvm/templates/kube-scheduler/configmap.yaml +++ b/charts/topolvm/templates/kube-scheduler/configmap.yaml @@ -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 }} diff --git a/charts/topolvm/templates/kube-scheduler/daemonset.yaml b/charts/topolvm/templates/kube-scheduler/daemonset.yaml index 6cd66f9..2c26128 100644 --- a/charts/topolvm/templates/kube-scheduler/daemonset.yaml +++ b/charts/topolvm/templates/kube-scheduler/daemonset.yaml @@ -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 diff --git a/charts/topolvm/templates/lvmd/daemonset.yaml b/charts/topolvm/templates/lvmd/daemonset.yaml index 3c4e73f..ca9394a 100644 --- a/charts/topolvm/templates/lvmd/daemonset.yaml +++ b/charts/topolvm/templates/lvmd/daemonset.yaml @@ -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: diff --git a/charts/topolvm/templates/lvmd/psp.yaml b/charts/topolvm/templates/lvmd/psp.yaml index edcbfe0..c554398 100644 --- a/charts/topolvm/templates/lvmd/psp.yaml +++ b/charts/topolvm/templates/lvmd/psp.yaml @@ -8,9 +8,11 @@ metadata: spec: privileged: true allowPrivilegeEscalation: true + hostPID: true volumes: - 'configMap' - 'hostPath' + - 'secret' allowedHostPaths: - pathPrefix: "/run/topolvm" readOnly: false diff --git a/charts/topolvm/values.yaml b/charts/topolvm/values.yaml index 8edf5cc..03e2513 100755 --- a/charts/topolvm/values.yaml +++ b/charts/topolvm/values.yaml @@ -1,6 +1,6 @@ image: repository: quay.io/topolvm/topolvm - tag: 0.6.0 + tag: 0.7.0 pullPolicy: IfNotPresent @@ -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/ @@ -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 @@ -119,9 +112,6 @@ lvmd: # volume-group: myvg1 # default: true # spare-gb: 10 - image: - repository: - tag: resources: {} # requests: # memory: 100Mi