Skip to content

Commit

Permalink
Add minReadySeconds & strategy support (#2672)
Browse files Browse the repository at this point in the history
  • Loading branch information
cmk-pcs authored May 18, 2022
1 parent 11c2b24 commit aab63d3
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
2 changes: 2 additions & 0 deletions deployments/helm-chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,8 @@ Parameter | Description | Default
`controller.readyStatus.enable` | Enables the readiness endpoint `"/nginx-ready"`. The endpoint returns a success code when NGINX has loaded all the config after the startup. This also configures a readiness probe for the Ingress Controller pods that uses the readiness endpoint. | true
`controller.readyStatus.port` | The HTTP port for the readiness endpoint. | 8081
`controller.enableLatencyMetrics` | Enable collection of latency metrics for upstreams. Requires `prometheus.create`. | false
`controller.minReadySeconds` | Specifies the minimum number of seconds for which a newly created Pod should be ready without any of its containers crashing, for it to be considered available. [docs](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#min-ready-seconds) | 0
`controller.strategy` | Specifies the strategy used to replace old Pods by new ones. [docs](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy) | {}
`rbac.create` | Configures RBAC. | true
`prometheus.create` | Expose NGINX or NGINX Plus metrics in the Prometheus format. | false
`prometheus.port` | Configures the port to scrape the metrics. | 9113
Expand Down
7 changes: 7 additions & 0 deletions deployments/helm-chart/templates/controller-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -208,3 +208,10 @@ spec:
initContainers: {{ toYaml .Values.controller.initContainers | nindent 8 }}
{{- end }}
{{- end }}
{{- if .Values.controller.strategy }}
updateStrategy:
{{ toYaml .Values.controller.strategy | indent 4 }}
{{- end }}
{{- if .Values.controller.minReadySeconds }}
minReadySeconds: {{ .Values.controller.minReadySeconds }}
{{- end }}
7 changes: 7 additions & 0 deletions deployments/helm-chart/templates/controller-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -207,3 +207,10 @@ spec:
initContainers: {{ toYaml .Values.controller.initContainers | nindent 8 }}
{{- end }}
{{- end }}
{{- if .Values.controller.strategy }}
strategy:
{{ toYaml .Values.controller.strategy | indent 4 }}
{{- end }}
{{- if .Values.controller.minReadySeconds }}
minReadySeconds: {{ .Values.controller.minReadySeconds }}
{{- end }}
6 changes: 6 additions & 0 deletions deployments/helm-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,12 @@ controller:
# image: busybox:1.34
# command: ['sh', '-c', 'echo this is initial setup!']

## The minimum number of seconds for which a newly created Pod should be ready without any of its containers crashing, for it to be considered available.
minReadySeconds: 0

## Strategy used to replace old Pods by new ones. .spec.strategy.type can be "Recreate" or "RollingUpdate". "RollingUpdate" is the default value.
strategy: {}

## Extra containers for the Ingress Controller pods.
extraContainers: []
# - name: container
Expand Down

0 comments on commit aab63d3

Please sign in to comment.