diff --git a/templates/deployment.yaml b/templates/deployment.yaml index 21cb484..abbdebd 100644 --- a/templates/deployment.yaml +++ b/templates/deployment.yaml @@ -41,6 +41,10 @@ spec: {{- if .Values.terminationGracePeriodSeconds }} terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }} {{- end }} + {{- with .Values.extraInitContainers }} + initContainers: + {{- toYaml . | nindent 8 }} + {{- end }} containers: - name: pgdog {{- if .Values.image.name }} @@ -94,6 +98,9 @@ spec: mountPath: /etc/pgdog - name: users mountPath: /etc/secrets/pgdog + {{- with .Values.extraVolumeMounts }} + {{- toYaml . | nindent 12 }} + {{- end }} {{- if .Values.prometheusPort }} - name: prom image: prom/prometheus @@ -151,6 +158,9 @@ spec: - name: prom configMap: name: {{ include "pgdog.fullname" . }}-prom + {{- with .Values.extraVolumes }} + {{- toYaml . | nindent 8 }} + {{- end }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/values.yaml b/values.yaml index 9c28e9d..a4dea3a 100644 --- a/values.yaml +++ b/values.yaml @@ -68,6 +68,35 @@ statefulSet: # enabled switches from Deployment to StatefulSet enabled: false +# Extra customization for advanced use cases +# extraInitContainers allows adding custom init containers that run before the main pgdog container +# Init containers are useful for setup tasks like downloading certificates, waiting for dependencies, etc. +# Example: +# extraInitContainers: +# - name: init-ca +# image: busybox +# command: ['sh', '-c', 'wget -O /pki/ca-bundle.pem https://truststore.example.com/ca-bundle.pem'] +# volumeMounts: +# - name: pki +# mountPath: /pki +extraInitContainers: [] + +# extraVolumes allows adding custom volumes to the pod +# These volumes can be referenced by extraVolumeMounts or extraInitContainers +# Example: +# extraVolumes: +# - name: pki +# emptyDir: {} +extraVolumes: [] + +# extraVolumeMounts allows adding custom volume mounts to the main pgdog container +# The volumes must be defined in extraVolumes +# Example: +# extraVolumeMounts: +# - name: pki +# mountPath: /pki +extraVolumeMounts: [] + # resources define resource requests and limits for the pgdog container # Note: requests and limits are set to the same values for Guaranteed QoS # Ratio: 1GB memory per 1 CPU (1000m CPU = 1Gi memory)