Skip to content

Commit

Permalink
feat: add lifecycle customization to helm charts (#888)
Browse files Browse the repository at this point in the history
* customization

* docs: add lifecycle to all services

* docs: indentation per service
  • Loading branch information
misba7 authored Apr 6, 2023
1 parent 610ea76 commit 8368722
Show file tree
Hide file tree
Showing 25 changed files with 185 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ spec:
- configMapRef:
name: {{ .Release.Name }}-global-user-custom-envs
{{- end }}
lifecycle:
{{- toYaml .Values.lifecycle | nindent 10 }}
volumeMounts:
{{- with .Values.volumeMounts }}
{{- toYaml . | nindent 10 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@ readinessProbe:
volumes: []
# -- Configure any additional volumesMounts that need to be attached to the containers
volumeMounts: []
# Actions on lifecycle events such as postStart and preStop
# Example
# lifecycle:
# postStart:
# exec:
# command: ["sh", "-c", "mkdir /opt/jans/jetty/jans-auth/custom/static/stylesheet/"]
lifecycle: {}

# -- Additional labels that will be added across all resources definitions in the format of {mylabel: "myapp"}
additionalLabels: { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ spec:
{{- include "auth-server-key-rotation.usr-envs" . | indent 16 }}
{{- include "auth-server-key-rotation.usr-secret-envs" . | indent 16 }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
lifecycle:
{{- toYaml .Values.lifecycle | nindent 16 }}
volumeMounts:
{{ if or (eq .Values.global.configSecretAdapter "aws") (eq .Values.global.configAdapterName "aws") }}
- mountPath: {{ .Values.global.cnAwsSharedCredentialsFile }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ resources:
volumes: []
# -- Configure any additional volumesMounts that need to be attached to the containers
volumeMounts: []
# Actions on lifecycle events such as postStart and preStop
# Example
# lifecycle:
# postStart:
# exec:
# command: ["sh", "-c", "mkdir /opt/jans/jetty/jans-auth/custom/static/stylesheet/"]
lifecycle: {}

nodeSelector: {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ spec:
- configMapRef:
name: {{ .Release.Name }}-global-user-custom-envs
{{- end }}
lifecycle:
{{- toYaml .Values.lifecycle | nindent 10 }}
volumeMounts:
{{- with .Values.volumeMounts }}
{{- toYaml . | nindent 10 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,13 @@ readinessProbe:
volumes: []
# -- Configure any additional volumesMounts that need to be attached to the containers
volumeMounts: []

# Actions on lifecycle events such as postStart and preStop
# Example
# lifecycle:
# postStart:
# exec:
# command: ["sh", "-c", "mkdir /opt/jans/jetty/jans-auth/custom/static/stylesheet/"]
lifecycle: {}
# -- Additional labels that will be added across all resources definitions in the format of {mylabel: "myapp"}
additionalLabels: { }
# -- Additional annotations that will be added across all resources in the format of {cert-manager.io/issuer: "letsencrypt-prod"}. key app is taken
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ spec:
- configMapRef:
name: {{ .Release.Name }}-global-user-custom-envs
{{- end }}
lifecycle:
{{- toYaml .Values.lifecycle | nindent 12 }}
volumeMounts:
{{- with .Values.volumeMounts }}
{{- toYaml . | nindent 12 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,13 @@ readinessProbe:
volumes: []
# -- Configure any additional volumesMounts that need to be attached to the containers
volumeMounts: []
# Actions on lifecycle events such as postStart and preStop
# Example
# lifecycle:
# postStart:
# exec:
# command: ["sh", "-c", "mkdir /opt/jans/jetty/jans-auth/custom/static/stylesheet/"]
lifecycle: {}

nameOverride: ""
fullnameOverride: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ spec:
{{- toYaml .Values.livenessProbe | nindent 12 }}
readinessProbe:
{{- toYaml .Values.readinessProbe | nindent 12 }}
lifecycle:
{{- toYaml .Values.lifecycle | nindent 12 }}
volumeMounts:
{{- with .Values.volumeMounts }}
{{- toYaml . | nindent 12 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,13 @@ affinity: {}
volumes: []
# -- Configure any additional volumesMounts that need to be attached to the containers
volumeMounts: []

# Actions on lifecycle events such as postStart and preStop
# Example
# lifecycle:
# postStart:
# exec:
# command: ["sh", "-c", "mkdir /opt/jans/jetty/jans-auth/custom/static/stylesheet/"]
lifecycle: {}
# -- Additional labels that will be added across all resources definitions in the format of {mylabel: "myapp"}
additionalLabels: { }
# -- Additional annotations that will be added across all resources in the format of {cert-manager.io/issuer: "letsencrypt-prod"}. key app is taken
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ spec:
env:
{{- include "config.usr-envs" . | indent 12 }}
{{- include "config.usr-secret-envs" . | indent 12 }}
lifecycle:
{{- toYaml .Values.lifecycle | nindent 10 }}
volumeMounts:
{{- with .Values.volumeMounts }}
{{- toYaml . | nindent 10 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,13 @@ state: TX
volumes: []
# -- Configure any additional volumesMounts that need to be attached to the containers
volumeMounts: []
# Actions on lifecycle events such as postStart and preStop
# Example
# lifecycle:
# postStart:
# exec:
# command: ["sh", "-c", "mkdir /opt/jans/jetty/jans-auth/custom/static/stylesheet/"]
lifecycle: {}
# -- Add custom dns policy
dnsPolicy: ""
# -- Add custom dns config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ spec:
- configMapRef:
name: {{ .Release.Name }}-global-user-custom-envs
{{- end }}
lifecycle:
{{- toYaml .Values.lifecycle | nindent 10 }}
volumeMounts:
{{- with .Values.volumeMounts }}
{{- toYaml . | nindent 10 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,13 @@ readinessProbe:
volumes: []
# -- Configure any additional volumesMounts that need to be attached to the containers
volumeMounts: []

# Actions on lifecycle events such as postStart and preStop
# Example
# lifecycle:
# postStart:
# exec:
# command: ["sh", "-c", "mkdir /opt/jans/jetty/jans-auth/custom/static/stylesheet/"]
lifecycle: {}
# -- Additional labels that will be added across all resources definitions in the format of {mylabel: "myapp"}
additionalLabels: { }
# -- Additional annotations that will be added across all resources in the format of {cert-manager.io/issuer: "letsencrypt-prod"}. key app is taken
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,7 @@ spec:
{{- include "opendj.usr-envs" $ | indent 12 }}
{{- include "opendj.usr-secret-envs" $ | indent 12 }}
lifecycle:
preStop:
exec:
command: ["/bin/sh", "-c", "python3 /app/scripts/deregister_peer.py 1>&/proc/1/fd/1"]
{{- toYaml .Values.lifecycle | nindent 10 }}
envFrom:
- configMapRef:
name: {{ $.Release.Name }}-config-cm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ readinessProbe:
volumes: []
# -- Configure any additional volumesMounts that need to be attached to the containers
volumeMounts: []
lifecycle:
preStop:
exec:
command: ["/bin/sh", "-c", "python3 /app/scripts/deregister_peer.py 1>&/proc/1/fd/1"]
nameOverride: ""
fullnameOverride: ""
# VolumeMounts for StatefulSet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ spec:
- configMapRef:
name: {{ .Release.Name }}-global-user-custom-envs
{{- end }}
lifecycle:
{{- toYaml .Values.lifecycle | nindent 10 }}
volumeMounts:
{{- with .Values.volumeMounts }}
{{- toYaml . | nindent 10 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,13 @@ readinessProbe:
volumes: []
# -- Configure any additional volumesMounts that need to be attached to the containers
volumeMounts: []

# Actions on lifecycle events such as postStart and preStop
# Example
# lifecycle:
# postStart:
# exec:
# command: ["sh", "-c", "mkdir /opt/jans/jetty/jans-auth/custom/static/stylesheet/"]
lifecycle: {}
nameOverride: ""
fullnameOverride: ""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ spec:
- configMapRef:
name: {{ .Release.Name }}-global-user-custom-envs
{{- end }}
lifecycle:
{{- toYaml .Values.lifecycle | nindent 10 }}
volumeMounts:
{{- with .Values.volumeMounts }}
{{- toYaml . | nindent 12 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,13 @@ readinessProbe:
volumes: []
# -- Configure any additional volumesMounts that need to be attached to the containers
volumeMounts: []

# Actions on lifecycle events such as postStart and preStop
# Example
# lifecycle:
# postStart:
# exec:
# command: ["sh", "-c", "mkdir /opt/jans/jetty/jans-auth/custom/static/stylesheet/"]
lifecycle: {}
nameOverride: ""
fullnameOverride: ""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ spec:
- configMapRef:
name: {{ .Release.Name }}-global-user-custom-envs
{{- end }}
lifecycle:
{{- toYaml .Values.lifecycle | nindent 10 }}
volumeMounts:
{{- with .Values.volumeMounts }}
{{- toYaml . | nindent 10 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,13 @@ resources:
volumes: []
# -- Configure any additional volumesMounts that need to be attached to the containers
volumeMounts: []

# Actions on lifecycle events such as postStart and preStop
# Example
# lifecycle:
# postStart:
# exec:
# command: ["sh", "-c", "mkdir /opt/jans/jetty/jans-auth/custom/static/stylesheet/"]
lifecycle: {}
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ spec:
- configMapRef:
name: {{ .Release.Name }}-global-user-custom-envs
{{- end }}
lifecycle:
{{- toYaml .Values.lifecycle | nindent 10 }}
volumeMounts:
{{- with .Values.volumeMounts }}
{{- toYaml . | nindent 10 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,13 @@ readinessProbe:
volumes: []
# -- Configure any additional volumesMounts that need to be attached to the containers
volumeMounts: []

# Actions on lifecycle events such as postStart and preStop
# Example
# lifecycle:
# postStart:
# exec:
# command: ["sh", "-c", "mkdir /opt/jans/jetty/jans-auth/custom/static/stylesheet/"]
lifecycle: {}
# -- Additional labels that will be added across all resources definitions in the format of {mylabel: "myapp"}
additionalLabels: { }
# -- Additional annotations that will be added across all resources in the format of {cert-manager.io/issuer: "letsencrypt-prod"}. key app is taken
Expand Down
Loading

0 comments on commit 8368722

Please sign in to comment.