Skip to content

Commit

Permalink
Adding sidecar feature to zookeeper-operator (#344)
Browse files Browse the repository at this point in the history
* Adding sidecar feature to zookeeper-operator

* additionalSidecars and additionalVolumes moved from helper class

* additionalSidecars and additionalVolumes moved from helper class

Co-authored-by: ApparaoAdapuredddi <[email protected]>
  • Loading branch information
adapured and ApparaoAdapuredddi authored Jun 8, 2021
1 parent 75d5e78 commit c0136b1
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
3 changes: 3 additions & 0 deletions charts/zookeeper-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,6 @@ The following table lists the configurable parameters of the zookeeper-operator
| `nodeSelector` | Map of key-value pairs to be present as labels in the node in which the pod should run | `{}` |
| `affinity` | Specifies scheduling constraints on pods | `{}` |
| `tolerations` | Specifies the pod's tolerations | `[]` |
| `additionalEnv` | Additional Environment Variables | `[]` |
| `additionalSidecars` | Additional Sidecars Configuration | `[]` |
| `additionalVolumes` | Additional volumes required for sidecars | `[]` |
10 changes: 10 additions & 0 deletions charts/zookeeper-operator/templates/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ spec:
{{- end }}
spec:
serviceAccountName: {{ .Values.serviceAccount.name }}
{{- if .Values.additionalVolumes }}
volumes:
{{ toYaml .Values.additionalVolumes | indent 6 }}
{{- end }}
containers:
- name: {{ template "zookeeper-operator.fullname" . }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
Expand All @@ -39,10 +43,16 @@ spec:
fieldPath: metadata.name
- name: OPERATOR_NAME
value: {{ template "zookeeper-operator.fullname" . }}
{{- if .Values.additionalEnv }}
{{ toYaml .Values.additionalEnv | indent 8 }}
{{- end }}
{{- if .Values.resources }}
resources:
{{ toYaml .Values.resources | indent 10 }}
{{- end }}
{{- if .Values.additionalSidecars }}
{{ toYaml .Values.additionalSidecars | indent 6 }}
{{- end }}
{{- if .Values.nodeSelector }}
nodeSelector:
{{ toYaml .Values.nodeSelector | indent 8 }}
Expand Down
15 changes: 15 additions & 0 deletions charts/zookeeper-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,18 @@ hooks:
## the operator cannot be deleted till the zookeeper cluster
## custom resources have been cleaned up
delete: true

## Additional Sidecars Configuration.
additionalSidecars: {}
# - name: nginx
# image: nginx:latest

## Additional Environment Variables.
additionalEnv: {}

## Additional volumes required for sidecars.
additionalVolumes: {}
# - name: volume1
# emptyDir: {}
# - name: volume2
# emptyDir: {}

0 comments on commit c0136b1

Please sign in to comment.