Skip to content

Commit

Permalink
feat: add konnect.controlPlaneID and remove konnect.runtimeGroupID (#…
Browse files Browse the repository at this point in the history
…1099)

Signed-off-by: Jintao Zhang <[email protected]>
Co-authored-by: Grzegorz Burzyński <[email protected]>
  • Loading branch information
tao12345666333 and czeslavo authored Jul 17, 2024
1 parent 8c8bb4f commit 12cb07b
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion charts/ingress/example-values/kic-konnect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ controller:
ingressController:
konnect:
enabled: true
runtimeGroupID: "dd74208f-7eff-47d0-a286-ba6df3db278b"
controlPlaneID: "dd74208f-7eff-47d0-a286-ba6df3db278b"
tlsClientSecretName: konnect-client-tls
apiHostname: "us.kic.api.konghq.com"

Expand Down
7 changes: 7 additions & 0 deletions charts/kong/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,15 @@

## Unreleased

### Changes

* Added support for ServiceMonitor relabelings allowing labels manipulation before scraping.

### Breaking changes

* Added `ingressController.konnect.controlPlaneID` and removed `ingressController.konnect.runtimeGroupID`
[#1099](https://github.com/Kong/charts/pull/1099)

## 2.39.3

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion charts/kong/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ section of `values.yaml` file:
| gatewayDiscovery.adminApiService.namespace | The namespace of the Kong admin API service (for more details see [gatewayDiscovery section][gd_section]) | `.Release.Namespace` |
| gatewayDiscovery.adminApiService.name | The name of the Kong admin API service (for more details see [gatewayDiscovery section][gd_section]) | "" |
| konnect.enabled | Enable synchronisation of data plane configuration with Konnect Runtime Group | false |
| konnect.runtimeGroupID | Konnect Runtime Group's unique identifier. | |
| konnect.controlPlaneID | Konnect Control Plane's unique identifier. | |
| konnect.apiHostname | Konnect API hostname. Defaults to a production US-region. | us.kic.api.konghq.com |
| konnect.tlsClientCertSecretName | Name of the secret that contains Konnect Runtime Group's client TLS certificate. | konnect-client-tls |
| konnect.license.enabled | Enable automatic license provisioning for Gateways managed by Ingress Controller in Konnect mode. | false |
Expand Down
2 changes: 1 addition & 1 deletion charts/kong/example-values/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ common Kong deployment scenarios on Kubernetes.
* [minimal-kong-gd-controller-konnect.yaml](minimal-kong-gd-controller-konnect.yaml) and
[minimal-kong-gd-gateway.yaml](minimal-kong-gd-gateway.yaml) install a single Ingress
Controller with Kong's Konnect sync feature enabled and a cluster of gateway instances.
In order to make it work, `ingressController.konnect.runtimeGroupID` has to be
In order to make it work, `ingressController.konnect.controlPlaneID` has to be
supplied and a `konnect-client-tls` secret has to be created upfront.

All Enterprise examples require some level of additional user configuration to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ ingressController:

konnect:
enabled: true
runtimeGroupID: "00000000-0000-0000-0000-000000000000" # CHANGEME
controlPlaneID: "00000000-0000-0000-0000-000000000000" # CHANGEME
4 changes: 2 additions & 2 deletions charts/kong/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -531,10 +531,10 @@ The name of the Service which will be used by the controller to update the Ingre
{{- end }}

{{- $konnect := .Values.ingressController.konnect -}}
{{- $_ := required "ingressController.konnect.runtimeGroupID is required when ingressController.konnect.enabled" $konnect.runtimeGroupID -}}
{{- $_ := required "ingressController.konnect.controlPlaneID is required when ingressController.konnect.enabled" $konnect.controlPlaneID -}}

{{- $_ = set $autoEnv "CONTROLLER_KONNECT_SYNC_ENABLED" true -}}
{{- $_ = set $autoEnv "CONTROLLER_KONNECT_RUNTIME_GROUP_ID" $konnect.runtimeGroupID -}}
{{- $_ = set $autoEnv "CONTROLLER_KONNECT_CONTROL_PLANE_ID" $konnect.controlPlaneID -}}
{{- $_ = set $autoEnv "CONTROLLER_KONNECT_ADDRESS" (printf "https://%s" .Values.ingressController.konnect.apiHostname) -}}

{{- $tlsCert := include "secretkeyref" (dict "name" $konnect.tlsClientCertSecretName "key" "tls.crt") -}}
Expand Down
4 changes: 2 additions & 2 deletions charts/kong/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -648,8 +648,8 @@ ingressController:
konnect:
enabled: false

# Specifies a Konnect Runtime Group's ID that the controller will push its data-plane config to.
runtimeGroupID: ""
# Specifies a Konnect Control Plane's ID that the controller will push its data-plane config to.
controlPlaneID: ""

# Specifies a Konnect API hostname that the controller will use to push its data-plane config to.
# By default, this is set to US region's production API hostname.
Expand Down

0 comments on commit 12cb07b

Please sign in to comment.