From 5a74ab6641dd41fc3f19b4baba150ee62f4298c6 Mon Sep 17 00:00:00 2001 From: Jose Macchi Date: Tue, 15 Oct 2024 17:15:23 -0300 Subject: [PATCH] HPA example. Upgrade helm-application dependency --- Makefile | 9 + examples/pgconfig-wms-hpa/Chart.yaml | 15 + examples/pgconfig-wms-hpa/README.md | 88 ++ examples/pgconfig-wms-hpa/init-catalog.sh | 38 + examples/pgconfig-wms-hpa/stress-server.sh | 10 + examples/pgconfig-wms-hpa/values.yaml | 119 ++ tests/expected-pgconfig-acl.yaml | 68 +- tests/expected-pgconfig-wms-hpa.yaml | 1461 ++++++++++++++++++++ 8 files changed, 1750 insertions(+), 58 deletions(-) create mode 100644 examples/pgconfig-wms-hpa/Chart.yaml create mode 100644 examples/pgconfig-wms-hpa/README.md create mode 100755 examples/pgconfig-wms-hpa/init-catalog.sh create mode 100755 examples/pgconfig-wms-hpa/stress-server.sh create mode 100644 examples/pgconfig-wms-hpa/values.yaml create mode 100644 tests/expected-pgconfig-wms-hpa.yaml diff --git a/Makefile b/Makefile index d435a65..74d3f5a 100644 --- a/Makefile +++ b/Makefile @@ -8,11 +8,13 @@ examples-clean: rm -f examples/gwcStatefulSet/charts/*.tgz rm -f examples/jdbc/charts/*.tgz rm -f examples/pgconfig-acl/charts/*.tgz + rm -f examples/pgconfig-wms-hpa/charts/*.tgz ${HELM} uninstall gs-cloud-common || /bin/true ${HELM} uninstall gs-cloud-datadir || /bin/true ${HELM} uninstall gs-cloud-statefulset || /bin/true ${HELM} uninstall gs-cloud-jdbc || /bin/true ${HELM} uninstall gs-cloud-pgconfig-acl || /bin/true + ${HELM} uninstall gs-cloud-pgconfig-wms-hpa || /bin/true .PHONY: dependencies @@ -26,11 +28,13 @@ gen-expected: dependencies ${HELM} dependency update examples/jdbc ${HELM} dependency update examples/pgconfig-acl ${HELM} dependency update examples/gwcStatefulSet + ${HELM} dependency update examples/pgconfig-wms-hpa ${HELM} template --namespace=default gs-cloud-common examples/common > tests/expected-common.yaml ${HELM} template --namespace=default gs-cloud-datadir examples/datadir > tests/expected-datadir.yaml ${HELM} template --namespace=default gs-cloud-jdbc examples/jdbc > tests/expected-jdbc.yaml ${HELM} template --namespace=default gs-cloud-pgconfig-acl examples/pgconfig-acl > tests/expected-pgconfig-acl.yaml ${HELM} template --namespace=default gs-cloud-statefulset examples/gwcStatefulSet > tests/expected-statefulset.yaml + ${HELM} template --namespace=default gs-cloud-pgconfig-wms-hpa examples/pgconfig-wms-hpa > tests/expected-pgconfig-wms-hpa.yaml sed -i 's/[[:blank:]]\+$$//g' tests/expected*.yaml .PHONY: example-common @@ -62,3 +66,8 @@ example-common-no-nfs: dependencies example-pgconfig-acl: example-common-no-nfs ${HELM} dependency update examples/pgconfig-acl ${HELM} upgrade --install gs-cloud-pgconfig-acl examples/pgconfig-acl + +.PHONY: example-pgconfig-wms-hpa +example-pgconfig-wms-hpa: example-common-no-nfs + ${HELM} dependency update examples/pgconfig-wms-hpa + ${HELM} upgrade --install gs-cloud-pgconfig-wms-hpa examples/pgconfig-wms-hpa diff --git a/examples/pgconfig-wms-hpa/Chart.yaml b/examples/pgconfig-wms-hpa/Chart.yaml new file mode 100644 index 0000000..3a79c42 --- /dev/null +++ b/examples/pgconfig-wms-hpa/Chart.yaml @@ -0,0 +1,15 @@ +apiVersion: v2 +appVersion: '1.0' +description: Basic example with Horizontal Pod Autoscaling applied to WMS instances in geoserver-cloud using pgconfig as catalog persistence component +name: gs-cloud-hpa +version: 0.1.0 +dependencies: + - name: geoservercloud + repository: file://../../ + version: 0.1.0 + # Postgres dependency used for pgconfig database + # Note: bitnami postgres chart is updated at initialization to add Postgis extension + - name: 'postgresql' + version: 14.0.0 + repository: 'https://charts.bitnami.com/bitnami' + condition: postgresql.enabled diff --git a/examples/pgconfig-wms-hpa/README.md b/examples/pgconfig-wms-hpa/README.md new file mode 100644 index 0000000..edb9bc5 --- /dev/null +++ b/examples/pgconfig-wms-hpa/README.md @@ -0,0 +1,88 @@ +# HPA example + +This example allows to create a very simple GeoserverCloud deployment in your local cluster, which allows to evaluate and understand how Horizontal Pod Autoscaling (HPA) works. + +The setup includes: + +- a unique WebUI instance, (to allow see catalog configuration) +- the gateway, (access to the GeoserverCloud solution) +- 2 WMS instances, (the initial 2 instances which serve the WMS OGC protocol) +- a REST API instance, (used by attached script that allows to create a minimal catalog for testing) +- a local Postgres and (used along with PgConfig profile, since we want to minimize startup time, so we focus on reducing catalog reading) +- RabbitMQ (the bus event communication across instances) + +Following steps mentioned in next section you will be able to see how HPA works automatically (up to 100 containers created!), when the cluster is stressed by the attached script defined for that. + +# Considerations + +- Read documentation in ../README.md file (since for running this demo, it's required to have a local cluster installed, along with kubectl) +- Execution of this kind of tests could freeze your machine, if your hardware/setup is not adequate. +- If in doubt, change values in the HPA section on the values.yaml file, so you can determine which is the value for maxReplicas (by default = 100) + +# Steps + +At repository base folder level, follow next steps: + +1. Execute + +```shell + make example-wms-hpa +``` + +2. Use + +```shell + kubectl get po +``` + +in order to check that all the pods are up and running (that is, all of them with values STATUS = Running and READY = 1/1) +ie. + +```shell +NAME READY STATUS RESTARTS AGE +gs-cloud-pgconfig-wms-hpa-gsc-gateway-76b46b9c7f-gs976 1/1 Running 0 12m +gs-cloud-pgconfig-wms-hpa-postgresql-0 1/1 Running 0 12m +gs-cloud-pgconfig-wms-hpa-gsc-rest-7fdbcf799f-qshn5 1/1 Running 0 12m +gs-cloud-pgconfig-wms-hpa-gsc-webui-6cf8f88695-646xt 1/1 Running 0 12m +gs-cloud-common-rabbitmq-0 1/1 Running 0 12m +gs-cloud-pgconfig-wms-hpa-gsc-wms-758dfd8765-qs946 1/1 Running 0 11m +gs-cloud-pgconfig-wms-hpa-gsc-wms-758dfd8765-pth59 1/1 Running 0 10m +``` + +3. Define a DNS alias (used in scripts to avoid local references. Note: you can edit scripts if you prefer) + +```shell + kubectl get ingress --no-headers gs-cloud-pgconfig-wm-geoserver-host1 | awk '{printf("%s\t%s\n",$4,$3 )}' | sudo tee -a /etc/hosts +``` + +3. Execute + +```shell + ./examples/pgconfig-wms-hpa/init-catalog.sh +``` + +4. Execute + +```shell + watch kubectl get po +``` + +in order to see list of pods (and watch every 2 secs) + +5. In a different console, execute + +```shell + ./examples/pgconfig-wms-hpa/stress-server.sh +``` + +so you will trigger 1000 simultaneous request to the cluster. + +At this point you will be able to see (in console 1) how the list of pods are increased and decreased during execution of the stress-server.sh script. + +6. Execute + +```shell + make examples-clean +``` + +so you get your environment clean, and deployment down. diff --git a/examples/pgconfig-wms-hpa/init-catalog.sh b/examples/pgconfig-wms-hpa/init-catalog.sh new file mode 100755 index 0000000..afe62a6 --- /dev/null +++ b/examples/pgconfig-wms-hpa/init-catalog.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +GEOSERVER_URL="http://gscloud.local/geoserver-cloud" +USER="admin" +PASSWORD="geoserver" + +WORKSPACE="hpa-test" +DATASTORE="swisstopo_wms" +WMS_URL="https://wms.geo.admin.ch/?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities" +LAYER_NAME="ch.bafu.grundwasserkoerper" + +echo -e "\n------------------------------------" +echo -e "Preparing initialization process ..." +curl -u $USER:$PASSWORD -X DELETE "$GEOSERVER_URL/rest/workspaces/$WORKSPACE?recurse=true" + +echo -e "------------------------------------" +echo -e "Creating workspace '$WORKSPACE'..." +if ! curl -u $USER:$PASSWORD -X POST -H "Content-Type: text/xml" -d "$WORKSPACE" $GEOSERVER_URL/rest/workspaces --fail; then + echo -e "Error creating workspace\n" + exit 1 +fi + +echo -e "\n------------------------------------" +echo -e "Creating WMS datastore '$DATASTORE'..." +if ! curl -u $USER:$PASSWORD -X POST -H "Content-Type: text/xml" -d "WMS$DATASTORE$WORKSPACE$WMS_URLtrue" $GEOSERVER_URL/rest/workspaces/$WORKSPACE/wmsstores --fail; then + echo -e "\nError creating datastore" + exit 1 +fi + +echo -e "\n------------------------------------" +echo -e "Publishing layer '$LAYER_NAME' from datastore '$DATASTORE'..." +if ! curl -u $USER:$PASSWORD -X POST -H "Content-Type: text/xml" -d "$LAYER_NAMEraster" $GEOSERVER_URL/rest/workspaces/$WORKSPACE/wmsstores/$DATASTORE/wmslayers --fail; then + echo -e "Error publishing layer\n" + exit 1 +fi + +echo -e "\n------------------------------------" +echo -e "Catalog initialized successfully.\n" diff --git a/examples/pgconfig-wms-hpa/stress-server.sh b/examples/pgconfig-wms-hpa/stress-server.sh new file mode 100755 index 0000000..cd9c8df --- /dev/null +++ b/examples/pgconfig-wms-hpa/stress-server.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +WMS_URL="http://gscloud.local/geoserver-cloud/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&STYLES&LAYERS=hpa-test%3Ach.bafu.grundwasserkoerper&exceptions=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A2056&WIDTH=769&HEIGHT=359&BBOX=2628297.2396917907%2C1161127.5666655225%2C2745623.985655881%2C1215846.1146757442" + +for _ in {1..1000} +do + curl -s "$WMS_URL" > /dev/null & +done + +wait diff --git a/examples/pgconfig-wms-hpa/values.yaml b/examples/pgconfig-wms-hpa/values.yaml new file mode 100644 index 0000000..80872a9 --- /dev/null +++ b/examples/pgconfig-wms-hpa/values.yaml @@ -0,0 +1,119 @@ +postgresql: + enabled: true + global: + postgresql: + auth: + # this should be replaced by your existing secret + # existingSecret: your-secret-name + postgresPassword: g30s3rv3r + +additionalVolumes: &additional-volumes + cache: + emptyDir: {} + +additionalVolumeMounts: &additional-volume-mounts + /mnt/cache: + name: 'cache' + +env: &env-override + PG_PASSWORD: + type: secret + name: 'gs-cloud-pgconfig-wms-hpa-postgresql' + key: 'postgres-password' + RABBITMQ_HOST: + value: 'gs-cloud-common-rabbitmq' + RABBITMQ_USER: + value: 'geoserver' + RABBITMQ_PASSWORD: + type: secret + name: 'gs-cloud-common-rabbitmq' + key: 'rabbitmq-password' + SPRING_PROFILES_ACTIVE: + value: standalone,pgconfig + GEOWEBCACHE_CACHE_DIR: + value: '/mnt/cache' + JAVA_OPTS: + value: '$(JAVA_OPTS_DEFAULT) -XshowSettings:system' + PGCONFIG_HOST: + value: gs-cloud-pgconfig-wms-hpa-postgresql-hl + PGCONFIG_PORT: + value: '5432' + PGCONFIG_DATABASE: + value: postgres + PGCONFIG_SCHEMA: + value: pgconfig + PGCONFIG_USERNAME: + value: postgres + PGCONFIG_PASSWORD: + type: secret + name: 'gs-cloud-pgconfig-wms-hpa-postgresql' + key: 'postgres-password' + PGCONFIG_MAXCONNECTIONS: + value: '10' + +additional-stuff: &additional-stuff + volumes: + <<: *additional-volumes + containers: + spring: + env: + <<: *env-override + volumeMounts: + <<: *additional-volume-mounts + +geoservercloud: + global: + profile: standalone,pgconfig + image: + pullPolicy: IfNotPresent + geoserver: + ingress: + enabled: true + hostGroups: + host1: + tls: + enabled: false + hosts: + - gscloud.local + services: + gateway: + ingress: + enabled: true + <<: *additional-stuff + webui: + <<: *additional-stuff + wms: + replicaCount: 2 + hpa: + enabled: true + minReplicas: 2 + maxReplicas: 100 + metrics: + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: 50 + <<: *additional-stuff + rest: + replicaCount: 1 + <<: *additional-stuff + wcs: + enabled: false + replicaCount: 0 + <<: *additional-stuff + wfs: + enabled: false + replicaCount: 0 + <<: *additional-stuff + gwc: + enabled: false + replicaCount: 0 + <<: *additional-stuff + wps: + enabled: false + replicaCount: 0 + <<: *additional-stuff + acl: + enabled: false diff --git a/tests/expected-pgconfig-acl.yaml b/tests/expected-pgconfig-acl.yaml index 6902bc2..c561c87 100644 --- a/tests/expected-pgconfig-acl.yaml +++ b/tests/expected-pgconfig-acl.yaml @@ -343,7 +343,7 @@ data: RELEASE_NAME: gs-cloud-pgconfig-acl RELEASE_NAMESPACE: default SERVICE_ACL_NAME: gs-cloud-pgconfig-acl-gsc-acl - SERVICE_ACL_CONTAINER_SPRING_IMAGE_TAG: "2.2.0" + SERVICE_ACL_CONTAINER_SPRING_IMAGE_TAG: "2.3.1" SERVICE_GATEWAY_NAME: gs-cloud-pgconfig-acl-gsc-gateway SERVICE_GATEWAY_CONTAINER_SPRING_IMAGE_TAG: "1.8.11" SERVICE_GWC_NAME: gs-cloud-pgconfig-acl-gsc-gwc @@ -689,7 +689,7 @@ spec: securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true - image: "geoservercloud/geoserver-acl:2.2.0" + image: "geoservercloud/geoserver-acl:2.3.1" imagePullPolicy: IfNotPresent env: - name: "ACL_USERS_ADMIN_PASSWORD" @@ -947,8 +947,6 @@ spec: name: vol-local-gscloud - mountPath: /mnt/cache name: cache - - mountPath: /opt/app/data_directory - name: datadir - mountPath: /tmp/ name: tmp-empty-dir @@ -975,11 +973,7 @@ spec: volumes: - name: cache - persistentVolumeClaim: - claimName: gs-cloud-gwc-cache-nfs-claim - - name: datadir - persistentVolumeClaim: - claimName: gs-cloud-datadir-nfs-claim + emptyDir: {} - name: tmp-empty-dir emptyDir: {} - name: vol-local-gscloud @@ -1169,8 +1163,6 @@ spec: name: vol-local-gscloud - mountPath: /mnt/cache name: cache - - mountPath: /opt/app/data_directory - name: datadir - mountPath: /tmp/ name: tmp-empty-dir @@ -1197,11 +1189,7 @@ spec: volumes: - name: cache - persistentVolumeClaim: - claimName: gs-cloud-gwc-cache-nfs-claim - - name: datadir - persistentVolumeClaim: - claimName: gs-cloud-datadir-nfs-claim + emptyDir: {} - name: tmp-empty-dir emptyDir: {} - name: vol-local-gscloud @@ -1392,8 +1380,6 @@ spec: name: vol-local-gscloud - mountPath: /mnt/cache name: cache - - mountPath: /opt/app/data_directory - name: datadir - mountPath: /tmp/ name: tmp-empty-dir @@ -1420,11 +1406,7 @@ spec: volumes: - name: cache - persistentVolumeClaim: - claimName: gs-cloud-gwc-cache-nfs-claim - - name: datadir - persistentVolumeClaim: - claimName: gs-cloud-datadir-nfs-claim + emptyDir: {} - name: tmp-empty-dir emptyDir: {} - name: vol-local-gscloud @@ -1615,8 +1597,6 @@ spec: name: vol-local-gscloud - mountPath: /mnt/cache name: cache - - mountPath: /opt/app/data_directory - name: datadir - mountPath: /tmp/ name: tmp-empty-dir @@ -1643,11 +1623,7 @@ spec: volumes: - name: cache - persistentVolumeClaim: - claimName: gs-cloud-gwc-cache-nfs-claim - - name: datadir - persistentVolumeClaim: - claimName: gs-cloud-datadir-nfs-claim + emptyDir: {} - name: tmp-empty-dir emptyDir: {} - name: vol-local-gscloud @@ -1838,8 +1814,6 @@ spec: name: vol-local-gscloud - mountPath: /mnt/cache name: cache - - mountPath: /opt/app/data_directory - name: datadir - mountPath: /tmp/ name: tmp-empty-dir @@ -1866,11 +1840,7 @@ spec: volumes: - name: cache - persistentVolumeClaim: - claimName: gs-cloud-gwc-cache-nfs-claim - - name: datadir - persistentVolumeClaim: - claimName: gs-cloud-datadir-nfs-claim + emptyDir: {} - name: tmp-empty-dir emptyDir: {} - name: vol-local-gscloud @@ -2061,8 +2031,6 @@ spec: name: vol-local-gscloud - mountPath: /mnt/cache name: cache - - mountPath: /opt/app/data_directory - name: datadir - mountPath: /tmp/ name: tmp-empty-dir @@ -2089,11 +2057,7 @@ spec: volumes: - name: cache - persistentVolumeClaim: - claimName: gs-cloud-gwc-cache-nfs-claim - - name: datadir - persistentVolumeClaim: - claimName: gs-cloud-datadir-nfs-claim + emptyDir: {} - name: tmp-empty-dir emptyDir: {} - name: vol-local-gscloud @@ -2284,8 +2248,6 @@ spec: name: vol-local-gscloud - mountPath: /mnt/cache name: cache - - mountPath: /opt/app/data_directory - name: datadir - mountPath: /tmp/ name: tmp-empty-dir @@ -2312,11 +2274,7 @@ spec: volumes: - name: cache - persistentVolumeClaim: - claimName: gs-cloud-gwc-cache-nfs-claim - - name: datadir - persistentVolumeClaim: - claimName: gs-cloud-datadir-nfs-claim + emptyDir: {} - name: tmp-empty-dir emptyDir: {} - name: vol-local-gscloud @@ -2507,8 +2465,6 @@ spec: name: vol-local-gscloud - mountPath: /mnt/cache name: cache - - mountPath: /opt/app/data_directory - name: datadir - mountPath: /tmp/ name: tmp-empty-dir @@ -2535,11 +2491,7 @@ spec: volumes: - name: cache - persistentVolumeClaim: - claimName: gs-cloud-gwc-cache-nfs-claim - - name: datadir - persistentVolumeClaim: - claimName: gs-cloud-datadir-nfs-claim + emptyDir: {} - name: tmp-empty-dir emptyDir: {} - name: vol-local-gscloud diff --git a/tests/expected-pgconfig-wms-hpa.yaml b/tests/expected-pgconfig-wms-hpa.yaml new file mode 100644 index 0000000..ddb2dc6 --- /dev/null +++ b/tests/expected-pgconfig-wms-hpa.yaml @@ -0,0 +1,1461 @@ +--- +# Source: gs-cloud-hpa/charts/postgresql/templates/primary/networkpolicy.yaml +kind: NetworkPolicy +apiVersion: networking.k8s.io/v1 +metadata: + name: gs-cloud-pgconfig-wms-hpa-postgresql + namespace: "default" + labels: + app.kubernetes.io/instance: gs-cloud-pgconfig-wms-hpa + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: postgresql + app.kubernetes.io/version: 16.1.0 + helm.sh/chart: postgresql-14.0.0 + app.kubernetes.io/component: primary +spec: + podSelector: + matchLabels: + app.kubernetes.io/instance: gs-cloud-pgconfig-wms-hpa + app.kubernetes.io/name: postgresql + app.kubernetes.io/component: primary + policyTypes: + - Ingress + - Egress + egress: + # Allow dns resolution + - ports: + - port: 53 + protocol: UDP + - port: 53 + protocol: TCP + # Allow outbound connections to read-replicas + - ports: + - port: 5432 + - port: 5432 + to: + - podSelector: + matchLabels: + app.kubernetes.io/instance: gs-cloud-pgconfig-wms-hpa + app.kubernetes.io/name: postgresql + app.kubernetes.io/component: read + ingress: + - ports: + - port: 5432 +--- +# Source: gs-cloud-hpa/charts/postgresql/templates/read/networkpolicy.yaml +kind: NetworkPolicy +apiVersion: networking.k8s.io/v1 +metadata: + name: gs-cloud-pgconfig-wms-hpa-postgresql-read + namespace: "default" + labels: + app.kubernetes.io/instance: gs-cloud-pgconfig-wms-hpa + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: postgresql + app.kubernetes.io/version: 16.1.0 + helm.sh/chart: postgresql-14.0.0 + app.kubernetes.io/component: read +spec: + podSelector: + matchLabels: + app.kubernetes.io/instance: gs-cloud-pgconfig-wms-hpa + app.kubernetes.io/name: postgresql + app.kubernetes.io/component: read + policyTypes: + - Ingress + - Egress + egress: + # Allow dns resolution + - ports: + - port: 53 + protocol: UDP + - port: 53 + protocol: TCP + # Allow outbound connections to primary + - ports: + - port: 5432 + - port: 5432 + to: + - podSelector: + matchLabels: + app.kubernetes.io/instance: gs-cloud-pgconfig-wms-hpa + app.kubernetes.io/name: postgresql + app.kubernetes.io/component: primary + ingress: + - ports: + - port: 5432 +--- +# Source: gs-cloud-hpa/charts/geoservercloud/charts/geoserver/templates/pdb.yaml +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: gs-cloud-pgconfig-wms-hpa-gsc-gateway + labels: + helm.sh/chart: geoserver + app.kubernetes.io/version: "1.0" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: gsc + app.kubernetes.io/instance: gs-cloud-pgconfig-wms-hpa + app.kubernetes.io/component: gateway +spec: + maxUnavailable: 1 + selector: + matchLabels: + app.kubernetes.io/name: gsc + app.kubernetes.io/instance: gs-cloud-pgconfig-wms-hpa + app.kubernetes.io/component: gateway +--- +# Source: gs-cloud-hpa/charts/geoservercloud/charts/geoserver/templates/pdb.yaml +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: gs-cloud-pgconfig-wms-hpa-gsc-rest + labels: + helm.sh/chart: geoserver + app.kubernetes.io/version: "1.0" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: gsc + app.kubernetes.io/instance: gs-cloud-pgconfig-wms-hpa + app.kubernetes.io/component: rest +spec: + maxUnavailable: 1 + selector: + matchLabels: + app.kubernetes.io/name: gsc + app.kubernetes.io/instance: gs-cloud-pgconfig-wms-hpa + app.kubernetes.io/component: rest +--- +# Source: gs-cloud-hpa/charts/geoservercloud/charts/geoserver/templates/pdb.yaml +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: gs-cloud-pgconfig-wms-hpa-gsc-webui + labels: + helm.sh/chart: geoserver + app.kubernetes.io/version: "1.0" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: gsc + app.kubernetes.io/instance: gs-cloud-pgconfig-wms-hpa + app.kubernetes.io/component: webui +spec: + maxUnavailable: 1 + selector: + matchLabels: + app.kubernetes.io/name: gsc + app.kubernetes.io/instance: gs-cloud-pgconfig-wms-hpa + app.kubernetes.io/component: webui +--- +# Source: gs-cloud-hpa/charts/geoservercloud/charts/geoserver/templates/pdb.yaml +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: gs-cloud-pgconfig-wms-hpa-gsc-wms + labels: + helm.sh/chart: geoserver + app.kubernetes.io/version: "1.0" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: gsc + app.kubernetes.io/instance: gs-cloud-pgconfig-wms-hpa + app.kubernetes.io/component: wms +spec: + maxUnavailable: 1 + selector: + matchLabels: + app.kubernetes.io/name: gsc + app.kubernetes.io/instance: gs-cloud-pgconfig-wms-hpa + app.kubernetes.io/component: wms +--- +# Source: gs-cloud-hpa/charts/postgresql/templates/serviceaccount.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: gs-cloud-pgconfig-wms-hpa-postgresql + namespace: "default" + labels: + app.kubernetes.io/instance: gs-cloud-pgconfig-wms-hpa + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: postgresql + app.kubernetes.io/version: 16.1.0 + helm.sh/chart: postgresql-14.0.0 +automountServiceAccountToken: false +--- +# Source: gs-cloud-hpa/charts/geoservercloud/charts/geoserver/templates/secret-docker-registry.yaml +apiVersion: v1 +kind: Secret +metadata: + name: gs-cloud-pgconfig-wm-geoserver-dockerregistry + labels: + helm.sh/chart: geoserver + app.kubernetes.io/version: "1.0" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: geoserver + app.kubernetes.io/instance: gs-cloud-pgconfig-wms-hpa + app.kubernetes.io/component: dockerregistry +type: kubernetes.io/dockerconfigjson +data: + .dockerconfigjson: ewogICJhdXRocyI6IHsKICAgICJmaXgtZW5kLWNvbW1hIjogeyJhdXRoIjogIiJ9CiAgfQp9 +--- +# Source: gs-cloud-hpa/charts/postgresql/templates/secrets.yaml +apiVersion: v1 +kind: Secret +metadata: + name: gs-cloud-pgconfig-wms-hpa-postgresql + namespace: "default" + labels: + app.kubernetes.io/instance: gs-cloud-pgconfig-wms-hpa + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: postgresql + app.kubernetes.io/version: 16.1.0 + helm.sh/chart: postgresql-14.0.0 +type: Opaque +data: + postgres-password: "ZzMwczNydjNy" + # We don't auto-generate LDAP password when it's not provided as we do for other passwords +--- +# Source: gs-cloud-hpa/charts/geoservercloud/charts/geoserver/templates/cm_metadata.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: gs-cloud-pgconfig-wm-geoserver-metadata + labels: + helm.sh/chart: geoserver + app.kubernetes.io/version: "1.0" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: geoserver + app.kubernetes.io/instance: gs-cloud-pgconfig-wms-hpa + app.kubernetes.io/component: main +data: + CHART_NAME: geoserver + RELEASE_NAME: gs-cloud-pgconfig-wms-hpa + RELEASE_NAMESPACE: default + SERVICE_ACL_NAME: gs-cloud-pgconfig-wms-hpa-gsc-acl + SERVICE_ACL_CONTAINER_SPRING_IMAGE_TAG: "2.3.1" + SERVICE_GATEWAY_NAME: gs-cloud-pgconfig-wms-hpa-gsc-gateway + SERVICE_GATEWAY_CONTAINER_SPRING_IMAGE_TAG: "1.8.11" + SERVICE_GWC_NAME: gs-cloud-pgconfig-wms-hpa-gsc-gwc + SERVICE_GWC_CONTAINER_SPRING_IMAGE_TAG: "1.8.11" + SERVICE_REST_NAME: gs-cloud-pgconfig-wms-hpa-gsc-rest + SERVICE_REST_CONTAINER_SPRING_IMAGE_TAG: "1.8.11" + SERVICE_WCS_NAME: gs-cloud-pgconfig-wms-hpa-gsc-wcs + SERVICE_WCS_CONTAINER_SPRING_IMAGE_TAG: "1.8.11" + SERVICE_WEBUI_NAME: gs-cloud-pgconfig-wms-hpa-gsc-webui + SERVICE_WEBUI_CONTAINER_SPRING_IMAGE_TAG: "1.8.11" + SERVICE_WFS_NAME: gs-cloud-pgconfig-wms-hpa-gsc-wfs + SERVICE_WFS_CONTAINER_SPRING_IMAGE_TAG: "1.8.11" + SERVICE_WMS_NAME: gs-cloud-pgconfig-wms-hpa-gsc-wms + SERVICE_WMS_CONTAINER_SPRING_IMAGE_TAG: "1.8.11" + SERVICE_WPS_NAME: gs-cloud-pgconfig-wms-hpa-gsc-wps + SERVICE_WPS_CONTAINER_SPRING_IMAGE_TAG: "1.8.11" +--- +# Source: gs-cloud-hpa/charts/geoservercloud/charts/geoserver/templates/service.yaml +apiVersion: v1 +kind: Service +metadata: + name: gs-cloud-pgconfig-wms-hpa-gsc-gateway + labels: + helm.sh/chart: geoserver + app.kubernetes.io/version: "1.0" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: gsc + app.kubernetes.io/instance: gs-cloud-pgconfig-wms-hpa + app.kubernetes.io/component: gateway +spec: + type: ClusterIP + ports: + - name: http + port: 8080 + protocol: TCP + targetPort: http + selector: + app.kubernetes.io/name: gsc + app.kubernetes.io/instance: gs-cloud-pgconfig-wms-hpa + app.kubernetes.io/component: gateway +--- +# Source: gs-cloud-hpa/charts/geoservercloud/charts/geoserver/templates/service.yaml +apiVersion: v1 +kind: Service +metadata: + name: gs-cloud-pgconfig-wms-hpa-gsc-rest + labels: + helm.sh/chart: geoserver + app.kubernetes.io/version: "1.0" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: gsc + app.kubernetes.io/instance: gs-cloud-pgconfig-wms-hpa + app.kubernetes.io/component: rest +spec: + type: ClusterIP + ports: + - name: http + port: 8080 + protocol: TCP + targetPort: http + selector: + app.kubernetes.io/name: gsc + app.kubernetes.io/instance: gs-cloud-pgconfig-wms-hpa + app.kubernetes.io/component: rest +--- +# Source: gs-cloud-hpa/charts/geoservercloud/charts/geoserver/templates/service.yaml +apiVersion: v1 +kind: Service +metadata: + name: gs-cloud-pgconfig-wms-hpa-gsc-webui + labels: + helm.sh/chart: geoserver + app.kubernetes.io/version: "1.0" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: gsc + app.kubernetes.io/instance: gs-cloud-pgconfig-wms-hpa + app.kubernetes.io/component: webui +spec: + type: ClusterIP + ports: + - name: http + port: 8080 + protocol: TCP + targetPort: http + selector: + app.kubernetes.io/name: gsc + app.kubernetes.io/instance: gs-cloud-pgconfig-wms-hpa + app.kubernetes.io/component: webui +--- +# Source: gs-cloud-hpa/charts/geoservercloud/charts/geoserver/templates/service.yaml +apiVersion: v1 +kind: Service +metadata: + name: gs-cloud-pgconfig-wms-hpa-gsc-wms + labels: + helm.sh/chart: geoserver + app.kubernetes.io/version: "1.0" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: gsc + app.kubernetes.io/instance: gs-cloud-pgconfig-wms-hpa + app.kubernetes.io/component: wms +spec: + type: ClusterIP + ports: + - name: http + port: 8080 + protocol: TCP + targetPort: http + selector: + app.kubernetes.io/name: gsc + app.kubernetes.io/instance: gs-cloud-pgconfig-wms-hpa + app.kubernetes.io/component: wms +--- +# Source: gs-cloud-hpa/charts/postgresql/templates/primary/svc-headless.yaml +apiVersion: v1 +kind: Service +metadata: + name: gs-cloud-pgconfig-wms-hpa-postgresql-hl + namespace: "default" + labels: + app.kubernetes.io/instance: gs-cloud-pgconfig-wms-hpa + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: postgresql + app.kubernetes.io/version: 16.1.0 + helm.sh/chart: postgresql-14.0.0 + app.kubernetes.io/component: primary + annotations: + # Use this annotation in addition to the actual publishNotReadyAddresses + # field below because the annotation will stop being respected soon but the + # field is broken in some versions of Kubernetes: + # https://github.com/kubernetes/kubernetes/issues/58662 + service.alpha.kubernetes.io/tolerate-unready-endpoints: "true" +spec: + type: ClusterIP + clusterIP: None + # We want all pods in the StatefulSet to have their addresses published for + # the sake of the other Postgresql pods even before they're ready, since they + # have to be able to talk to each other in order to become ready. + publishNotReadyAddresses: true + ports: + - name: tcp-postgresql + port: 5432 + targetPort: tcp-postgresql + selector: + app.kubernetes.io/instance: gs-cloud-pgconfig-wms-hpa + app.kubernetes.io/name: postgresql + app.kubernetes.io/component: primary +--- +# Source: gs-cloud-hpa/charts/postgresql/templates/primary/svc.yaml +apiVersion: v1 +kind: Service +metadata: + name: gs-cloud-pgconfig-wms-hpa-postgresql + namespace: "default" + labels: + app.kubernetes.io/instance: gs-cloud-pgconfig-wms-hpa + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: postgresql + app.kubernetes.io/version: 16.1.0 + helm.sh/chart: postgresql-14.0.0 + app.kubernetes.io/component: primary +spec: + type: ClusterIP + sessionAffinity: None + ports: + - name: tcp-postgresql + port: 5432 + targetPort: tcp-postgresql + nodePort: null + selector: + app.kubernetes.io/instance: gs-cloud-pgconfig-wms-hpa + app.kubernetes.io/name: postgresql + app.kubernetes.io/component: primary +--- +# Source: gs-cloud-hpa/charts/geoservercloud/charts/geoserver/templates/deployment.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: gs-cloud-pgconfig-wms-hpa-gsc-gateway + labels: + helm.sh/chart: geoserver + app.kubernetes.io/version: "1.0" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: gsc + app.kubernetes.io/instance: gs-cloud-pgconfig-wms-hpa + app.kubernetes.io/component: gateway +spec: + replicas: 1 + revisionHistoryLimit: 3 + strategy: + type: RollingUpdate + selector: + matchLabels: + app.kubernetes.io/name: gsc + app.kubernetes.io/instance: gs-cloud-pgconfig-wms-hpa + app.kubernetes.io/component: gateway + template: + metadata: + labels: + app.kubernetes.io/name: gsc + app.kubernetes.io/instance: gs-cloud-pgconfig-wms-hpa + app.kubernetes.io/component: gateway + spec: + imagePullSecrets: + - name: gs-cloud-pgconfig-wm-geoserver-docker-registry + serviceAccountName: default + securityContext: + {} + containers: + - name: spring + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + image: "geoservercloud/geoserver-cloud-gateway:1.8.11" + imagePullPolicy: IfNotPresent + env: + - name: "ACL_USERNAME" + value: geoserver + - name: "APP_KUBERNETES_IO_COMPONENT" + valueFrom: + fieldRef: + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: "APP_KUBERNETES_IO_INSTANCE" + valueFrom: + fieldRef: + fieldPath: metadata.labels['app.kubernetes.io/instance'] + - name: "APP_KUBERNETES_IO_NAME" + valueFrom: + fieldRef: + fieldPath: metadata.labels['app.kubernetes.io/name'] + - name: "GEOSERVER_BASE_PATH" + value: /geoserver-cloud + - name: "GEOTOOLS_HTTPCLIENT_PROXY_ENABLED" + value: "false" + - name: "GEOWEBCACHE_CACHE_DIR" + value: /mnt/cache + - name: "GWC_ENABLED" + value: "true" + - name: "JAVA_OPTS_DEFAULT" + value: -DALLOW_ENV_PARAMETRIZATION=true -XX:MaxRAMPercentage=80 -XX:InitialRAMPercentage=80 + - name: "PGCONFIG_DATABASE" + value: postgres + - name: "PGCONFIG_HOST" + value: gs-cloud-pgconfig-wms-hpa-postgresql-hl + - name: "PGCONFIG_MAXCONNECTIONS" + value: "10" + - name: "PGCONFIG_PASSWORD" + valueFrom: + secretKeyRef: + name: "gs-cloud-pgconfig-wms-hpa-postgresql" + key: "postgres-password" + - name: "PGCONFIG_PORT" + value: "5432" + - name: "PGCONFIG_SCHEMA" + value: pgconfig + - name: "PGCONFIG_USERNAME" + value: postgres + - name: "PG_PASSWORD" + valueFrom: + secretKeyRef: + name: "gs-cloud-pgconfig-wms-hpa-postgresql" + key: "postgres-password" + - name: "RABBITMQ_HOST" + value: gs-cloud-common-rabbitmq + - name: "RABBITMQ_PASSWORD" + valueFrom: + secretKeyRef: + name: "gs-cloud-common-rabbitmq" + key: "rabbitmq-password" + - name: "RABBITMQ_USER" + value: geoserver + - name: "SERVICE_ACL_NAME" + valueFrom: + configMapKeyRef: + name: gs-cloud-pgconfig-wm-geoserver-metadata + key: "SERVICE_ACL_NAME" + - name: "SERVICE_GATEWAY_NAME" + valueFrom: + configMapKeyRef: + name: gs-cloud-pgconfig-wm-geoserver-metadata + key: "SERVICE_GATEWAY_NAME" + - name: "SERVICE_GWC_NAME" + valueFrom: + configMapKeyRef: + name: gs-cloud-pgconfig-wm-geoserver-metadata + key: "SERVICE_GWC_NAME" + - name: "SERVICE_REST_NAME" + valueFrom: + configMapKeyRef: + name: gs-cloud-pgconfig-wm-geoserver-metadata + key: "SERVICE_REST_NAME" + - name: "SERVICE_WCS_NAME" + valueFrom: + configMapKeyRef: + name: gs-cloud-pgconfig-wm-geoserver-metadata + key: "SERVICE_WCS_NAME" + - name: "SERVICE_WEBUI_NAME" + valueFrom: + configMapKeyRef: + name: gs-cloud-pgconfig-wm-geoserver-metadata + key: "SERVICE_WEBUI_NAME" + - name: "SERVICE_WFS_NAME" + valueFrom: + configMapKeyRef: + name: gs-cloud-pgconfig-wm-geoserver-metadata + key: "SERVICE_WFS_NAME" + - name: "SERVICE_WMS_NAME" + valueFrom: + configMapKeyRef: + name: gs-cloud-pgconfig-wm-geoserver-metadata + key: "SERVICE_WMS_NAME" + - name: "SERVICE_WPS_NAME" + valueFrom: + configMapKeyRef: + name: gs-cloud-pgconfig-wm-geoserver-metadata + key: "SERVICE_WPS_NAME" + - name: "SPRING_PROFILES_ACTIVE" + value: standalone,pgconfig + - name: "ACL_URL" + value: http://$(SERVICE_ACL_NAME):8080/acl/api + - name: "JAVA_OPTS" + value: $(JAVA_OPTS_DEFAULT) -XshowSettings:system + - name: "TARGETS_ACL" + value: http://$(SERVICE_ACL_NAME):8080 + - name: "TARGETS_GWC" + value: http://$(SERVICE_GWC_NAME):8080 + - name: "TARGETS_REST" + value: http://$(SERVICE_REST_NAME):8080 + - name: "TARGETS_WCS" + value: http://$(SERVICE_WCS_NAME):8080 + - name: "TARGETS_WEBUI" + value: http://$(SERVICE_WEBUI_NAME):8080 + - name: "TARGETS_WFS" + value: http://$(SERVICE_WFS_NAME):8080 + - name: "TARGETS_WMS" + value: http://$(SERVICE_WMS_NAME):8080 + - name: "TARGETS_WPS" + value: http://$(SERVICE_WPS_NAME):8080 + terminationMessagePolicy: FallbackToLogsOnError + resources: + limits: + cpu: 4 + memory: 4Gi + requests: + cpu: 0.1 + memory: 512Mi + volumeMounts: + - mountPath: /etc/localconfig + name: vol-local-gscloud + - mountPath: /mnt/cache + name: cache + - mountPath: /tmp/ + name: tmp-empty-dir + + ports: + - name: health + containerPort: 8081 + hostIP: 127.0.0.1 + - name: http + containerPort: 8080 + hostIP: 127.0.0.1 + + livenessProbe: + failureThreshold: 10 + httpGet: + path: /actuator/health/liveness + port: health + initialDelaySeconds: 60 + periodSeconds: 10 + readinessProbe: + httpGet: + path: /actuator/health/readiness + port: health + periodSeconds: 5 + + volumes: + - name: cache + emptyDir: {} + - name: tmp-empty-dir + emptyDir: {} + - name: vol-local-gscloud + emptyDir: {} +--- +# Source: gs-cloud-hpa/charts/geoservercloud/charts/geoserver/templates/deployment.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: gs-cloud-pgconfig-wms-hpa-gsc-rest + labels: + helm.sh/chart: geoserver + app.kubernetes.io/version: "1.0" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: gsc + app.kubernetes.io/instance: gs-cloud-pgconfig-wms-hpa + app.kubernetes.io/component: rest +spec: + replicas: 1 + revisionHistoryLimit: 3 + strategy: + type: RollingUpdate + selector: + matchLabels: + app.kubernetes.io/name: gsc + app.kubernetes.io/instance: gs-cloud-pgconfig-wms-hpa + app.kubernetes.io/component: rest + template: + metadata: + labels: + app.kubernetes.io/name: gsc + app.kubernetes.io/instance: gs-cloud-pgconfig-wms-hpa + app.kubernetes.io/component: rest + spec: + imagePullSecrets: + - name: gs-cloud-pgconfig-wm-geoserver-docker-registry + serviceAccountName: default + securityContext: + {} + containers: + - name: spring + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + image: "geoservercloud/geoserver-cloud-rest:1.8.11" + imagePullPolicy: IfNotPresent + env: + - name: "ACL_USERNAME" + value: geoserver + - name: "APP_KUBERNETES_IO_COMPONENT" + valueFrom: + fieldRef: + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: "APP_KUBERNETES_IO_INSTANCE" + valueFrom: + fieldRef: + fieldPath: metadata.labels['app.kubernetes.io/instance'] + - name: "APP_KUBERNETES_IO_NAME" + valueFrom: + fieldRef: + fieldPath: metadata.labels['app.kubernetes.io/name'] + - name: "GEOSERVER_BASE_PATH" + value: /geoserver-cloud + - name: "GEOTOOLS_HTTPCLIENT_PROXY_ENABLED" + value: "false" + - name: "GEOWEBCACHE_CACHE_DIR" + value: /mnt/cache + - name: "GWC_ENABLED" + value: "true" + - name: "JAVA_OPTS_DEFAULT" + value: -DALLOW_ENV_PARAMETRIZATION=true -XX:MaxRAMPercentage=80 -XX:InitialRAMPercentage=80 + - name: "PGCONFIG_DATABASE" + value: postgres + - name: "PGCONFIG_HOST" + value: gs-cloud-pgconfig-wms-hpa-postgresql-hl + - name: "PGCONFIG_MAXCONNECTIONS" + value: "10" + - name: "PGCONFIG_PASSWORD" + valueFrom: + secretKeyRef: + name: "gs-cloud-pgconfig-wms-hpa-postgresql" + key: "postgres-password" + - name: "PGCONFIG_PORT" + value: "5432" + - name: "PGCONFIG_SCHEMA" + value: pgconfig + - name: "PGCONFIG_USERNAME" + value: postgres + - name: "PG_PASSWORD" + valueFrom: + secretKeyRef: + name: "gs-cloud-pgconfig-wms-hpa-postgresql" + key: "postgres-password" + - name: "RABBITMQ_HOST" + value: gs-cloud-common-rabbitmq + - name: "RABBITMQ_PASSWORD" + valueFrom: + secretKeyRef: + name: "gs-cloud-common-rabbitmq" + key: "rabbitmq-password" + - name: "RABBITMQ_USER" + value: geoserver + - name: "SERVICE_ACL_NAME" + valueFrom: + configMapKeyRef: + name: gs-cloud-pgconfig-wm-geoserver-metadata + key: "SERVICE_ACL_NAME" + - name: "SERVICE_GATEWAY_NAME" + valueFrom: + configMapKeyRef: + name: gs-cloud-pgconfig-wm-geoserver-metadata + key: "SERVICE_GATEWAY_NAME" + - name: "SERVICE_GWC_NAME" + valueFrom: + configMapKeyRef: + name: gs-cloud-pgconfig-wm-geoserver-metadata + key: "SERVICE_GWC_NAME" + - name: "SERVICE_REST_NAME" + valueFrom: + configMapKeyRef: + name: gs-cloud-pgconfig-wm-geoserver-metadata + key: "SERVICE_REST_NAME" + - name: "SERVICE_WCS_NAME" + valueFrom: + configMapKeyRef: + name: gs-cloud-pgconfig-wm-geoserver-metadata + key: "SERVICE_WCS_NAME" + - name: "SERVICE_WEBUI_NAME" + valueFrom: + configMapKeyRef: + name: gs-cloud-pgconfig-wm-geoserver-metadata + key: "SERVICE_WEBUI_NAME" + - name: "SERVICE_WFS_NAME" + valueFrom: + configMapKeyRef: + name: gs-cloud-pgconfig-wm-geoserver-metadata + key: "SERVICE_WFS_NAME" + - name: "SERVICE_WMS_NAME" + valueFrom: + configMapKeyRef: + name: gs-cloud-pgconfig-wm-geoserver-metadata + key: "SERVICE_WMS_NAME" + - name: "SERVICE_WPS_NAME" + valueFrom: + configMapKeyRef: + name: gs-cloud-pgconfig-wm-geoserver-metadata + key: "SERVICE_WPS_NAME" + - name: "SPRING_PROFILES_ACTIVE" + value: standalone,pgconfig + - name: "ACL_URL" + value: http://$(SERVICE_ACL_NAME):8080/acl/api + - name: "JAVA_OPTS" + value: $(JAVA_OPTS_DEFAULT) -XshowSettings:system + - name: "TARGETS_ACL" + value: http://$(SERVICE_ACL_NAME):8080 + - name: "TARGETS_GWC" + value: http://$(SERVICE_GWC_NAME):8080 + - name: "TARGETS_REST" + value: http://$(SERVICE_REST_NAME):8080 + - name: "TARGETS_WCS" + value: http://$(SERVICE_WCS_NAME):8080 + - name: "TARGETS_WEBUI" + value: http://$(SERVICE_WEBUI_NAME):8080 + - name: "TARGETS_WFS" + value: http://$(SERVICE_WFS_NAME):8080 + - name: "TARGETS_WMS" + value: http://$(SERVICE_WMS_NAME):8080 + - name: "TARGETS_WPS" + value: http://$(SERVICE_WPS_NAME):8080 + terminationMessagePolicy: FallbackToLogsOnError + resources: + limits: + cpu: 4 + memory: 4Gi + requests: + cpu: 0.1 + memory: 512Mi + volumeMounts: + - mountPath: /etc/localconfig + name: vol-local-gscloud + - mountPath: /mnt/cache + name: cache + - mountPath: /tmp/ + name: tmp-empty-dir + + ports: + - name: health + containerPort: 8081 + hostIP: 127.0.0.1 + - name: http + containerPort: 8080 + hostIP: 127.0.0.1 + + livenessProbe: + failureThreshold: 10 + httpGet: + path: /actuator/health/liveness + port: health + initialDelaySeconds: 60 + periodSeconds: 10 + readinessProbe: + httpGet: + path: /actuator/health/readiness + port: health + periodSeconds: 5 + + volumes: + - name: cache + emptyDir: {} + - name: tmp-empty-dir + emptyDir: {} + - name: vol-local-gscloud + emptyDir: {} +--- +# Source: gs-cloud-hpa/charts/geoservercloud/charts/geoserver/templates/deployment.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: gs-cloud-pgconfig-wms-hpa-gsc-webui + labels: + helm.sh/chart: geoserver + app.kubernetes.io/version: "1.0" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: gsc + app.kubernetes.io/instance: gs-cloud-pgconfig-wms-hpa + app.kubernetes.io/component: webui +spec: + replicas: 1 + revisionHistoryLimit: 3 + strategy: + type: RollingUpdate + selector: + matchLabels: + app.kubernetes.io/name: gsc + app.kubernetes.io/instance: gs-cloud-pgconfig-wms-hpa + app.kubernetes.io/component: webui + template: + metadata: + labels: + app.kubernetes.io/name: gsc + app.kubernetes.io/instance: gs-cloud-pgconfig-wms-hpa + app.kubernetes.io/component: webui + spec: + imagePullSecrets: + - name: gs-cloud-pgconfig-wm-geoserver-docker-registry + serviceAccountName: default + securityContext: + {} + containers: + - name: spring + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + image: "geoservercloud/geoserver-cloud-webui:1.8.11" + imagePullPolicy: IfNotPresent + env: + - name: "ACL_USERNAME" + value: geoserver + - name: "APP_KUBERNETES_IO_COMPONENT" + valueFrom: + fieldRef: + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: "APP_KUBERNETES_IO_INSTANCE" + valueFrom: + fieldRef: + fieldPath: metadata.labels['app.kubernetes.io/instance'] + - name: "APP_KUBERNETES_IO_NAME" + valueFrom: + fieldRef: + fieldPath: metadata.labels['app.kubernetes.io/name'] + - name: "GEOSERVER_BASE_PATH" + value: /geoserver-cloud + - name: "GEOTOOLS_HTTPCLIENT_PROXY_ENABLED" + value: "false" + - name: "GEOWEBCACHE_CACHE_DIR" + value: /mnt/cache + - name: "GWC_ENABLED" + value: "true" + - name: "JAVA_OPTS_DEFAULT" + value: -DALLOW_ENV_PARAMETRIZATION=true -XX:MaxRAMPercentage=80 -XX:InitialRAMPercentage=80 + - name: "PGCONFIG_DATABASE" + value: postgres + - name: "PGCONFIG_HOST" + value: gs-cloud-pgconfig-wms-hpa-postgresql-hl + - name: "PGCONFIG_MAXCONNECTIONS" + value: "10" + - name: "PGCONFIG_PASSWORD" + valueFrom: + secretKeyRef: + name: "gs-cloud-pgconfig-wms-hpa-postgresql" + key: "postgres-password" + - name: "PGCONFIG_PORT" + value: "5432" + - name: "PGCONFIG_SCHEMA" + value: pgconfig + - name: "PGCONFIG_USERNAME" + value: postgres + - name: "PG_PASSWORD" + valueFrom: + secretKeyRef: + name: "gs-cloud-pgconfig-wms-hpa-postgresql" + key: "postgres-password" + - name: "RABBITMQ_HOST" + value: gs-cloud-common-rabbitmq + - name: "RABBITMQ_PASSWORD" + valueFrom: + secretKeyRef: + name: "gs-cloud-common-rabbitmq" + key: "rabbitmq-password" + - name: "RABBITMQ_USER" + value: geoserver + - name: "SERVICE_ACL_NAME" + valueFrom: + configMapKeyRef: + name: gs-cloud-pgconfig-wm-geoserver-metadata + key: "SERVICE_ACL_NAME" + - name: "SERVICE_GATEWAY_NAME" + valueFrom: + configMapKeyRef: + name: gs-cloud-pgconfig-wm-geoserver-metadata + key: "SERVICE_GATEWAY_NAME" + - name: "SERVICE_GWC_NAME" + valueFrom: + configMapKeyRef: + name: gs-cloud-pgconfig-wm-geoserver-metadata + key: "SERVICE_GWC_NAME" + - name: "SERVICE_REST_NAME" + valueFrom: + configMapKeyRef: + name: gs-cloud-pgconfig-wm-geoserver-metadata + key: "SERVICE_REST_NAME" + - name: "SERVICE_WCS_NAME" + valueFrom: + configMapKeyRef: + name: gs-cloud-pgconfig-wm-geoserver-metadata + key: "SERVICE_WCS_NAME" + - name: "SERVICE_WEBUI_NAME" + valueFrom: + configMapKeyRef: + name: gs-cloud-pgconfig-wm-geoserver-metadata + key: "SERVICE_WEBUI_NAME" + - name: "SERVICE_WFS_NAME" + valueFrom: + configMapKeyRef: + name: gs-cloud-pgconfig-wm-geoserver-metadata + key: "SERVICE_WFS_NAME" + - name: "SERVICE_WMS_NAME" + valueFrom: + configMapKeyRef: + name: gs-cloud-pgconfig-wm-geoserver-metadata + key: "SERVICE_WMS_NAME" + - name: "SERVICE_WPS_NAME" + valueFrom: + configMapKeyRef: + name: gs-cloud-pgconfig-wm-geoserver-metadata + key: "SERVICE_WPS_NAME" + - name: "SPRING_PROFILES_ACTIVE" + value: standalone,pgconfig + - name: "ACL_URL" + value: http://$(SERVICE_ACL_NAME):8080/acl/api + - name: "JAVA_OPTS" + value: $(JAVA_OPTS_DEFAULT) -XshowSettings:system + - name: "TARGETS_ACL" + value: http://$(SERVICE_ACL_NAME):8080 + - name: "TARGETS_GWC" + value: http://$(SERVICE_GWC_NAME):8080 + - name: "TARGETS_REST" + value: http://$(SERVICE_REST_NAME):8080 + - name: "TARGETS_WCS" + value: http://$(SERVICE_WCS_NAME):8080 + - name: "TARGETS_WEBUI" + value: http://$(SERVICE_WEBUI_NAME):8080 + - name: "TARGETS_WFS" + value: http://$(SERVICE_WFS_NAME):8080 + - name: "TARGETS_WMS" + value: http://$(SERVICE_WMS_NAME):8080 + - name: "TARGETS_WPS" + value: http://$(SERVICE_WPS_NAME):8080 + terminationMessagePolicy: FallbackToLogsOnError + resources: + limits: + cpu: 4 + memory: 4Gi + requests: + cpu: 0.1 + memory: 512Mi + volumeMounts: + - mountPath: /etc/localconfig + name: vol-local-gscloud + - mountPath: /mnt/cache + name: cache + - mountPath: /tmp/ + name: tmp-empty-dir + + ports: + - name: health + containerPort: 8081 + hostIP: 127.0.0.1 + - name: http + containerPort: 8080 + hostIP: 127.0.0.1 + + livenessProbe: + failureThreshold: 10 + httpGet: + path: /actuator/health/liveness + port: health + initialDelaySeconds: 60 + periodSeconds: 10 + readinessProbe: + httpGet: + path: /actuator/health/readiness + port: health + periodSeconds: 5 + + volumes: + - name: cache + emptyDir: {} + - name: tmp-empty-dir + emptyDir: {} + - name: vol-local-gscloud + emptyDir: {} +--- +# Source: gs-cloud-hpa/charts/geoservercloud/charts/geoserver/templates/deployment.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: gs-cloud-pgconfig-wms-hpa-gsc-wms + labels: + helm.sh/chart: geoserver + app.kubernetes.io/version: "1.0" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: gsc + app.kubernetes.io/instance: gs-cloud-pgconfig-wms-hpa + app.kubernetes.io/component: wms +spec: + replicas: 2 + revisionHistoryLimit: 3 + strategy: + type: RollingUpdate + selector: + matchLabels: + app.kubernetes.io/name: gsc + app.kubernetes.io/instance: gs-cloud-pgconfig-wms-hpa + app.kubernetes.io/component: wms + template: + metadata: + labels: + app.kubernetes.io/name: gsc + app.kubernetes.io/instance: gs-cloud-pgconfig-wms-hpa + app.kubernetes.io/component: wms + spec: + imagePullSecrets: + - name: gs-cloud-pgconfig-wm-geoserver-docker-registry + serviceAccountName: default + securityContext: + {} + containers: + - name: spring + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + image: "geoservercloud/geoserver-cloud-wms:1.8.11" + imagePullPolicy: IfNotPresent + env: + - name: "ACL_USERNAME" + value: geoserver + - name: "APP_KUBERNETES_IO_COMPONENT" + valueFrom: + fieldRef: + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: "APP_KUBERNETES_IO_INSTANCE" + valueFrom: + fieldRef: + fieldPath: metadata.labels['app.kubernetes.io/instance'] + - name: "APP_KUBERNETES_IO_NAME" + valueFrom: + fieldRef: + fieldPath: metadata.labels['app.kubernetes.io/name'] + - name: "GEOSERVER_BASE_PATH" + value: /geoserver-cloud + - name: "GEOTOOLS_HTTPCLIENT_PROXY_ENABLED" + value: "false" + - name: "GEOWEBCACHE_CACHE_DIR" + value: /mnt/cache + - name: "GWC_ENABLED" + value: "true" + - name: "JAVA_OPTS_DEFAULT" + value: -DALLOW_ENV_PARAMETRIZATION=true -XX:MaxRAMPercentage=80 -XX:InitialRAMPercentage=80 + - name: "PGCONFIG_DATABASE" + value: postgres + - name: "PGCONFIG_HOST" + value: gs-cloud-pgconfig-wms-hpa-postgresql-hl + - name: "PGCONFIG_MAXCONNECTIONS" + value: "10" + - name: "PGCONFIG_PASSWORD" + valueFrom: + secretKeyRef: + name: "gs-cloud-pgconfig-wms-hpa-postgresql" + key: "postgres-password" + - name: "PGCONFIG_PORT" + value: "5432" + - name: "PGCONFIG_SCHEMA" + value: pgconfig + - name: "PGCONFIG_USERNAME" + value: postgres + - name: "PG_PASSWORD" + valueFrom: + secretKeyRef: + name: "gs-cloud-pgconfig-wms-hpa-postgresql" + key: "postgres-password" + - name: "RABBITMQ_HOST" + value: gs-cloud-common-rabbitmq + - name: "RABBITMQ_PASSWORD" + valueFrom: + secretKeyRef: + name: "gs-cloud-common-rabbitmq" + key: "rabbitmq-password" + - name: "RABBITMQ_USER" + value: geoserver + - name: "SERVICE_ACL_NAME" + valueFrom: + configMapKeyRef: + name: gs-cloud-pgconfig-wm-geoserver-metadata + key: "SERVICE_ACL_NAME" + - name: "SERVICE_GATEWAY_NAME" + valueFrom: + configMapKeyRef: + name: gs-cloud-pgconfig-wm-geoserver-metadata + key: "SERVICE_GATEWAY_NAME" + - name: "SERVICE_GWC_NAME" + valueFrom: + configMapKeyRef: + name: gs-cloud-pgconfig-wm-geoserver-metadata + key: "SERVICE_GWC_NAME" + - name: "SERVICE_REST_NAME" + valueFrom: + configMapKeyRef: + name: gs-cloud-pgconfig-wm-geoserver-metadata + key: "SERVICE_REST_NAME" + - name: "SERVICE_WCS_NAME" + valueFrom: + configMapKeyRef: + name: gs-cloud-pgconfig-wm-geoserver-metadata + key: "SERVICE_WCS_NAME" + - name: "SERVICE_WEBUI_NAME" + valueFrom: + configMapKeyRef: + name: gs-cloud-pgconfig-wm-geoserver-metadata + key: "SERVICE_WEBUI_NAME" + - name: "SERVICE_WFS_NAME" + valueFrom: + configMapKeyRef: + name: gs-cloud-pgconfig-wm-geoserver-metadata + key: "SERVICE_WFS_NAME" + - name: "SERVICE_WMS_NAME" + valueFrom: + configMapKeyRef: + name: gs-cloud-pgconfig-wm-geoserver-metadata + key: "SERVICE_WMS_NAME" + - name: "SERVICE_WPS_NAME" + valueFrom: + configMapKeyRef: + name: gs-cloud-pgconfig-wm-geoserver-metadata + key: "SERVICE_WPS_NAME" + - name: "SPRING_PROFILES_ACTIVE" + value: standalone,pgconfig + - name: "ACL_URL" + value: http://$(SERVICE_ACL_NAME):8080/acl/api + - name: "JAVA_OPTS" + value: $(JAVA_OPTS_DEFAULT) -XshowSettings:system + - name: "TARGETS_ACL" + value: http://$(SERVICE_ACL_NAME):8080 + - name: "TARGETS_GWC" + value: http://$(SERVICE_GWC_NAME):8080 + - name: "TARGETS_REST" + value: http://$(SERVICE_REST_NAME):8080 + - name: "TARGETS_WCS" + value: http://$(SERVICE_WCS_NAME):8080 + - name: "TARGETS_WEBUI" + value: http://$(SERVICE_WEBUI_NAME):8080 + - name: "TARGETS_WFS" + value: http://$(SERVICE_WFS_NAME):8080 + - name: "TARGETS_WMS" + value: http://$(SERVICE_WMS_NAME):8080 + - name: "TARGETS_WPS" + value: http://$(SERVICE_WPS_NAME):8080 + terminationMessagePolicy: FallbackToLogsOnError + resources: + limits: + cpu: 4 + memory: 4Gi + requests: + cpu: 0.1 + memory: 512Mi + volumeMounts: + - mountPath: /etc/localconfig + name: vol-local-gscloud + - mountPath: /mnt/cache + name: cache + - mountPath: /tmp/ + name: tmp-empty-dir + + ports: + - name: health + containerPort: 8081 + hostIP: 127.0.0.1 + - name: http + containerPort: 8080 + hostIP: 127.0.0.1 + + livenessProbe: + failureThreshold: 10 + httpGet: + path: /actuator/health/liveness + port: health + initialDelaySeconds: 60 + periodSeconds: 10 + readinessProbe: + httpGet: + path: /actuator/health/readiness + port: health + periodSeconds: 5 + + volumes: + - name: cache + emptyDir: {} + - name: tmp-empty-dir + emptyDir: {} + - name: vol-local-gscloud + emptyDir: {} +--- +# Source: gs-cloud-hpa/charts/geoservercloud/charts/geoserver/templates/hpa.yaml +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: gs-cloud-pgconfig-wms-hpa-gsc-wms + labels: + helm.sh/chart: geoserver + app.kubernetes.io/version: "1.0" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: gsc + app.kubernetes.io/instance: gs-cloud-pgconfig-wms-hpa + app.kubernetes.io/component: wms +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: gs-cloud-pgconfig-wms-hpa-gsc-wms + minReplicas: 2 + maxReplicas: 100 + metrics: + - resource: + name: cpu + target: + averageUtilization: 50 + type: Utilization + type: Resource +--- +# Source: gs-cloud-hpa/charts/postgresql/templates/primary/statefulset.yaml +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: gs-cloud-pgconfig-wms-hpa-postgresql + namespace: "default" + labels: + app.kubernetes.io/instance: gs-cloud-pgconfig-wms-hpa + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: postgresql + app.kubernetes.io/version: 16.1.0 + helm.sh/chart: postgresql-14.0.0 + app.kubernetes.io/component: primary +spec: + replicas: 1 + serviceName: gs-cloud-pgconfig-wms-hpa-postgresql-hl + updateStrategy: + rollingUpdate: {} + type: RollingUpdate + selector: + matchLabels: + app.kubernetes.io/instance: gs-cloud-pgconfig-wms-hpa + app.kubernetes.io/name: postgresql + app.kubernetes.io/component: primary + template: + metadata: + name: gs-cloud-pgconfig-wms-hpa-postgresql + labels: + app.kubernetes.io/instance: gs-cloud-pgconfig-wms-hpa + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: postgresql + app.kubernetes.io/version: 16.1.0 + helm.sh/chart: postgresql-14.0.0 + app.kubernetes.io/component: primary + spec: + serviceAccountName: gs-cloud-pgconfig-wms-hpa-postgresql + + automountServiceAccountToken: false + affinity: + podAffinity: + + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - podAffinityTerm: + labelSelector: + matchLabels: + app.kubernetes.io/instance: gs-cloud-pgconfig-wms-hpa + app.kubernetes.io/name: postgresql + app.kubernetes.io/component: primary + topologyKey: kubernetes.io/hostname + weight: 1 + nodeAffinity: + + securityContext: + fsGroup: 1001 + fsGroupChangePolicy: Always + supplementalGroups: [] + sysctls: [] + hostNetwork: false + hostIPC: false + containers: + - name: postgresql + image: docker.io/bitnami/postgresql:16.1.0-debian-11-r25 + imagePullPolicy: "IfNotPresent" + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + privileged: false + readOnlyRootFilesystem: false + runAsNonRoot: true + runAsUser: 1001 + seccompProfile: + type: RuntimeDefault + env: + - name: BITNAMI_DEBUG + value: "false" + - name: POSTGRESQL_PORT_NUMBER + value: "5432" + - name: POSTGRESQL_VOLUME_DIR + value: "/bitnami/postgresql" + - name: PGDATA + value: "/bitnami/postgresql/data" + # Authentication + - name: POSTGRES_PASSWORD + valueFrom: + secretKeyRef: + name: gs-cloud-pgconfig-wms-hpa-postgresql + key: postgres-password + # Replication + # Initdb + # Standby + # LDAP + - name: POSTGRESQL_ENABLE_LDAP + value: "no" + # TLS + - name: POSTGRESQL_ENABLE_TLS + value: "no" + # Audit + - name: POSTGRESQL_LOG_HOSTNAME + value: "false" + - name: POSTGRESQL_LOG_CONNECTIONS + value: "false" + - name: POSTGRESQL_LOG_DISCONNECTIONS + value: "false" + - name: POSTGRESQL_PGAUDIT_LOG_CATALOG + value: "off" + # Others + - name: POSTGRESQL_CLIENT_MIN_MESSAGES + value: "error" + - name: POSTGRESQL_SHARED_PRELOAD_LIBRARIES + value: "pgaudit" + ports: + - name: tcp-postgresql + containerPort: 5432 + livenessProbe: + failureThreshold: 6 + initialDelaySeconds: 30 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 + exec: + command: + - /bin/sh + - -c + - exec pg_isready -U "postgres" -h 127.0.0.1 -p 5432 + readinessProbe: + failureThreshold: 6 + initialDelaySeconds: 5 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 + exec: + command: + - /bin/sh + - -c + - -e + - | + exec pg_isready -U "postgres" -h 127.0.0.1 -p 5432 + [ -f /opt/bitnami/postgresql/tmp/.initialized ] || [ -f /bitnami/postgresql/.initialized ] + resources: + limits: {} + requests: + cpu: 250m + memory: 256Mi + volumeMounts: + - name: dshm + mountPath: /dev/shm + - name: data + mountPath: /bitnami/postgresql + volumes: + - name: dshm + emptyDir: + medium: Memory + volumeClaimTemplates: + - apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: data + spec: + accessModes: + - "ReadWriteOnce" + resources: + requests: + storage: "8Gi" +--- +# Source: gs-cloud-hpa/charts/geoservercloud/charts/geoserver/templates/ingress.yaml +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: gs-cloud-pgconfig-wm-geoserver-host1 + labels: + helm.sh/chart: geoserver + app.kubernetes.io/version: "1.0" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: geoserver + app.kubernetes.io/instance: gs-cloud-pgconfig-wms-hpa + app.kubernetes.io/component: host1 +spec: +# Add tls only if ingress.tls.enabled is set to true and the other fields are complete. + rules: + - host: "gscloud.local" + http: + paths: + - path: "/geoserver-cloud/" + pathType: Prefix + backend: + service: + name: gs-cloud-pgconfig-wms-hpa-gsc-gateway + port: + number: 8080