From 99ad472d38446e58a6cfddd71c05b2f56401a330 Mon Sep 17 00:00:00 2001 From: Terry Sigle Date: Wed, 28 Jul 2021 09:07:30 -0500 Subject: [PATCH] Release 0.6.7 (#173) * Closes issue #171. Changing api version based on k8s version * Closes #171. Update to documentation for changed probe details * Closes #170 and #171. Updated release notes and chart definition --- charts/ping-devops/Chart.yaml | 6 +- .../templates/pinglib/_ingress.tpl | 4 + .../templates/pinglib/_workload.tpl | 19 +---- charts/ping-devops/values.yaml | 84 +++++++++++-------- docs/config/container.md | 33 ++++++++ docs/config/probes.md | 30 ------- docs/release-notes.md | 56 +++++++++++++ mkdocs.yml | 1 - 8 files changed, 146 insertions(+), 87 deletions(-) delete mode 100644 docs/config/probes.md diff --git a/charts/ping-devops/Chart.yaml b/charts/ping-devops/Chart.yaml index 65caee43..b0e5df46 100644 --- a/charts/ping-devops/Chart.yaml +++ b/charts/ping-devops/Chart.yaml @@ -4,10 +4,10 @@ apiVersion: v2 name: ping-devops ######################################################################## -# 0.6.6 - Refer to http://helm.pingidentity.com/release-notes/#release-066 +# 0.6.7 - Refer to http://helm.pingidentity.com/release-notes/#release-067 ######################################################################## -version: 0.6.6 -description: Ping Identity product chart with integration +version: 0.6.7 +description: Ping Identity helm charts - 07/28/21 type: application home: https://helm.pingidentity.com/ icon: https://helm.pingidentity.com/img/logos/ping.png diff --git a/charts/ping-devops/templates/pinglib/_ingress.tpl b/charts/ping-devops/templates/pinglib/_ingress.tpl index b271811c..cf021d81 100644 --- a/charts/ping-devops/templates/pinglib/_ingress.tpl +++ b/charts/ping-devops/templates/pinglib/_ingress.tpl @@ -4,7 +4,11 @@ {{- $fullName := include "pinglib.fullname" . -}} {{- $defaultTlsSecret := $v.ingress.defaultTlsSecret -}} {{- $defaultDomain := $v.ingress.defaultDomain -}} +{{- if semverCompare ">1.18" $top.Capabilities.KubeVersion.Version }} +apiVersion: networking.k8s.io/v1 +{{- else }} apiVersion: networking.k8s.io/v1beta1 +{{- end }} kind: Ingress metadata: {{ include "pinglib.metadata.labels" . | nindent 2 }} diff --git a/charts/ping-devops/templates/pinglib/_workload.tpl b/charts/ping-devops/templates/pinglib/_workload.tpl index a91acc60..1fbf77f0 100644 --- a/charts/ping-devops/templates/pinglib/_workload.tpl +++ b/charts/ping-devops/templates/pinglib/_workload.tpl @@ -115,24 +115,7 @@ spec: {{- end }} {{/*--------------------- Probes ---------------------*/}} - {{- with $v.probes }} - livenessProbe: - exec: - command: [ {{ .liveness.command }} ] - initialDelaySeconds: {{ .liveness.initialDelaySeconds }} - periodSeconds: {{ .liveness.periodSeconds }} - timeoutSeconds: {{ .liveness.timeoutSeconds }} - successThreshold: {{ .liveness.successThreshold }} - failureThreshold: {{ .liveness.failureThreshold }} - readinessProbe: - exec: - command: [ {{ .readiness.command }} ] - initialDelaySeconds: {{ .readiness.initialDelaySeconds }} - periodSeconds: {{ .readiness.periodSeconds }} - timeoutSeconds: {{ .readiness.timeoutSeconds }} - successThreshold: {{ .readiness.successThreshold }} - failureThreshold: {{ .readiness.failureThreshold }} - {{- end }} + {{- toYaml $v.container.probes | nindent 8 }} {{/*--------------------- Resources ------------------*/}} resources: {{ toYaml $v.container.resources | nindent 10 }} diff --git a/charts/ping-devops/values.yaml b/charts/ping-devops/values.yaml index d74b6964..4d541f2a 100644 --- a/charts/ping-devops/values.yaml +++ b/charts/ping-devops/values.yaml @@ -314,29 +314,39 @@ global: # exec: # command: ["/bin/sh", "-c", "echo Start Complete > /tmp/message"] - ############################################################ - # Probes - # - # Probes have a number of fields that you can use to more precisely control the - # behavior of liveness and readiness checks. - # - # https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ - ############################################################ - probes: - liveness: - command: /opt/liveness.sh - initialDelaySeconds: 30 - periodSeconds: 30 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 4 - readiness: - command: /opt/liveness.sh - initialDelaySeconds: 30 - periodSeconds: 5 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 4 + ############################################################ + # Probes + # + # Probes have a number of fields that you can use to more precisely control the + # behavior of liveness and readiness checks. + # + # https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ + ############################################################ + probes: + livenessProbe: + exec: + command: + - /opt/liveness.sh + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 5 + successThreshold: 1 + failureThreshold: 4 + readinessProbe: + exec: + command: + - /opt/readiness.sh + initialDelaySeconds: 30 + periodSeconds: 5 + timeoutSeconds: 5 + successThreshold: 1 + failureThreshold: 4 + startupProbe: + exec: + command: + - /opt/liveness.sh + periodSeconds: 10 + failureThreshold: 90 ############################################################ # Licensing @@ -422,11 +432,13 @@ ldap-sdk-tools: container: command: "tail -f /dev/null" - probes: - liveness: - command: echo - readiness: - command: echo + probes: + livenessProbe: + exec: + command: echo + readinessProbe: + exec: + command: echo ############################################################# # pingfederate-admin values @@ -611,6 +623,15 @@ pingdirectory: memory: 8Gi terminationGracePeriodSeconds: 300 + + probes: + readinessProbe: + periodSeconds: 30 + failureThreshold: 4 + startupProbe: + periodSeconds: 10 + failureThreshold: 180 + # Example affinity for typical directory installation # # affinity: @@ -682,13 +703,6 @@ pingdirectory: hosts: - pingdirectory._defaultDomain_ - probes: - liveness: - failureThreshold: 120 - readiness: - periodSeconds: 30 - failureThreshold: 4 - ############################################################# # pingdirectoryproxy values diff --git a/docs/config/container.md b/docs/config/container.md index 7dc12957..c8c31a94 100644 --- a/docs/config/container.md +++ b/docs/config/container.md @@ -27,4 +27,37 @@ global: affinity: {} terminationGracePeriodSeconds: 30 securityContext: {} + probes: + livenessProbe: + exec: + command: + - /opt/liveness.sh + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 5 + successThreshold: 1 + failureThreshold: 4 + readinessProbe: + exec: + command: + - /opt/readiness.sh + initialDelaySeconds: 30 + periodSeconds: 5 + timeoutSeconds: 5 + successThreshold: 1 + failureThreshold: 4 + startupProbe: + exec: + command: + - /opt/liveness.sh + periodSeconds: 10 + failureThreshold: 90 ``` + +## Probes Configuration + +[Kubernetes Probes resources](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/) +to be added to workloads (i.e. Deployments/StatefulSets). + +The definition of parameters can be found at +[probe definitions](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes) \ No newline at end of file diff --git a/docs/config/probes.md b/docs/config/probes.md deleted file mode 100644 index ac534f01..00000000 --- a/docs/config/probes.md +++ /dev/null @@ -1,30 +0,0 @@ -# Probes Configuration - -[Kubernetes Probes resources](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/) -to be added to workloads (i.e. Deployments/StatefulSets). - -## Global Section - -Default yaml defined in the global probes section. - -```yaml -global: - probes: - liveness: - command: /opt/liveness.sh - initialDelaySeconds: 30 - periodSeconds: 30 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 4 - readiness: - command: /opt/liveness.sh - initialDelaySeconds: 30 - periodSeconds: 30 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 4 -``` - -The definition of parameters can be found at -[probe definitions](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes) diff --git a/docs/release-notes.md b/docs/release-notes.md index 9030d19a..e1e28602 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -1,5 +1,61 @@ # Release Notes +## Release 0.6.7 (July 28, 2021) + +* [Issue #170](https://github.com/pingidentity/helm-charts/issues/170) Update Ingress resource kind + + If kubernetes vesion is >1.18, setting the ingress apiVersion to `v1`. Otherwise, current + default will be used `v1beta1`. + +* [Issue #171](https://github.com/pingidentity/helm-charts/issues/171) Reevaluate Lifecycle probes + + Adding startupProble as well as re-organizing how the probes are defined, allowing the deployer to use standard k8s probe definitions out of the box. + + 1. Moving the probes section under global.container + 2. Changing names: (liveness --> livenessProbe, readiness --> readinessProbe) + 3. Adding startupProbe + + The new default looks like: + + ```yaml + ############################################################ + # Probes + # + # Probes have a number of fields that you can use to more precisely control the + # behavior of liveness and readiness checks. + # + # https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ + ############################################################ + probes: + livenessProbe: + exec: + command: + - /opt/liveness.sh + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 5 + successThreshold: 1 + failureThreshold: 4 + readinessProbe: + exec: + command: + - /opt/readiness.sh + initialDelaySeconds: 30 + periodSeconds: 5 + timeoutSeconds: 5 + successThreshold: 1 + failureThreshold: 4 + startupProbe: + exec: + command: + - /opt/liveness.sh + periodSeconds: 10 + failureThreshold: 90 + ``` + + !!! note "Breaking Changes" + This is a breaking change if anyone has overriding probes in their own values file. The fix is simply move their definition of their probes to live under global.container or the (productName).container, as well as adding "Probe" to the definition. + ## Release 0.6.6 (July 7, 2021) * [Issue #160](https://github.com/pingidentity/helm-charts/issues/160) Change default image tag to 2106 diff --git a/mkdocs.yml b/mkdocs.yml index f6084080..70a06e5b 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -49,7 +49,6 @@ nav: - Image: "config/image.md" - Ingress: "config/ingress.md" - License: "config/license.md" - - Probes: "config/probes.md" - PrivateCerts: "config/private-cert.md" - Service: "config/service.md" - Vault: "config/vault.md"