diff --git a/api/mesh/v1alpha1/kds.proto b/api/mesh/v1alpha1/kds.proto index afa93ade3f60..df7b0aabbf1f 100644 --- a/api/mesh/v1alpha1/kds.proto +++ b/api/mesh/v1alpha1/kds.proto @@ -22,11 +22,9 @@ message KumaResource { google.protobuf.Any spec = 2; } -message ZoneHealthCheckRequest { -} +message ZoneHealthCheckRequest {} -message ZoneHealthCheckResponse { -} +message ZoneHealthCheckResponse {} service GlobalKDSService { // StreamXDSConfigs is logically a service exposed by Zone CP so Global CP can diff --git a/app/kumactl/cmd/install/testdata/install-control-plane.cni-enabled.golden.yaml b/app/kumactl/cmd/install/testdata/install-control-plane.cni-enabled.golden.yaml index 565f6a2bd8de..16ba6c16826a 100644 --- a/app/kumactl/cmd/install/testdata/install-control-plane.cni-enabled.golden.yaml +++ b/app/kumactl/cmd/install/testdata/install-control-plane.cni-enabled.golden.yaml @@ -547,6 +547,8 @@ metadata: app: kuma-control-plane app.kubernetes.io/name: kuma app.kubernetes.io/instance: kuma + annotations: + spec: replicas: 1 minReadySeconds: 0 diff --git a/app/kumactl/cmd/install/testdata/install-control-plane.cni-legacy-enabled.golden.yaml b/app/kumactl/cmd/install/testdata/install-control-plane.cni-legacy-enabled.golden.yaml index 2402e452beba..b7eebd5e0a97 100644 --- a/app/kumactl/cmd/install/testdata/install-control-plane.cni-legacy-enabled.golden.yaml +++ b/app/kumactl/cmd/install/testdata/install-control-plane.cni-legacy-enabled.golden.yaml @@ -529,6 +529,8 @@ metadata: app: kuma-control-plane app.kubernetes.io/name: kuma app.kubernetes.io/instance: kuma + annotations: + spec: replicas: 1 minReadySeconds: 0 diff --git a/app/kumactl/cmd/install/testdata/install-control-plane.defaults.golden.yaml b/app/kumactl/cmd/install/testdata/install-control-plane.defaults.golden.yaml index 99f604b4c9f3..fa696c503d4d 100644 --- a/app/kumactl/cmd/install/testdata/install-control-plane.defaults.golden.yaml +++ b/app/kumactl/cmd/install/testdata/install-control-plane.defaults.golden.yaml @@ -6384,6 +6384,8 @@ metadata: app: kuma-control-plane app.kubernetes.io/name: kuma app.kubernetes.io/instance: kuma + annotations: + spec: replicas: 1 minReadySeconds: 0 diff --git a/app/kumactl/cmd/install/testdata/install-control-plane.dump-values.yaml b/app/kumactl/cmd/install/testdata/install-control-plane.dump-values.yaml index e78cc41f9956..26809185a516 100644 --- a/app/kumactl/cmd/install/testdata/install-control-plane.dump-values.yaml +++ b/app/kumactl/cmd/install/testdata/install-control-plane.dump-values.yaml @@ -51,7 +51,10 @@ controlPlane: # -- Minimum number of seconds for which a newly created pod should be ready for it to be considered available. minReadySeconds: 0 - # -- Control Plane Pod Annotations + # -- Annotations applied only to the `Deployment` resource + deploymentAnnotations: {} + + # -- Annotations applied only to the `Pod` resource podAnnotations: {} # Horizontal Pod Autoscaling configuration diff --git a/app/kumactl/cmd/install/testdata/install-control-plane.gateway-api-present-not-enabled.yaml b/app/kumactl/cmd/install/testdata/install-control-plane.gateway-api-present-not-enabled.yaml index 99f604b4c9f3..fa696c503d4d 100644 --- a/app/kumactl/cmd/install/testdata/install-control-plane.gateway-api-present-not-enabled.yaml +++ b/app/kumactl/cmd/install/testdata/install-control-plane.gateway-api-present-not-enabled.yaml @@ -6384,6 +6384,8 @@ metadata: app: kuma-control-plane app.kubernetes.io/name: kuma app.kubernetes.io/instance: kuma + annotations: + spec: replicas: 1 minReadySeconds: 0 diff --git a/app/kumactl/cmd/install/testdata/install-control-plane.gateway-api-present.yaml b/app/kumactl/cmd/install/testdata/install-control-plane.gateway-api-present.yaml index bfcfc2eebcc9..b4201c195f8a 100644 --- a/app/kumactl/cmd/install/testdata/install-control-plane.gateway-api-present.yaml +++ b/app/kumactl/cmd/install/testdata/install-control-plane.gateway-api-present.yaml @@ -6590,6 +6590,8 @@ metadata: app: kuma-control-plane app.kubernetes.io/name: kuma app.kubernetes.io/instance: kuma + annotations: + spec: replicas: 1 minReadySeconds: 0 diff --git a/app/kumactl/cmd/install/testdata/install-control-plane.global-universal-on-k8s.golden.yaml b/app/kumactl/cmd/install/testdata/install-control-plane.global-universal-on-k8s.golden.yaml index 136060b8944b..5208deac2ddd 100644 --- a/app/kumactl/cmd/install/testdata/install-control-plane.global-universal-on-k8s.golden.yaml +++ b/app/kumactl/cmd/install/testdata/install-control-plane.global-universal-on-k8s.golden.yaml @@ -92,6 +92,8 @@ metadata: app: kuma-control-plane app.kubernetes.io/name: kuma app.kubernetes.io/instance: kuma + annotations: + spec: replicas: 1 minReadySeconds: 0 diff --git a/app/kumactl/cmd/install/testdata/install-control-plane.global.golden.yaml b/app/kumactl/cmd/install/testdata/install-control-plane.global.golden.yaml index 09ced01cfaa1..4d4baa066deb 100644 --- a/app/kumactl/cmd/install/testdata/install-control-plane.global.golden.yaml +++ b/app/kumactl/cmd/install/testdata/install-control-plane.global.golden.yaml @@ -349,6 +349,8 @@ metadata: app: kuma-control-plane app.kubernetes.io/name: kuma app.kubernetes.io/instance: kuma + annotations: + spec: replicas: 1 minReadySeconds: 0 diff --git a/app/kumactl/cmd/install/testdata/install-control-plane.override-env-vars.golden.yaml b/app/kumactl/cmd/install/testdata/install-control-plane.override-env-vars.golden.yaml index 8ca225f1ecdf..6ce3a5a09284 100644 --- a/app/kumactl/cmd/install/testdata/install-control-plane.override-env-vars.golden.yaml +++ b/app/kumactl/cmd/install/testdata/install-control-plane.override-env-vars.golden.yaml @@ -333,6 +333,8 @@ metadata: app: kuma-control-plane app.kubernetes.io/name: kuma app.kubernetes.io/instance: kuma + annotations: + spec: replicas: 1 minReadySeconds: 0 diff --git a/app/kumactl/cmd/install/testdata/install-control-plane.overrides.golden.yaml b/app/kumactl/cmd/install/testdata/install-control-plane.overrides.golden.yaml index 8626e3053deb..45b80a2ee693 100644 --- a/app/kumactl/cmd/install/testdata/install-control-plane.overrides.golden.yaml +++ b/app/kumactl/cmd/install/testdata/install-control-plane.overrides.golden.yaml @@ -335,6 +335,8 @@ metadata: app: kuma-control-plane app.kubernetes.io/name: kuma app.kubernetes.io/instance: kuma + annotations: + spec: replicas: 1 minReadySeconds: 0 diff --git a/app/kumactl/cmd/install/testdata/install-control-plane.registry.golden.yaml b/app/kumactl/cmd/install/testdata/install-control-plane.registry.golden.yaml index a6b2fcb309cb..7de7efcbda41 100644 --- a/app/kumactl/cmd/install/testdata/install-control-plane.registry.golden.yaml +++ b/app/kumactl/cmd/install/testdata/install-control-plane.registry.golden.yaml @@ -333,6 +333,8 @@ metadata: app: kuma-control-plane app.kubernetes.io/name: kuma app.kubernetes.io/instance: kuma + annotations: + spec: replicas: 1 minReadySeconds: 0 diff --git a/app/kumactl/cmd/install/testdata/install-control-plane.tproxy-ebpf-experimental-enabled.golden.yaml b/app/kumactl/cmd/install/testdata/install-control-plane.tproxy-ebpf-experimental-enabled.golden.yaml index f3132e20cc91..20b9c10777d8 100644 --- a/app/kumactl/cmd/install/testdata/install-control-plane.tproxy-ebpf-experimental-enabled.golden.yaml +++ b/app/kumactl/cmd/install/testdata/install-control-plane.tproxy-ebpf-experimental-enabled.golden.yaml @@ -333,6 +333,8 @@ metadata: app: kuma-control-plane app.kubernetes.io/name: kuma app.kubernetes.io/instance: kuma + annotations: + spec: replicas: 1 minReadySeconds: 0 diff --git a/app/kumactl/cmd/install/testdata/install-control-plane.with-egress.golden.yaml b/app/kumactl/cmd/install/testdata/install-control-plane.with-egress.golden.yaml index 6491c788f03b..697867c02c57 100644 --- a/app/kumactl/cmd/install/testdata/install-control-plane.with-egress.golden.yaml +++ b/app/kumactl/cmd/install/testdata/install-control-plane.with-egress.golden.yaml @@ -364,6 +364,8 @@ metadata: app: kuma-control-plane app.kubernetes.io/name: kuma app.kubernetes.io/instance: kuma + annotations: + spec: replicas: 1 minReadySeconds: 0 diff --git a/app/kumactl/cmd/install/testdata/install-control-plane.with-helm-set.yaml b/app/kumactl/cmd/install/testdata/install-control-plane.with-helm-set.yaml index d091e8ff2132..5b6af4e52eaa 100644 --- a/app/kumactl/cmd/install/testdata/install-control-plane.with-helm-set.yaml +++ b/app/kumactl/cmd/install/testdata/install-control-plane.with-helm-set.yaml @@ -6446,6 +6446,8 @@ metadata: app: kuma-control-plane app.kubernetes.io/name: kuma app.kubernetes.io/instance: kuma + annotations: + spec: replicas: 1 minReadySeconds: 0 diff --git a/app/kumactl/cmd/install/testdata/install-control-plane.with-helm-values.yaml b/app/kumactl/cmd/install/testdata/install-control-plane.with-helm-values.yaml index 815895a4da8f..58a6f25703ce 100644 --- a/app/kumactl/cmd/install/testdata/install-control-plane.with-helm-values.yaml +++ b/app/kumactl/cmd/install/testdata/install-control-plane.with-helm-values.yaml @@ -333,6 +333,8 @@ metadata: app: kuma-control-plane app.kubernetes.io/name: kuma app.kubernetes.io/instance: kuma + annotations: + spec: replicas: 2 minReadySeconds: 0 diff --git a/app/kumactl/cmd/install/testdata/install-control-plane.with-ingress.golden.yaml b/app/kumactl/cmd/install/testdata/install-control-plane.with-ingress.golden.yaml index 72aae9659651..21011735d81b 100644 --- a/app/kumactl/cmd/install/testdata/install-control-plane.with-ingress.golden.yaml +++ b/app/kumactl/cmd/install/testdata/install-control-plane.with-ingress.golden.yaml @@ -364,6 +364,8 @@ metadata: app: kuma-control-plane app.kubernetes.io/name: kuma app.kubernetes.io/instance: kuma + annotations: + spec: replicas: 1 minReadySeconds: 0 diff --git a/app/kumactl/cmd/install/testdata/install-control-plane.zone-universal-on-k8s.golden.yaml b/app/kumactl/cmd/install/testdata/install-control-plane.zone-universal-on-k8s.golden.yaml index 97f46dd7929a..61063d82876f 100644 --- a/app/kumactl/cmd/install/testdata/install-control-plane.zone-universal-on-k8s.golden.yaml +++ b/app/kumactl/cmd/install/testdata/install-control-plane.zone-universal-on-k8s.golden.yaml @@ -76,6 +76,8 @@ metadata: app: kuma-control-plane app.kubernetes.io/name: kuma app.kubernetes.io/instance: kuma + annotations: + spec: replicas: 1 minReadySeconds: 0 diff --git a/app/kumactl/cmd/install/testdata/install-control-plane.zone.golden.yaml b/app/kumactl/cmd/install/testdata/install-control-plane.zone.golden.yaml index 6d4b34157613..ea76d3cc100c 100644 --- a/app/kumactl/cmd/install/testdata/install-control-plane.zone.golden.yaml +++ b/app/kumactl/cmd/install/testdata/install-control-plane.zone.golden.yaml @@ -333,6 +333,8 @@ metadata: app: kuma-control-plane app.kubernetes.io/name: kuma app.kubernetes.io/instance: kuma + annotations: + spec: replicas: 1 minReadySeconds: 0 diff --git a/app/kumactl/cmd/install/testdata/install-cp-helm/doNotChangeTlsChecksum.golden.yaml b/app/kumactl/cmd/install/testdata/install-cp-helm/doNotChangeTlsChecksum.golden.yaml index fdeb522b5581..513acfb00b16 100644 --- a/app/kumactl/cmd/install/testdata/install-cp-helm/doNotChangeTlsChecksum.golden.yaml +++ b/app/kumactl/cmd/install/testdata/install-cp-helm/doNotChangeTlsChecksum.golden.yaml @@ -333,6 +333,8 @@ metadata: app: kuma-control-plane app.kubernetes.io/name: kuma app.kubernetes.io/instance: kuma + annotations: + spec: replicas: 1 minReadySeconds: 0 diff --git a/app/kumactl/cmd/install/testdata/install-cp-helm/empty.golden.yaml b/app/kumactl/cmd/install/testdata/install-cp-helm/empty.golden.yaml index 1511c4e4e3a1..7ba2282d4a64 100644 --- a/app/kumactl/cmd/install/testdata/install-cp-helm/empty.golden.yaml +++ b/app/kumactl/cmd/install/testdata/install-cp-helm/empty.golden.yaml @@ -333,6 +333,8 @@ metadata: app: kuma-control-plane app.kubernetes.io/name: kuma app.kubernetes.io/instance: kuma + annotations: + spec: replicas: 1 minReadySeconds: 0 diff --git a/app/kumactl/cmd/install/testdata/install-cp-helm/fix4485.golden.yaml b/app/kumactl/cmd/install/testdata/install-cp-helm/fix4485.golden.yaml index 8e35e57f1596..ef56902dee8d 100644 --- a/app/kumactl/cmd/install/testdata/install-cp-helm/fix4485.golden.yaml +++ b/app/kumactl/cmd/install/testdata/install-cp-helm/fix4485.golden.yaml @@ -355,6 +355,8 @@ metadata: "foo": "baz" app.kubernetes.io/name: kuma app.kubernetes.io/instance: kuma + annotations: + spec: replicas: 1 minReadySeconds: 0 diff --git a/app/kumactl/cmd/install/testdata/install-cp-helm/fix4496.golden.yaml b/app/kumactl/cmd/install/testdata/install-cp-helm/fix4496.golden.yaml index 98ff4204d845..a3e7dd3f74ce 100644 --- a/app/kumactl/cmd/install/testdata/install-cp-helm/fix4496.golden.yaml +++ b/app/kumactl/cmd/install/testdata/install-cp-helm/fix4496.golden.yaml @@ -374,6 +374,8 @@ metadata: "foo": "bar" app.kubernetes.io/name: kuma app.kubernetes.io/instance: kuma + annotations: + spec: replicas: 1 minReadySeconds: 0 diff --git a/app/kumactl/cmd/install/testdata/install-cp-helm/fix4935.golden.yaml b/app/kumactl/cmd/install/testdata/install-cp-helm/fix4935.golden.yaml index 9591418c749e..5394580fb1f1 100644 --- a/app/kumactl/cmd/install/testdata/install-cp-helm/fix4935.golden.yaml +++ b/app/kumactl/cmd/install/testdata/install-cp-helm/fix4935.golden.yaml @@ -617,6 +617,8 @@ metadata: app: kuma-control-plane app.kubernetes.io/name: kuma app.kubernetes.io/instance: kuma + annotations: + spec: replicas: 1 minReadySeconds: 0 diff --git a/app/kumactl/cmd/install/testdata/install-cp-helm/fix5978.golden.yaml b/app/kumactl/cmd/install/testdata/install-cp-helm/fix5978.golden.yaml index 2266ad1670bd..433ea078b60b 100644 --- a/app/kumactl/cmd/install/testdata/install-cp-helm/fix5978.golden.yaml +++ b/app/kumactl/cmd/install/testdata/install-cp-helm/fix5978.golden.yaml @@ -395,6 +395,8 @@ metadata: app: kuma-control-plane app.kubernetes.io/name: kuma app.kubernetes.io/instance: kuma + annotations: + spec: replicas: 1 minReadySeconds: 0 diff --git a/app/kumactl/cmd/install/testdata/install-cp-helm/fix7724.golden.yaml b/app/kumactl/cmd/install/testdata/install-cp-helm/fix7724.golden.yaml index 1bb38a34bd32..e4338c56b986 100644 --- a/app/kumactl/cmd/install/testdata/install-cp-helm/fix7724.golden.yaml +++ b/app/kumactl/cmd/install/testdata/install-cp-helm/fix7724.golden.yaml @@ -336,6 +336,8 @@ metadata: app: kuma-control-plane app.kubernetes.io/name: kuma app.kubernetes.io/instance: kuma + annotations: + spec: replicas: 1 minReadySeconds: 0 diff --git a/app/kumactl/cmd/install/testdata/install-cp-helm/fix7824.golden.yaml b/app/kumactl/cmd/install/testdata/install-cp-helm/fix7824.golden.yaml index 2a16123bfef2..48652e1f67b5 100644 --- a/app/kumactl/cmd/install/testdata/install-cp-helm/fix7824.golden.yaml +++ b/app/kumactl/cmd/install/testdata/install-cp-helm/fix7824.golden.yaml @@ -410,6 +410,8 @@ metadata: app: kuma-control-plane app.kubernetes.io/name: kuma app.kubernetes.io/instance: kuma + annotations: + spec: replicas: 1 minReadySeconds: 0 diff --git a/app/kumactl/cmd/install/testdata/install-cp-helm/minReadySeconds.golden.yaml b/app/kumactl/cmd/install/testdata/install-cp-helm/minReadySeconds.golden.yaml index 0883966d06e1..1739c0c95568 100644 --- a/app/kumactl/cmd/install/testdata/install-cp-helm/minReadySeconds.golden.yaml +++ b/app/kumactl/cmd/install/testdata/install-cp-helm/minReadySeconds.golden.yaml @@ -333,6 +333,8 @@ metadata: app: kuma-control-plane app.kubernetes.io/name: kuma app.kubernetes.io/instance: kuma + annotations: + spec: replicas: 1 minReadySeconds: 10 diff --git a/app/kumactl/cmd/install/testdata/install-cp-helm/securityContext.golden.yaml b/app/kumactl/cmd/install/testdata/install-cp-helm/securityContext.golden.yaml index 19b095743f19..d22cd1f0bcc6 100644 --- a/app/kumactl/cmd/install/testdata/install-cp-helm/securityContext.golden.yaml +++ b/app/kumactl/cmd/install/testdata/install-cp-helm/securityContext.golden.yaml @@ -333,6 +333,8 @@ metadata: app: kuma-control-plane app.kubernetes.io/name: kuma app.kubernetes.io/instance: kuma + annotations: + spec: replicas: 1 minReadySeconds: 0 diff --git a/deployments/charts/kuma/README.md b/deployments/charts/kuma/README.md index 224e6d663743..e81c97abad52 100644 --- a/deployments/charts/kuma/README.md +++ b/deployments/charts/kuma/README.md @@ -27,7 +27,8 @@ A Helm chart for the Kuma Control Plane | controlPlane.kdsGlobalAddress | string | `""` | Only used in `zone` mode | | controlPlane.replicas | int | `1` | Number of replicas of the Kuma CP. Ignored when autoscaling is enabled | | controlPlane.minReadySeconds | int | `0` | Minimum number of seconds for which a newly created pod should be ready for it to be considered available. | -| controlPlane.podAnnotations | object | `{}` | Control Plane Pod Annotations | +| controlPlane.deploymentAnnotations | object | `{}` | Annotations applied only to the `Deployment` resource | +| controlPlane.podAnnotations | object | `{}` | Annotations applied only to the `Pod` resource | | controlPlane.autoscaling.enabled | bool | `false` | Whether to enable Horizontal Pod Autoscaling, which requires the [Metrics Server](https://github.com/kubernetes-sigs/metrics-server) in the cluster | | controlPlane.autoscaling.minReplicas | int | `2` | The minimum CP pods to allow | | controlPlane.autoscaling.maxReplicas | int | `5` | The max CP pods to scale to | diff --git a/deployments/charts/kuma/templates/_helpers.tpl b/deployments/charts/kuma/templates/_helpers.tpl index ada8e9dfabba..c7985294de94 100644 --- a/deployments/charts/kuma/templates/_helpers.tpl +++ b/deployments/charts/kuma/templates/_helpers.tpl @@ -111,6 +111,15 @@ app: {{ include "kuma.name" . }}-control-plane {{ include "kuma.labels" . }} {{- end }} +{{/* +control plane deployment annotations +*/}} +{{- define "kuma.cpDeploymentAnnotations" -}} +{{- range $key, $value := $.Values.controlPlane.deploymentAnnotations }} +{{ $key | quote }}: {{ $value | quote }} +{{- end }} +{{- end }} + {{/* ingress labels */}} diff --git a/deployments/charts/kuma/templates/cp-deployment.yaml b/deployments/charts/kuma/templates/cp-deployment.yaml index a6c53f671694..5bf073105be1 100644 --- a/deployments/charts/kuma/templates/cp-deployment.yaml +++ b/deployments/charts/kuma/templates/cp-deployment.yaml @@ -69,6 +69,7 @@ metadata: name: {{ include "kuma.name" . }}-control-plane namespace: {{ .Release.Namespace }} labels: {{ include "kuma.cpLabels" . | nindent 4 }} + annotations: {{ include "kuma.cpDeploymentAnnotations" . | nindent 4 }} spec: {{- if not .Values.controlPlane.autoscaling.enabled }} replicas: {{ .Values.controlPlane.replicas }} diff --git a/deployments/charts/kuma/values.yaml b/deployments/charts/kuma/values.yaml index e78cc41f9956..26809185a516 100644 --- a/deployments/charts/kuma/values.yaml +++ b/deployments/charts/kuma/values.yaml @@ -51,7 +51,10 @@ controlPlane: # -- Minimum number of seconds for which a newly created pod should be ready for it to be considered available. minReadySeconds: 0 - # -- Control Plane Pod Annotations + # -- Annotations applied only to the `Deployment` resource + deploymentAnnotations: {} + + # -- Annotations applied only to the `Pod` resource podAnnotations: {} # Horizontal Pod Autoscaling configuration diff --git a/docs/generated/raw/helm-values.yaml b/docs/generated/raw/helm-values.yaml index e78cc41f9956..26809185a516 100644 --- a/docs/generated/raw/helm-values.yaml +++ b/docs/generated/raw/helm-values.yaml @@ -51,7 +51,10 @@ controlPlane: # -- Minimum number of seconds for which a newly created pod should be ready for it to be considered available. minReadySeconds: 0 - # -- Control Plane Pod Annotations + # -- Annotations applied only to the `Deployment` resource + deploymentAnnotations: {} + + # -- Annotations applied only to the `Pod` resource podAnnotations: {} # Horizontal Pod Autoscaling configuration