Skip to content

Commit

Permalink
update(helm): allow setting different base dir(and others) for cspc a…
Browse files Browse the repository at this point in the history
…nd cvc operators (#404)

* Allow setting different dir path for cspc and cvc operators

Signed-off-by: Abhishek Agarwal <[email protected]>
  • Loading branch information
Abhishek Agarwal authored Dec 7, 2021
1 parent 0e68f84 commit 8023735
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 12 deletions.
2 changes: 1 addition & 1 deletion deploy/helm/charts/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: CStor-Operator helm chart for Kubernetes
type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 3.0.2
version: 3.0.3
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: 3.0.0
Expand Down
3 changes: 3 additions & 0 deletions deploy/helm/charts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ helm install openebs-cstor openebs-cstor/cstor --namespace openebs --create-name
| cspcOperator.resyncInterval | string | `"30"` | CSPC operator resync interval |
| cspcOperator.securityContext | object | `{}` | CSPC operator security context |
| cspcOperator.tolerations | list | `[]` | CSPC operator pod tolerations |
| cspcOperator.baseDir | string | `"/var/openebs"` | base directory for openebs cStor pools on host path to store pool related information |
| cspcOperator.sparseDir | string | `"/var/openebs/sparse"` | sparse directory to access sparse based devices |
| cstorCSIPlugin.image.pullPolicy | string | `"IfNotPresent"` | CStor CSI driver image pull policy |
| cstorCSIPlugin.image.registry | string | `nil` | CStor CSI driver image registry |
| cstorCSIPlugin.image.repository | string | `"openebs/cstor-csi-driver"` | CStor CSI driver image repository |
Expand Down Expand Up @@ -220,6 +222,7 @@ helm install openebs-cstor openebs-cstor/cstor --namespace openebs --create-name
| cvcOperator.volumeMgmt.image.registry | string | `nil` | Volume mgmt image registry |
| cvcOperator.volumeMgmt.image.repository | string | `"openebs/cstor-volume-manager"` | Volume mgmt image repository |
| cvcOperator.volumeMgmt.image.tag | string | `"3.0.0"` | Volume mgmt image tag|
| cvcOperator.baseDir | string | `"/var/openebs"` | CVC operator base directory for openebs on host path |
| imagePullSecrets | string | `nil` | Image registry pull secrets |
| openebsNDM.enabled | bool | `true` | Enable OpenEBS NDM dependency |
| openebs-ndm.featureGates.APIService.enabled | bool | `true` | Enable 'API Service' feature gate for NDM |
Expand Down
12 changes: 8 additions & 4 deletions deploy/helm/charts/templates/cspc-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,21 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.name
{{- if .Values.cspcOperator.baseDir }}
# OPENEBS_IO_BASE_DIR is used to configure base directory for openebs on host path.
# Where OpenEBS can store required files. Default base path will be /var/openebs
# - name: OPENEBS_IO_BASE_DIR
# value: "/var/openebs"
- name: OPENEBS_IO_BASE_DIR
value: {{ .Values.cspcOperator.baseDir | quote }}
{{- end }}
{{- if .Values.cspcOperator.sparseDir }}
# OPENEBS_IO_CSTOR_POOL_SPARSE_DIR can be used to specify the hostpath
# to be used for saving the shared content between the side cars
# of cstor pool pod. This ENV is also used to indicate the location
# of the sparse devices.
# The default path used is /var/openebs/sparse
#- name: OPENEBS_IO_CSTOR_POOL_SPARSE_DIR
# value: "/var/openebs/sparse"
- name: OPENEBS_IO_CSTOR_POOL_SPARSE_DIR
value: "{{ .Values.cspcOperator.sparseDir }}"
{{- end }}
- name: OPENEBS_IO_CSPI_MGMT_IMAGE
value: "{{ .Values.cspcOperator.poolManager.image.registry }}{{ .Values.cspcOperator.poolManager.image.repository }}:{{ .Values.cspcOperator.poolManager.image.tag }}"
- name: OPENEBS_IO_CSTOR_POOL_IMAGE
Expand Down
11 changes: 4 additions & 7 deletions deploy/helm/charts/templates/cvc-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,12 @@ spec:
resources:
{{ toYaml .Values.cvcOperator.resources | indent 12 }}
env:
{{- if .Values.cvcOperator.baseDir }}
# OPENEBS_IO_BASE_DIR is used to configure base directory for openebs on host path.
# Where OpenEBS can store required files. Default base path will be /var/openebs
# - name: OPENEBS_IO_BASE_DIR
# value: "/var/openebs"
# OPENEBS_IO_CSTOR_TARGET_DIR can be used to specify the hostpath
# that to be used for saving the core dump of cstor volume pod.
# The default path used is /var/openebs/sparse
#- name: OPENEBS_IO_CSTOR_TARGET_DIR
# value: "/var/openebs/sparse"
- name: OPENEBS_IO_BASE_DIR
value: "{{ .Values.cvcOperator.baseDir }}"
{{- end }}
- name: OPENEBS_NAMESPACE
valueFrom:
fieldRef:
Expand Down
3 changes: 3 additions & 0 deletions deploy/helm/charts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ cspcOperator:
tolerations: []
resources: {}
securityContext: {}
baseDir: "/var/openebs"
sparseDir: "/var/openebs/sparse"

cvcOperator:
componentName: cvc-operator
Expand Down Expand Up @@ -85,6 +87,7 @@ cvcOperator:
tolerations: []
resources: {}
securityContext: {}
baseDir: "/var/openebs"
logLevel: "2"

csiController:
Expand Down

0 comments on commit 8023735

Please sign in to comment.