Browse Source

Add feature to auto restart nginx periodically

master
parent
commit
064a125e4a
  1. 8
      charts/mailproxy/v0.1.0/templates/nginx-deployment.yaml
  2. 4
      charts/mailproxy/v0.1.0/values.yaml

8
charts/mailproxy/v0.1.0/templates/nginx-deployment.yaml

@ -26,6 +26,14 @@ spec:
{{- toYaml .Values.podSecurityContext | nindent 8 }} {{- toYaml .Values.podSecurityContext | nindent 8 }}
containers: containers:
- name: {{ .Chart.Name }} - name: {{ .Chart.Name }}
args:
- timeout
- --preserve-status
- --foreground
- {{ .Values.nginx.restartEvery }}
- /usr/sbin/nginx
- -g
- daemon off;
securityContext: securityContext:
{{- toYaml .Values.securityContext | nindent 12 }} {{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.nginx.image.repository }}:{{ .Values.nginx.image.tag | default .Chart.AppVersion }}" image: "{{ .Values.nginx.image.repository }}:{{ .Values.nginx.image.tag | default .Chart.AppVersion }}"

4
charts/mailproxy/v0.1.0/values.yaml

@ -26,6 +26,10 @@ nginx:
annotations: {} annotations: {}
loadBalancerIP: "" loadBalancerIP: ""
noAuthSmtpServerIP: "" noAuthSmtpServerIP: ""
# Restart container to reload periodically. A number with a suffix:
# 's' for seconds (default) , 'm' for minutes, 'h' for hours or 'd' for days.
# Specifying 0 disables the timeout.
restartEvery: 30d
certificate: certificate:
issuer: letsencrypt-staging issuer: letsencrypt-staging
issuerKind: ClusterIssuer issuerKind: ClusterIssuer

Loading…
Cancel
Save