From b2f2d5da1560eda2240d12d2ebe2ce983fd3746d Mon Sep 17 00:00:00 2001 From: Andrea Borghi Date: Tue, 28 Mar 2023 13:55:41 +0200 Subject: [PATCH 1/2] Fix 125: add probes again --- Makefile | 2 + tests/expected-common.yaml | 6 +-- tests/expected-datadir.yaml | 84 +++++++++++++++++++++++++++++++++++++ tests/expected-jdbc.yaml | 84 +++++++++++++++++++++++++++++++++++++ values.yaml | 16 +++++-- 5 files changed, 186 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 58a0d1b..4fa750e 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,8 @@ LOCAL_IP ?= $(shell hostname -I | awk '{print $$1}') .PHONY examples-clean: examples-clean: rm -f examples/common/charts/*.tgz + rm -f examples/datadir/charts/*.tgz + rm -f examples/jdbc/charts/*.tgz ${HELM} uninstall gs-cloud-common || /bin/true ${HELM} uninstall gs-cloud-datadir || /bin/true ${HELM} uninstall gs-cloud-jdbc || /bin/true diff --git a/tests/expected-common.yaml b/tests/expected-common.yaml index 1fe372f..41f33e9 100644 --- a/tests/expected-common.yaml +++ b/tests/expected-common.yaml @@ -43,9 +43,9 @@ metadata: app.kubernetes.io/managed-by: Helm type: Opaque data: - rabbitmq-password: "OHVWMUpucElKV2x3UGFEZw==" + rabbitmq-password: "bVFUcDJMNnRhcmdGQ3BYaA==" - rabbitmq-erlang-cookie: "Y0lyNHIwMWtDYUY5N3BoYXpseGpBRmUybWlBcmNHbmQ=" + rabbitmq-erlang-cookie: "eVlGelU5RGJjbWhZTjg1T3JNblRqeE1sNE9qNVZWTTI=" --- # Source: examples-common/templates/cm_db_jndi.yaml # NB: this suppose that a docker postgis container @@ -308,7 +308,7 @@ spec: app.kubernetes.io/managed-by: Helm annotations: checksum/config: fc0b91f081a2da0a894a7149dd689d8172b001c909cc4ddd69dc0756d5a23efe - checksum/secret: 836e2bdb4e1c6a60bfa5c34978da98b872c2cc30fb80a55c7500d8c2cf8f647c + checksum/secret: 590a769fda8661b9184fd19411256e6f0d4d9866a88f4bc91c804744b2261907 spec: serviceAccountName: gs-cloud-common-rabbitmq diff --git a/tests/expected-datadir.yaml b/tests/expected-datadir.yaml index d431734..6853849 100644 --- a/tests/expected-datadir.yaml +++ b/tests/expected-datadir.yaml @@ -1008,6 +1008,18 @@ spec: containerPort: 8080 hostIP: 127.0.0.1 + livenessProbe: + failureThreshold: 10 + httpGet: + path: /actuator/health/liveness + port: health + initialDelaySeconds: 30 + periodSeconds: 10 + readinessProbe: + httpGet: + path: /actuator/health/readiness + port: health + periodSeconds: 5 volumes: - name: cache persistentVolumeClaim: @@ -1111,6 +1123,18 @@ spec: containerPort: 8080 hostIP: 127.0.0.1 + livenessProbe: + failureThreshold: 10 + httpGet: + path: /actuator/health/liveness + port: health + initialDelaySeconds: 30 + periodSeconds: 10 + readinessProbe: + httpGet: + path: /actuator/health/readiness + port: health + periodSeconds: 5 volumes: - name: cache persistentVolumeClaim: @@ -1214,6 +1238,18 @@ spec: containerPort: 8080 hostIP: 127.0.0.1 + livenessProbe: + failureThreshold: 10 + httpGet: + path: /actuator/health/liveness + port: health + initialDelaySeconds: 30 + periodSeconds: 10 + readinessProbe: + httpGet: + path: /actuator/health/readiness + port: health + periodSeconds: 5 volumes: - name: cache persistentVolumeClaim: @@ -1317,6 +1353,18 @@ spec: containerPort: 8080 hostIP: 127.0.0.1 + livenessProbe: + failureThreshold: 10 + httpGet: + path: /actuator/health/liveness + port: health + initialDelaySeconds: 30 + periodSeconds: 10 + readinessProbe: + httpGet: + path: /actuator/health/readiness + port: health + periodSeconds: 5 volumes: - name: cache persistentVolumeClaim: @@ -1420,6 +1468,18 @@ spec: containerPort: 8080 hostIP: 127.0.0.1 + livenessProbe: + failureThreshold: 10 + httpGet: + path: /actuator/health/liveness + port: health + initialDelaySeconds: 30 + periodSeconds: 10 + readinessProbe: + httpGet: + path: /actuator/health/readiness + port: health + periodSeconds: 5 volumes: - name: cache persistentVolumeClaim: @@ -1523,6 +1583,18 @@ spec: containerPort: 8080 hostIP: 127.0.0.1 + livenessProbe: + failureThreshold: 10 + httpGet: + path: /actuator/health/liveness + port: health + initialDelaySeconds: 30 + periodSeconds: 10 + readinessProbe: + httpGet: + path: /actuator/health/readiness + port: health + periodSeconds: 5 volumes: - name: cache persistentVolumeClaim: @@ -1626,6 +1698,18 @@ spec: containerPort: 8080 hostIP: 127.0.0.1 + livenessProbe: + failureThreshold: 10 + httpGet: + path: /actuator/health/liveness + port: health + initialDelaySeconds: 30 + periodSeconds: 10 + readinessProbe: + httpGet: + path: /actuator/health/readiness + port: health + periodSeconds: 5 volumes: - name: cache persistentVolumeClaim: diff --git a/tests/expected-jdbc.yaml b/tests/expected-jdbc.yaml index f122f80..3c82de2 100644 --- a/tests/expected-jdbc.yaml +++ b/tests/expected-jdbc.yaml @@ -1051,6 +1051,18 @@ spec: containerPort: 8080 hostIP: 127.0.0.1 + livenessProbe: + failureThreshold: 10 + httpGet: + path: /actuator/health/liveness + port: health + initialDelaySeconds: 30 + periodSeconds: 10 + readinessProbe: + httpGet: + path: /actuator/health/readiness + port: health + periodSeconds: 5 volumes: - name: cache persistentVolumeClaim: @@ -1179,6 +1191,18 @@ spec: containerPort: 8080 hostIP: 127.0.0.1 + livenessProbe: + failureThreshold: 10 + httpGet: + path: /actuator/health/liveness + port: health + initialDelaySeconds: 30 + periodSeconds: 10 + readinessProbe: + httpGet: + path: /actuator/health/readiness + port: health + periodSeconds: 5 volumes: - name: cache persistentVolumeClaim: @@ -1307,6 +1331,18 @@ spec: containerPort: 8080 hostIP: 127.0.0.1 + livenessProbe: + failureThreshold: 10 + httpGet: + path: /actuator/health/liveness + port: health + initialDelaySeconds: 30 + periodSeconds: 10 + readinessProbe: + httpGet: + path: /actuator/health/readiness + port: health + periodSeconds: 5 volumes: - name: cache persistentVolumeClaim: @@ -1435,6 +1471,18 @@ spec: containerPort: 8080 hostIP: 127.0.0.1 + livenessProbe: + failureThreshold: 10 + httpGet: + path: /actuator/health/liveness + port: health + initialDelaySeconds: 30 + periodSeconds: 10 + readinessProbe: + httpGet: + path: /actuator/health/readiness + port: health + periodSeconds: 5 volumes: - name: cache persistentVolumeClaim: @@ -1563,6 +1611,18 @@ spec: containerPort: 8080 hostIP: 127.0.0.1 + livenessProbe: + failureThreshold: 10 + httpGet: + path: /actuator/health/liveness + port: health + initialDelaySeconds: 30 + periodSeconds: 10 + readinessProbe: + httpGet: + path: /actuator/health/readiness + port: health + periodSeconds: 5 volumes: - name: cache persistentVolumeClaim: @@ -1691,6 +1751,18 @@ spec: containerPort: 8080 hostIP: 127.0.0.1 + livenessProbe: + failureThreshold: 10 + httpGet: + path: /actuator/health/liveness + port: health + initialDelaySeconds: 30 + periodSeconds: 10 + readinessProbe: + httpGet: + path: /actuator/health/readiness + port: health + periodSeconds: 5 volumes: - name: cache persistentVolumeClaim: @@ -1819,6 +1891,18 @@ spec: containerPort: 8080 hostIP: 127.0.0.1 + livenessProbe: + failureThreshold: 10 + httpGet: + path: /actuator/health/liveness + port: health + initialDelaySeconds: 30 + periodSeconds: 10 + readinessProbe: + httpGet: + path: /actuator/health/readiness + port: health + periodSeconds: 5 volumes: - name: cache persistentVolumeClaim: diff --git a/values.yaml b/values.yaml index 000b8a3..bda9c8e 100644 --- a/values.yaml +++ b/values.yaml @@ -19,12 +19,10 @@ volumes: &common-volumes configMap: name: cm-etc-gscloud - volumeMounts: &common-volume-mounts /etc/gscloud: name: vol-etc-gscloud - ports: &common-ports http: containerPort: 8080 @@ -52,7 +50,7 @@ env: &common-env GWC_ENABLED: value: "true" JAVA_OPTS: - value: '-DALLOW_ENV_PARAMETRIZATION=true' + value: '-DALLOW_ENV_PARAMETRIZATION=true -XX:MaxRAMPercentage=80 -XX:InitialRAMPercentage=80' GEOTOOLS_HTTPCLIENT_PROXY_ENABLED: value: "false" # RABBITMQ_PASSWORD: @@ -78,6 +76,18 @@ common-spring-container-stuff: &common-spring-container-stuff <<: *common-volume-mounts env: <<: *common-env + livenessProbe: &geoserver-spring-livenessProbe + httpGet: + path: /actuator/health/liveness + port: health + periodSeconds: 10 + failureThreshold: 10 + initialDelaySeconds: 30 + readinessProbe: &geoserver-spring-readinessProbe + httpGet: + path: /actuator/health/readiness + port: health + periodSeconds: 5 common-generic-stuff: &common-generic-stuff replicaCount: 1 From e7fbaec17414fcc3d573ee58c1c1bb1e7cfb856a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Brunner?= Date: Tue, 28 Mar 2023 14:01:34 +0200 Subject: [PATCH 2/2] Fix pull request check workflow --- .github/workflows/pr-checks.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-checks.yaml b/.github/workflows/pr-checks.yaml index 2979128..9bef144 100644 --- a/.github/workflows/pr-checks.yaml +++ b/.github/workflows/pr-checks.yaml @@ -7,16 +7,17 @@ on: - reopened - labeled - unlabeled - - edit + - edited - synchronize jobs: build: name: Pull request check - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 timeout-minutes: 5 steps: + - run: pip install --upgrade attrs - uses: actions/checkout@v3 - run: echo "${HOME}/.local/bin" >> ${GITHUB_PATH}