From c101b1ec12c59970432a42986554f7600d488d0e Mon Sep 17 00:00:00 2001 From: Guillaume Lamirand Date: Fri, 22 Mar 2024 10:12:57 +0100 Subject: [PATCH] fix(cockpit): adapt helm chart for cockpit 4.43.0 --- cockpit/CHANGELOG.md | 6 + cockpit/Chart.yaml | 9 +- cockpit/templates/api/api-configmap.yaml | 89 ++-- .../api/api-configmap_gravitee_yaml_test.yaml | 433 ++++++++++++++---- .../api-configmap_hazelcast_yaml_test.yaml | 177 +------ cockpit/tests/api/api-deployment_test.yaml | 2 +- cockpit/values.yaml | 8 - 7 files changed, 403 insertions(+), 321 deletions(-) diff --git a/cockpit/CHANGELOG.md b/cockpit/CHANGELOG.md index 50cecb40..3142f650 100644 --- a/cockpit/CHANGELOG.md +++ b/cockpit/CHANGELOG.md @@ -2,6 +2,12 @@ This file documents all notable changes to [Gravitee.io Cockpit](https://github.com/gravitee-io/helm-charts/tree/master/cockpit) Helm Chart. The release numbering uses [semantic versioning](http://semver.org). +### 2.0.0 + +- [X] Add new configuration for controller +- [X] Adapt hazelcast configuration for latest cockpit +- [X] remove compatible-versions values +- [X] Update appVersion requirement as this chart is only for 4.43.0 and higher. ### 1.9.7 diff --git a/cockpit/Chart.yaml b/cockpit/Chart.yaml index b9f766fb..f2661932 100644 --- a/cockpit/Chart.yaml +++ b/cockpit/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v1 name: cockpit # When the version is modified, make sure the artifacthub.io/changes list is updated # Also update CHANGELOG.md -version: 1.9.7 -appVersion: 3.16.0 +version: 2.0.0 +appVersion: 4.43.0 description: Official Gravitee.io Helm chart for Cockpit home: https://gravitee.io sources: @@ -21,4 +21,7 @@ annotations: # List of changes for the release in artifacthub.io # https://artifacthub.io/packages/helm/graviteeio/cockpit?modal=changelog artifacthub.io/changes: | - - Revert changes introduced with 1.9.6 + - Add new configuration for controller + - Adapt hazelcast configuration for latest cockpit + - Remove compatible-versions values + - Update appVersion requirement as this chart is only for 4.43.0 and higher diff --git a/cockpit/templates/api/api-configmap.yaml b/cockpit/templates/api/api-configmap.yaml index 3380c16a..aec301ad 100644 --- a/cockpit/templates/api/api-configmap.yaml +++ b/cockpit/templates/api/api-configmap.yaml @@ -59,7 +59,33 @@ data: uri: mongodb://{{- if (eq .Values.mongo.auth.enabled true) }}{{ .Values.mongo.auth.username }}:{{ .Values.mongo.auth.password }}@{{- end }}{{ .Values.mongo.dbhost }}:{{ .Values.mongo.dbport }}/{{ .Values.mongo.dbname }}?{{- if .Values.mongo.rsEnabled }}&replicaSet={{ .Values.mongo.rs }}{{- end }}{{- if (eq .Values.mongo.auth.enabled true) }}&authSource={{ .Values.mongo.auth.source }}{{- end }}{{- if .Values.mongo.connectTimeoutMS }}&connectTimeoutMS={{ .Values.mongo.connectTimeoutMS }}{{- end }} {{- end }} - {{- if .Values.generator.enabled }} + cluster: + type: hazelcast + hazelcast: + config-path: ${gravitee.home}/config/hazelcast.xml + + cache: + type: hazelcast + hazelcast: + config-path: ${gravitee.home}/config/hazelcast.xml + + exchange: + controller: + ws: + port: 8062 + secured: true + ssl: + clientAuth: REQUIRED + keystore: + type: ${ssl.keystore.type} + path: ${ssl.keystore.path} + password: ${ssl.keystore.password} + truststore: + type: ${truststore.type} + path: ${truststore.path} + password: ${truststore.password} + + {{ if .Values.generator.enabled -}} swaggerGenerator: url: http://{{ template "gravitee.generator.fullname" . }}:{{ .Values.generator.service.externalPort }} apiKey: {{ .Values.generator.apiKey }} @@ -129,12 +155,6 @@ data: enabled: false {{- end }} - controller: - {{- if .Values.api.controller.compatibleVersions }} - compatible-versions: -{{ toYaml .Values.api.controller.compatibleVersions | indent 8 }} - {{- end }} - email: enabled: {{ .Values.smtp.enabled }} {{- if .Values.smtp.enabled }} @@ -264,34 +284,31 @@ data: {{ toYaml .Values.authentication.oidc | indent 8 }} {{- end }} - hazelcast.xml: | + hazelcast.xml: |- + http://www.hazelcast.com/schema/config/hazelcast-config-5.3.xsd"> graviteeio-cockpit true 3 5 false + slf4j - + 0 1 - + 0 1 - - 10 - - 0 @@ -308,48 +325,6 @@ data: - hazelcast.yml: | - hazelcast: - cluster-name: {{ .Release.Name }}_{{ $clusterversion }} - network: - join: - multicast: - enabled: false - tcp-ip: - enabled: false - kubernetes: - enabled: true - namespace: {{ .Release.Namespace }} - service-name: {{ template "gravitee.api.fullname" . }} - -{{- if .Values.hazelcast.advancedNetwork }} - advanced-network: - {{- toYaml .Values.hazelcast.advancedNetwork | nindent 8 }} -{{- end }} - - properties: - hazelcast.logging.type: slf4j - hazelcast.max.wait.seconds.before.join: 3 - hazelcast.member.list.publish.interval.seconds: 5 - hazelcast.socket.client.bind.any: false -{{- if .Values.hazelcast.properties }} - {{- toYaml .Values.hazelcast.properties | nindent 8 }} -{{- end }} - - cp-subsystem: - cp-member-count: 0 - map: - cockpit.channels.*: - backup-count: 0 - async-backup-count: 1 - queue: - commands-*: - backup-count: 0 - async-backup-count: 1 - reliable-topic: - cockpit.primaryChannels: - read-batch-size: 10 - logback.xml: |