added extraVolumes and extraVolumeMounts (#149)
Fixes #147 ### Motivation This gives the helm chart user the ability to specify a secret or other type of volume to be mounted into any of the statefulset pods ### Modifications * Added conditionals to `bookkeeper`, `broker`, `proxy`, `toolset`, and `zookeeper` statefulsets which allow the chart user to specify extraVolumes and extraVolumeMounts for deployed pods. * Added `extraVolumes` and `extraVolumeMounts` parameters to values.yaml
This commit is contained in:
parent
19d6ce6488
commit
c45813ffe5
@ -187,6 +187,9 @@ spec:
|
|||||||
- name: "{{ template "pulsar.fullname" . }}-{{ .Values.bookkeeper.component }}-{{ .Values.bookkeeper.volumes.ledgers.name }}"
|
- name: "{{ template "pulsar.fullname" . }}-{{ .Values.bookkeeper.component }}-{{ .Values.bookkeeper.volumes.ledgers.name }}"
|
||||||
mountPath: /pulsar/data/bookkeeper/ledgers
|
mountPath: /pulsar/data/bookkeeper/ledgers
|
||||||
{{- end}}
|
{{- end}}
|
||||||
|
{{- if .Values.bookkeeper.extraVolumeMounts }}
|
||||||
|
{{ toYaml .Values.bookkeeper.extraVolumeMounts | indent 8 }}
|
||||||
|
{{- end }}
|
||||||
{{- include "pulsar.bookkeeper.certs.volumeMounts" . | nindent 8 }}
|
{{- include "pulsar.bookkeeper.certs.volumeMounts" . | nindent 8 }}
|
||||||
volumes:
|
volumes:
|
||||||
{{- if not (and (and .Values.persistence .Values.volumes.persistence) .Values.bookkeeper.volumes.persistence) }}
|
{{- if not (and (and .Values.persistence .Values.volumes.persistence) .Values.bookkeeper.volumes.persistence) }}
|
||||||
@ -197,6 +200,9 @@ spec:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
{{- include "pulsar.bookkeeper.certs.volumes" . | nindent 6 }}
|
{{- include "pulsar.bookkeeper.certs.volumes" . | nindent 6 }}
|
||||||
{{- include "pulsar.imagePullSecrets" . | nindent 6}}
|
{{- include "pulsar.imagePullSecrets" . | nindent 6}}
|
||||||
|
{{- if .Values.bookkeeper.extraVolumes }}
|
||||||
|
{{ toYaml .Values.bookkeeper.extraVolumes | indent 6 }}
|
||||||
|
{{- end }}
|
||||||
{{- if and (and .Values.persistence .Values.volumes.persistence) .Values.bookkeeper.volumes.persistence}}
|
{{- if and (and .Values.persistence .Values.volumes.persistence) .Values.bookkeeper.volumes.persistence}}
|
||||||
volumeClaimTemplates:
|
volumeClaimTemplates:
|
||||||
{{- if .Values.bookkeeper.volumes.useSingleCommonVolume }}
|
{{- if .Values.bookkeeper.volumes.useSingleCommonVolume }}
|
||||||
|
|||||||
@ -234,6 +234,9 @@ spec:
|
|||||||
name: broker-token
|
name: broker-token
|
||||||
readOnly: true
|
readOnly: true
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.broker.extraVolumeMounts }}
|
||||||
|
{{ toYaml .Values.broker.extraVolumeMounts | indent 10 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- include "pulsar.broker.certs.volumeMounts" . | nindent 10 }}
|
{{- include "pulsar.broker.certs.volumeMounts" . | nindent 10 }}
|
||||||
{{- if and .Values.rbac.enabled .Values.rbac.psp }}
|
{{- if and .Values.rbac.enabled .Values.rbac.psp }}
|
||||||
@ -241,6 +244,9 @@ spec:
|
|||||||
readOnlyRootFilesystem: false
|
readOnlyRootFilesystem: false
|
||||||
{{- end }}
|
{{- end }}
|
||||||
volumes:
|
volumes:
|
||||||
|
{{- if .Values.broker.extraVolumes }}
|
||||||
|
{{ toYaml .Values.broker.extraVolumes | indent 6 }}
|
||||||
|
{{- end }}
|
||||||
{{- if .Values.auth.authentication.enabled }}
|
{{- if .Values.auth.authentication.enabled }}
|
||||||
{{- if eq .Values.auth.authentication.provider "jwt" }}
|
{{- if eq .Values.auth.authentication.provider "jwt" }}
|
||||||
- name: token-keys
|
- name: token-keys
|
||||||
|
|||||||
@ -199,7 +199,7 @@ spec:
|
|||||||
envFrom:
|
envFrom:
|
||||||
- configMapRef:
|
- configMapRef:
|
||||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.proxy.component }}"
|
name: "{{ template "pulsar.fullname" . }}-{{ .Values.proxy.component }}"
|
||||||
{{- if or .Values.auth.authentication.enabled (and .Values.tls.enabled (or .Values.tls.proxy.enabled .Values.tls.broker.enabled)) }}
|
{{- if or .Values.proxy.extraVolumeMounts .Values.auth.authentication.enabled (and .Values.tls.enabled (or .Values.tls.proxy.enabled .Values.tls.broker.enabled)) }}
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
{{- if .Values.auth.authentication.enabled }}
|
{{- if .Values.auth.authentication.enabled }}
|
||||||
{{- if eq .Values.auth.authentication.provider "jwt" }}
|
{{- if eq .Values.auth.authentication.provider "jwt" }}
|
||||||
@ -221,10 +221,16 @@ spec:
|
|||||||
name: ca
|
name: ca
|
||||||
readOnly: true
|
readOnly: true
|
||||||
{{- end}}
|
{{- end}}
|
||||||
|
{{- if .Values.proxy.extraVolumeMounts }}
|
||||||
|
{{ toYaml .Values.proxy.extraVolumeMounts | indent 10 }}
|
||||||
|
{{- end }}
|
||||||
{{- end}}
|
{{- end}}
|
||||||
{{- include "pulsar.imagePullSecrets" . | nindent 6}}
|
{{- include "pulsar.imagePullSecrets" . | nindent 6}}
|
||||||
{{- if or .Values.auth.authentication.enabled (and .Values.tls.enabled .Values.tls.proxy.enabled) }}
|
{{- if or .Values.proxy.extraVolumes .Values.auth.authentication.enabled (and .Values.tls.enabled .Values.tls.proxy.enabled) }}
|
||||||
volumes:
|
volumes:
|
||||||
|
{{- if .Values.proxy.extraVolumes }}
|
||||||
|
{{ toYaml .Values.proxy.extraVolumes | indent 8 }}
|
||||||
|
{{- end }}
|
||||||
{{- if .Values.auth.authentication.enabled }}
|
{{- if .Values.auth.authentication.enabled }}
|
||||||
{{- if eq .Values.auth.authentication.provider "jwt" }}
|
{{- if eq .Values.auth.authentication.provider "jwt" }}
|
||||||
- name: token-keys
|
- name: token-keys
|
||||||
|
|||||||
@ -94,6 +94,9 @@ spec:
|
|||||||
name: proxy-ca
|
name: proxy-ca
|
||||||
readOnly: true
|
readOnly: true
|
||||||
{{- end}}
|
{{- end}}
|
||||||
|
{{- if .Values.toolset.extraVolumeMounts }}
|
||||||
|
{{ toYaml .Values.toolset.extraVolumeMounts | indent 8 }}
|
||||||
|
{{- end }}
|
||||||
{{- include "pulsar.toolset.certs.volumeMounts" . | nindent 8 }}
|
{{- include "pulsar.toolset.certs.volumeMounts" . | nindent 8 }}
|
||||||
volumes:
|
volumes:
|
||||||
{{- if .Values.auth.authentication.enabled }}
|
{{- if .Values.auth.authentication.enabled }}
|
||||||
@ -114,6 +117,9 @@ spec:
|
|||||||
- key: ca.crt
|
- key: ca.crt
|
||||||
path: ca.crt
|
path: ca.crt
|
||||||
{{- end}}
|
{{- end}}
|
||||||
|
{{- if .Values.toolset.extraVolumes }}
|
||||||
|
{{ toYaml .Values.toolset.extraVolumes | indent 6 }}
|
||||||
|
{{- end }}
|
||||||
{{- include "pulsar.toolset.certs.volumes" . | nindent 6 }}
|
{{- include "pulsar.toolset.certs.volumes" . | nindent 6 }}
|
||||||
{{- include "pulsar.imagePullSecrets" . | nindent 6}}
|
{{- include "pulsar.imagePullSecrets" . | nindent 6}}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@ -183,11 +183,17 @@ spec:
|
|||||||
mountPath: "/pulsar/keytool/keytool.sh"
|
mountPath: "/pulsar/keytool/keytool.sh"
|
||||||
subPath: keytool.sh
|
subPath: keytool.sh
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if .Values.zookeeper.extraVolumeMounts }}
|
||||||
|
{{ toYaml .Values.zookeeper.extraVolumeMounts | indent 8 }}
|
||||||
|
{{- end }}
|
||||||
volumes:
|
volumes:
|
||||||
{{- if not (and (and .Values.volumes.persistence .Values.volumes.persistence) .Values.zookeeper.volumes.persistence) }}
|
{{- if not (and (and .Values.volumes.persistence .Values.volumes.persistence) .Values.zookeeper.volumes.persistence) }}
|
||||||
- name: "{{ template "pulsar.fullname" . }}-{{ .Values.zookeeper.component }}-{{ .Values.zookeeper.volumes.data.name }}"
|
- name: "{{ template "pulsar.fullname" . }}-{{ .Values.zookeeper.component }}-{{ .Values.zookeeper.volumes.data.name }}"
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if .Values.zookeeper.extraVolumes }}
|
||||||
|
{{ toYaml .Values.zookeeper.extraVolumes | indent 6 }}
|
||||||
|
{{- end }}
|
||||||
{{- if and .Values.tls.enabled .Values.tls.zookeeper.enabled }}
|
{{- if and .Values.tls.enabled .Values.tls.zookeeper.enabled }}
|
||||||
- name: zookeeper-certs
|
- name: zookeeper-certs
|
||||||
secret:
|
secret:
|
||||||
|
|||||||
@ -330,6 +330,19 @@ zookeeper:
|
|||||||
requests:
|
requests:
|
||||||
memory: 256Mi
|
memory: 256Mi
|
||||||
cpu: 0.1
|
cpu: 0.1
|
||||||
|
# extraVolumes and extraVolumeMounts allows you to mount other volumes
|
||||||
|
# Example Use Case: mount ssl certificates
|
||||||
|
# extraVolumes:
|
||||||
|
# - name: ca-certs
|
||||||
|
# secret:
|
||||||
|
# defaultMode: 420
|
||||||
|
# secretName: ca-certs
|
||||||
|
# extraVolumeMounts:
|
||||||
|
# - name: ca-certs
|
||||||
|
# mountPath: /certs
|
||||||
|
# readOnly: true
|
||||||
|
extraVolumes: []
|
||||||
|
extraVolumeMounts: []
|
||||||
volumes:
|
volumes:
|
||||||
# use a persistent volume or emptyDir
|
# use a persistent volume or emptyDir
|
||||||
persistence: true
|
persistence: true
|
||||||
@ -439,6 +452,19 @@ bookkeeper:
|
|||||||
requests:
|
requests:
|
||||||
memory: 512Mi
|
memory: 512Mi
|
||||||
cpu: 0.2
|
cpu: 0.2
|
||||||
|
# extraVolumes and extraVolumeMounts allows you to mount other volumes
|
||||||
|
# Example Use Case: mount ssl certificates
|
||||||
|
# extraVolumes:
|
||||||
|
# - name: ca-certs
|
||||||
|
# secret:
|
||||||
|
# defaultMode: 420
|
||||||
|
# secretName: ca-certs
|
||||||
|
# extraVolumeMounts:
|
||||||
|
# - name: ca-certs
|
||||||
|
# mountPath: /certs
|
||||||
|
# readOnly: true
|
||||||
|
extraVolumes: []
|
||||||
|
extraVolumeMounts: []
|
||||||
volumes:
|
volumes:
|
||||||
# use a persistent volume or emptyDir
|
# use a persistent volume or emptyDir
|
||||||
persistence: true
|
persistence: true
|
||||||
@ -637,6 +663,19 @@ broker:
|
|||||||
requests:
|
requests:
|
||||||
memory: 512Mi
|
memory: 512Mi
|
||||||
cpu: 0.2
|
cpu: 0.2
|
||||||
|
# extraVolumes and extraVolumeMounts allows you to mount other volumes
|
||||||
|
# Example Use Case: mount ssl certificates
|
||||||
|
# extraVolumes:
|
||||||
|
# - name: ca-certs
|
||||||
|
# secret:
|
||||||
|
# defaultMode: 420
|
||||||
|
# secretName: ca-certs
|
||||||
|
# extraVolumeMounts:
|
||||||
|
# - name: ca-certs
|
||||||
|
# mountPath: /certs
|
||||||
|
# readOnly: true
|
||||||
|
extraVolumes: []
|
||||||
|
extraVolumeMounts: []
|
||||||
## Broker configmap
|
## Broker configmap
|
||||||
## templates/broker-configmap.yaml
|
## templates/broker-configmap.yaml
|
||||||
##
|
##
|
||||||
@ -730,6 +769,19 @@ proxy:
|
|||||||
requests:
|
requests:
|
||||||
memory: 128Mi
|
memory: 128Mi
|
||||||
cpu: 0.2
|
cpu: 0.2
|
||||||
|
# extraVolumes and extraVolumeMounts allows you to mount other volumes
|
||||||
|
# Example Use Case: mount ssl certificates
|
||||||
|
# extraVolumes:
|
||||||
|
# - name: ca-certs
|
||||||
|
# secret:
|
||||||
|
# defaultMode: 420
|
||||||
|
# secretName: ca-certs
|
||||||
|
# extraVolumeMounts:
|
||||||
|
# - name: ca-certs
|
||||||
|
# mountPath: /certs
|
||||||
|
# readOnly: true
|
||||||
|
extraVolumes: []
|
||||||
|
extraVolumeMounts: []
|
||||||
## Proxy configmap
|
## Proxy configmap
|
||||||
## templates/proxy-configmap.yaml
|
## templates/proxy-configmap.yaml
|
||||||
##
|
##
|
||||||
@ -844,6 +896,19 @@ toolset:
|
|||||||
requests:
|
requests:
|
||||||
memory: 256Mi
|
memory: 256Mi
|
||||||
cpu: 0.1
|
cpu: 0.1
|
||||||
|
# extraVolumes and extraVolumeMounts allows you to mount other volumes
|
||||||
|
# Example Use Case: mount ssl certificates
|
||||||
|
# extraVolumes:
|
||||||
|
# - name: ca-certs
|
||||||
|
# secret:
|
||||||
|
# defaultMode: 420
|
||||||
|
# secretName: ca-certs
|
||||||
|
# extraVolumeMounts:
|
||||||
|
# - name: ca-certs
|
||||||
|
# mountPath: /certs
|
||||||
|
# readOnly: true
|
||||||
|
extraVolumes: []
|
||||||
|
extraVolumeMounts: []
|
||||||
## Bastion configmap
|
## Bastion configmap
|
||||||
## templates/bastion-configmap.yaml
|
## templates/bastion-configmap.yaml
|
||||||
##
|
##
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user