Skip to content

Commit

Permalink
Change lvm-controller's Kind from StatefulSet to Deployment (#196)
Browse files Browse the repository at this point in the history
Signed-off-by: Evgenii Tereshkov <[email protected]>
Signed-off-by: Niladri Halder <[email protected]>
  • Loading branch information
evgkrsk authored and niladrih committed Mar 18, 2024
1 parent 3a386e7 commit 1456766
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 17 deletions.
1 change: 1 addition & 0 deletions changelogs/unreleased/999-evgkrsk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Change lvm-controller's Kind from StatefulSet to Deployment (#196)
25 changes: 13 additions & 12 deletions deploy/helm/charts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ $ helm install [RELEASE_NAME] openebs-lvmlocalpv/lvm-localpv --namespace [NAMESP


**Note:** If moving from the operator to helm
- Make sure the namespace provided in the helm install command is same as `LVM_NAMESPACE` (by default it is `openebs`) env in the controller statefulset.
- Before installing, clean up the stale statefulset and daemonset from `kube-system` namespace using the below commands
- Make sure the namespace provided in the helm install command is same as `LVM_NAMESPACE` (by default it is `openebs`) env in the controller deployment.
- Before installing, clean up the stale deployment and daemonset from `kube-system` namespace using the below commands
```sh
kubectl delete sts openebs-lvm-controller -n kube-system
kubectl delete deployment openebs-lvm-controller -n kube-system
kubectl delete ds openebs-lvm-node -n kube-system
```

Expand Down Expand Up @@ -133,15 +133,16 @@ helm install openebs-lvmlocalpv openebs-lvmlocalpv/lvm-localpv --namespace opene
| `lvmController.provisioner.image.repository` | Image repository for csi-provisioner | `sig-storage/csi-provisioner` |
| `lvmController.provisioner.image.pullPolicy` | Image pull policy for csi-provisioner | `IfNotPresent` |
| `lvmController.provisioner.image.tag` | Image tag for csi-provisioner | `v3.5.0` |
| `lvmController.updateStrategy.type` | Update strategy for lvm localpv controller statefulset | `RollingUpdate` |
| `lvmController.annotations` | Annotations for lvm localpv controller statefulset metadata | `""` |
| `lvmController.podAnnotations` | Annotations for lvm localpv controller statefulset's pods metadata | `""` |
| `lvmController.resources` | Resource and request and limit for lvm localpv controller statefulset containers | `""` |
| `lvmController.labels` | Labels for lvm localpv controller statefulset metadata | `""` |
| `lvmController.podLabels` | Appends labels to the lvm localpv controller statefulset pods | `""` |
| `lvmController.nodeSelector` | Nodeselector for lvm localpv controller statefulset pods | `""` |
| `lvmController.tolerations` | lvm localpv controller statefulset's pod toleration values | `""` |
| `lvmController.securityContext` | Seurity context for lvm localpv controller statefulset container | `""` |
| `lvmController.updateStrategy.type` | Update strategy for lvm localpv controller deployment | `RollingUpdate` |
| `lvmController.annotations` | Annotations for lvm localpv controller deployment metadata | `""` |
| `lvmController.podAnnotations` | Annotations for lvm localpv controller deployment's pods metadata | `""` |
| `lvmController.resources` | Resource and request and limit for lvm localpv controller deployment containers | `""` |
| `lvmController.labels` | Labels for lvm localpv controller deployment metadata | `""` |
| `lvmController.podLabels` | Appends labels to the lvm localpv controller deployment pods | `""` |
| `lvmController.nodeSelector` | Nodeselector for lvm localpv controller deployment pods | `""` |
| `lvmController.tolerations` | lvm localpv controller deployment's pod toleration values | `""` |
| `lvmController.topologySpreadConstraints` | lvm localpv controller deployment's pod topologySpreadConstraints values | `""` |
| `lvmController.securityContext` | Security context for lvm localpv controller deployment container | `""` |
| `rbac.pspEnabled` | Enable PodSecurityPolicy | `false` |
| `serviceAccount.lvmNode.create` | Create a service account for lvmnode or not | `true` |
| `serviceAccount.lvmNode.name` | Name for the lvmnode service account | `openebs-lvm-node-sa` |
Expand Down
7 changes: 5 additions & 2 deletions deploy/helm/charts/templates/lvm-controller.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: apps/v1
kind: StatefulSet
kind: Deployment
metadata:
name: {{ template "lvmlocalpv.fullname" . }}-controller
{{- with .Values.lvmController.annotations }}
Expand All @@ -11,7 +11,6 @@ spec:
selector:
matchLabels:
{{- include "lvmlocalpv.lvmController.matchLabels" . | nindent 6 }}
serviceName: "{{ .Values.lvmController.serviceName }}"
replicas: {{ .Values.lvmController.replicas }}
template:
metadata:
Expand Down Expand Up @@ -157,3 +156,7 @@ spec:
tolerations:
{{ toYaml .Values.lvmController.tolerations | indent 8 }}
{{- end }}
{{- if .Values.lvmController.topologySpreadConstraints }}
topologySpreadConstraints:
{{ toYaml .Values.lvmController.topologySpreadConstraints | indent 8 }}
{{- end }}
6 changes: 3 additions & 3 deletions deploy/helm/charts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,10 @@ lvmNode:


# lvmController contains the configurables for
# the lvm controller statefulset
# the lvm controller deployment
lvmController:
componentName: openebs-lvm-controller
replicas: 1
serviceName: openebs-lvm
logLevel: 5
resizer:
name: "csi-resizer"
Expand Down Expand Up @@ -128,6 +127,7 @@ lvmController:
name: openebs-lvm-controller
nodeSelector: {}
tolerations: []
topologySpreadConstraints: []
securityContext: {}
priorityClass:
create: true
Expand All @@ -141,7 +141,7 @@ lvmController:
burst: 0

# lvmPlugin is the common csi container used by the
# controller statefulset and node daemonset
# controller deployment and node daemonset
lvmPlugin:
name: "openebs-lvm-plugin"
image:
Expand Down

0 comments on commit 1456766

Please sign in to comment.