Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow charts to have customized liveness and readiness probes #97

Merged
merged 1 commit into from
Sep 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/app-config-frontend/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.0.1
version: 1.0.2

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
16 changes: 15 additions & 1 deletion charts/app-config-frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# app-config-frontend
[![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/app-config-frontend)](https://artifacthub.io/packages/helm/radar-base/app-config-frontend)

![Version: 1.0.1](https://img.shields.io/badge/Version-1.0.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.5.0](https://img.shields.io/badge/AppVersion-0.5.0-informational?style=flat-square)
![Version: 1.0.2](https://img.shields.io/badge/Version-1.0.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.5.0](https://img.shields.io/badge/AppVersion-0.5.0-informational?style=flat-square)

A Helm chart for the frontend application of RADAR-base application config (app-config).

Expand Down Expand Up @@ -56,6 +56,20 @@ A Helm chart for the frontend application of RADAR-base application config (app-
| tolerations | list | `[]` | Toleration labels for pod assignment |
| affinity | object | `{}` | Affinity labels for pod assignment |
| extraEnvVars | list | `[]` | Extra environment variables |
| customLivenessProbe | object | `{}` | Custom livenessProbe that overrides the default one |
| livenessProbe.enabled | bool | `true` | Enable livenessProbe |
| livenessProbe.initialDelaySeconds | int | `60` | Initial delay seconds for livenessProbe |
| livenessProbe.periodSeconds | int | `20` | Period seconds for livenessProbe |
| livenessProbe.timeoutSeconds | int | `5` | Timeout seconds for livenessProbe |
| livenessProbe.successThreshold | int | `1` | Success threshold for livenessProbe |
| livenessProbe.failureThreshold | int | `3` | Failure threshold for livenessProbe |
| customReadinessProbe | object | `{}` | Custom readinessProbe that overrides the default one |
| readinessProbe.enabled | bool | `true` | Enable readinessProbe |
| readinessProbe.initialDelaySeconds | int | `60` | Initial delay seconds for readinessProbe |
| readinessProbe.periodSeconds | int | `20` | Period seconds for readinessProbe |
| readinessProbe.timeoutSeconds | int | `5` | Timeout seconds for readinessProbe |
| readinessProbe.successThreshold | int | `1` | Success threshold for readinessProbe |
| readinessProbe.failureThreshold | int | `3` | Failure threshold for readinessProbe |
| authUrl | string | `"http://localhost/managementportal/oauth"` | Authorization URL of the IDP |
| authCallbackUrl | string | `"http://localhost/appconfig/login"` | Callback URL to where authorization-code should be returned |
| backendUrl | string | `"/appconfig/api"` | Base-URL of the App Config backend service |
18 changes: 18 additions & 0 deletions charts/app-config-frontend/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,32 @@ spec:
- name: http
containerPort: 8080
protocol: TCP
{{- if .Values.customLivenessProbe }}
livenessProbe: {{- .Values.customLivenessProbe | toYaml | nindent 12 }}
{{- else if .Values.livenessProbe.enabled }}
livenessProbe:
httpGet:
path: /appconfig/
port: http
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
successThreshold: {{ .Values.livenessProbe.successThreshold }}
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
{{- end }}
{{- if .Values.customReadinessProbe }}
readinessProbe: {{- .Values.customReadinessProbe | toYaml | nindent 12 }}
{{- else if .Values.readinessProbe.enabled }}
readinessProbe:
httpGet:
path: /appconfig/
port: http
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
successThreshold: {{ .Values.readinessProbe.successThreshold }}
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}

Expand Down
35 changes: 35 additions & 0 deletions charts/app-config-frontend/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,41 @@ extraEnvVars: []
# - name: BEARER_AUTH
# value: true

# -- Custom livenessProbe that overrides the default one
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to clarify that all livenessProbe values are disregarded if this custom livenessProbe is defined. Alternatively, just add the httpGet command to livenessProbe and users can override it, so the yaml is just copied to the deployment?

customLivenessProbe: {}

livenessProbe:
# -- Enable livenessProbe
enabled: true
# -- Initial delay seconds for livenessProbe
initialDelaySeconds: 60
# -- Period seconds for livenessProbe
periodSeconds: 20
# -- Timeout seconds for livenessProbe
timeoutSeconds: 5
# -- Success threshold for livenessProbe
successThreshold: 1
# -- Failure threshold for livenessProbe
failureThreshold: 3

# -- Custom readinessProbe that overrides the default one
customReadinessProbe: {}

readinessProbe:
# -- Enable readinessProbe
enabled: true
# -- Initial delay seconds for readinessProbe
initialDelaySeconds: 60
# -- Period seconds for readinessProbe
periodSeconds: 20
# -- Timeout seconds for readinessProbe
timeoutSeconds: 5
# -- Success threshold for readinessProbe
successThreshold: 1
# -- Failure threshold for readinessProbe
failureThreshold: 3


# -- Authorization URL of the IDP
authUrl: http://localhost/managementportal/oauth
# -- Callback URL to where authorization-code should be returned
Expand Down
2 changes: 1 addition & 1 deletion charts/app-config/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: "0.5.0"
description: A Helm chart for RADAR-base application config (app-config) backend service which is used as mobile app configuration engine with per-project and per-user configuration.
name: app-config
version: 1.0.1
version: 1.0.2
icon: "http://radar-base.org/wp-content/uploads/2022/09/Logo_RADAR-Base-RGB.png"
sources:
- https://github.com/RADAR-base/radar-helm-charts/tree/main/charts/app-config
Expand Down
16 changes: 15 additions & 1 deletion charts/app-config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# app-config
[![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/app-config)](https://artifacthub.io/packages/helm/radar-base/app-config)

![Version: 1.0.1](https://img.shields.io/badge/Version-1.0.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.5.0](https://img.shields.io/badge/AppVersion-0.5.0-informational?style=flat-square)
![Version: 1.0.2](https://img.shields.io/badge/Version-1.0.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.5.0](https://img.shields.io/badge/AppVersion-0.5.0-informational?style=flat-square)

A Helm chart for RADAR-base application config (app-config) backend service which is used as mobile app configuration engine with per-project and per-user configuration.

Expand Down Expand Up @@ -58,6 +58,20 @@ A Helm chart for RADAR-base application config (app-config) backend service whic
| tolerations | list | `[]` | Toleration labels for pod assignment |
| affinity | object | `{}` | Affinity labels for pod assignment |
| extraEnvVars | list | `[]` | Extra environment variables |
| customLivenessProbe | object | `{}` | Custom livenessProbe that overrides the default one |
| livenessProbe.enabled | bool | `true` | Enable livenessProbe |
| livenessProbe.initialDelaySeconds | int | `20` | Initial delay seconds for livenessProbe |
| livenessProbe.periodSeconds | int | `60` | Period seconds for livenessProbe |
| livenessProbe.timeoutSeconds | int | `5` | Timeout seconds for livenessProbe |
| livenessProbe.successThreshold | int | `1` | Success threshold for livenessProbe |
| livenessProbe.failureThreshold | int | `3` | Failure threshold for livenessProbe |
| customReadinessProbe | object | `{}` | Custom readinessProbe that overrides the default one |
| readinessProbe.enabled | bool | `true` | Enable readinessProbe |
| readinessProbe.initialDelaySeconds | int | `20` | Initial delay seconds for readinessProbe |
| readinessProbe.periodSeconds | int | `60` | Period seconds for readinessProbe |
| readinessProbe.timeoutSeconds | int | `5` | Timeout seconds for readinessProbe |
| readinessProbe.successThreshold | int | `1` | Success threshold for readinessProbe |
| readinessProbe.failureThreshold | int | `3` | Failure threshold for readinessProbe |
| javaOpts | string | `"-Xmx550m"` | Standard JAVA_OPTS that should be passed to this service |
| clientId | string | `"radar_appconfig"` | OAuth2 client id |
| clientSecret | string | `"secret"` | OAuth2 client secret |
Expand Down
28 changes: 18 additions & 10 deletions charts/app-config/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,26 +91,34 @@ spec:
- name: hazelcast
containerPort: 5801
protocol: TCP
{{- if .Values.customLivenessProbe }}
livenessProbe: {{- .Values.customLivenessProbe | toYaml | nindent 12 }}
{{- else if .Values.livenessProbe.enabled }}
livenessProbe:
exec:
command:
- /bin/sh
- /etc/radar-app-config/healthcheck.sh
failureThreshold: 3
initialDelaySeconds: 20
periodSeconds: 60
successThreshold: 1
timeoutSeconds: 5
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
successThreshold: {{ .Values.livenessProbe.successThreshold }}
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
{{- end }}
{{- if .Values.customReadinessProbe }}
readinessProbe: {{- .Values.customReadinessProbe | toYaml | nindent 12 }}
{{- else if .Values.readinessProbe.enabled }}
readinessProbe:
exec:
command:
- /bin/sh
- /etc/radar-app-config/healthcheck.sh
failureThreshold: 3
initialDelaySeconds: 20
periodSeconds: 60
successThreshold: 1
timeoutSeconds: 5
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
successThreshold: {{ .Values.readinessProbe.successThreshold }}
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumes:
Expand Down
34 changes: 34 additions & 0 deletions charts/app-config/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,40 @@ extraEnvVars: []
# - name: BEARER_AUTH
# value: true

# -- Custom livenessProbe that overrides the default one
customLivenessProbe: {}

livenessProbe:
# -- Enable livenessProbe
enabled: true
# -- Initial delay seconds for livenessProbe
initialDelaySeconds: 20
# -- Period seconds for livenessProbe
periodSeconds: 60
# -- Timeout seconds for livenessProbe
timeoutSeconds: 5
# -- Success threshold for livenessProbe
successThreshold: 1
# -- Failure threshold for livenessProbe
failureThreshold: 3

# -- Custom readinessProbe that overrides the default one
customReadinessProbe: {}

readinessProbe:
# -- Enable readinessProbe
enabled: true
# -- Initial delay seconds for readinessProbe
initialDelaySeconds: 20
# -- Period seconds for readinessProbe
periodSeconds: 60
# -- Timeout seconds for readinessProbe
timeoutSeconds: 5
# -- Success threshold for readinessProbe
successThreshold: 1
# -- Failure threshold for readinessProbe
failureThreshold: 3

# -- Standard JAVA_OPTS that should be passed to this service
javaOpts: "-Xmx550m"
# -- OAuth2 client id
Expand Down
2 changes: 1 addition & 1 deletion charts/catalog-server/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: "0.8.2"
description: A Helm chart for RADAR-base catalogue server. This application creates RADAR-base topics in Kafka, registers schemas in Schema Registry and keeps a catalog of available source types.
name: catalog-server
version: 0.4.7
version: 0.4.8
icon: "http://radar-base.org/wp-content/uploads/2022/09/Logo_RADAR-Base-RGB.png"
sources:
- https://github.com/RADAR-base/radar-helm-charts/tree/main/charts/catalog-server
Expand Down
16 changes: 15 additions & 1 deletion charts/catalog-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# catalog-server
[![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/catalog-server)](https://artifacthub.io/packages/helm/radar-base/catalog-server)

![Version: 0.4.7](https://img.shields.io/badge/Version-0.4.7-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.8.2](https://img.shields.io/badge/AppVersion-0.8.2-informational?style=flat-square)
![Version: 0.4.8](https://img.shields.io/badge/Version-0.4.8-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.8.2](https://img.shields.io/badge/AppVersion-0.8.2-informational?style=flat-square)

A Helm chart for RADAR-base catalogue server. This application creates RADAR-base topics in Kafka, registers schemas in Schema Registry and keeps a catalog of available source types.

Expand Down Expand Up @@ -51,6 +51,20 @@ A Helm chart for RADAR-base catalogue server. This application creates RADAR-bas
| tolerations | list | `[]` | Toleration labels for pod assignment |
| affinity | object | `{}` | Affinity labels for pod assignment |
| extraEnvVarsInit | list | `[]` | Extra environment variables |
| customLivenessProbe | object | `{}` | Custom livenessProbe that overrides the default one |
| livenessProbe.enabled | bool | `true` | Enable livenessProbe |
| livenessProbe.initialDelaySeconds | int | `5` | Initial delay seconds for livenessProbe |
| livenessProbe.periodSeconds | int | `60` | Period seconds for livenessProbe |
| livenessProbe.timeoutSeconds | int | `5` | Timeout seconds for livenessProbe |
| livenessProbe.successThreshold | int | `1` | Success threshold for livenessProbe |
| livenessProbe.failureThreshold | int | `3` | Failure threshold for livenessProbe |
| customReadinessProbe | object | `{}` | Custom readinessProbe that overrides the default one |
| readinessProbe.enabled | bool | `true` | Enable readinessProbe |
| readinessProbe.initialDelaySeconds | int | `5` | Initial delay seconds for readinessProbe |
| readinessProbe.periodSeconds | int | `60` | Period seconds for readinessProbe |
| readinessProbe.timeoutSeconds | int | `5` | Timeout seconds for readinessProbe |
| readinessProbe.successThreshold | int | `1` | Success threshold for readinessProbe |
| readinessProbe.failureThreshold | int | `3` | Failure threshold for readinessProbe |
| kafka_num_brokers | int | `3` | number of Kafka brokers to look for |
| kafka | string | `"cp-kafka-headless:9092"` | URI of Kafka brokers |
| schema_registry | string | `"http://cp-schema-registry:8081"` | URL of the confluent schema registry |
Expand Down
28 changes: 18 additions & 10 deletions charts/catalog-server/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,24 +107,32 @@ spec:
- name: http
containerPort: 9010
protocol: TCP
{{- if .Values.customLivenessProbe }}
livenessProbe: {{- .Values.customLivenessProbe | toYaml | nindent 12 }}
{{- else if .Values.livenessProbe.enabled }}
livenessProbe:
httpGet:
path: /source-types
port: http
initialDelaySeconds: 5
periodSeconds: 60
timeoutSeconds: 5
successThreshold: 1
failureThreshold: 3
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
successThreshold: {{ .Values.livenessProbe.successThreshold }}
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
{{- end }}
{{- if .Values.customReadinessProbe }}
readinessProbe: {{- .Values.customReadinessProbe | toYaml | nindent 12 }}
{{- else if .Values.readinessProbe.enabled }}
readinessProbe:
httpGet:
path: /source-types
port: http
initialDelaySeconds: 5
periodSeconds: 60
timeoutSeconds: 5
successThreshold: 1
failureThreshold: 3
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
successThreshold: {{ .Values.readinessProbe.successThreshold }}
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
Expand Down
34 changes: 34 additions & 0 deletions charts/catalog-server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,40 @@ extraEnvVarsInit: []
# - name: BEARER_AUTH
# value: true

# -- Custom livenessProbe that overrides the default one
customLivenessProbe: {}

livenessProbe:
# -- Enable livenessProbe
enabled: true
# -- Initial delay seconds for livenessProbe
initialDelaySeconds: 5
# -- Period seconds for livenessProbe
periodSeconds: 60
# -- Timeout seconds for livenessProbe
timeoutSeconds: 5
# -- Success threshold for livenessProbe
successThreshold: 1
# -- Failure threshold for livenessProbe
failureThreshold: 3

# -- Custom readinessProbe that overrides the default one
customReadinessProbe: {}

readinessProbe:
# -- Enable readinessProbe
enabled: true
# -- Initial delay seconds for readinessProbe
initialDelaySeconds: 5
# -- Period seconds for readinessProbe
periodSeconds: 60
# -- Timeout seconds for readinessProbe
timeoutSeconds: 5
# -- Success threshold for readinessProbe
successThreshold: 1
# -- Failure threshold for readinessProbe
failureThreshold: 3

# -- number of Kafka brokers to look for
kafka_num_brokers: 3
# -- URI of Kafka brokers
Expand Down
2 changes: 1 addition & 1 deletion charts/management-portal/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: "2.0.0"
description: A Helm chart for RADAR-Base Management Portal to manage projects and participants throughout RADAR-base.
name: management-portal
version: 1.0.2
version: 1.0.3
icon: "http://radar-base.org/wp-content/uploads/2022/09/Logo_RADAR-Base-RGB.png"
sources:
- https://github.com/RADAR-base/radar-helm-charts/tree/main/charts/management-portal
Expand Down
Loading