From 4db68ac25b5275a3132fe52c6d8fdd77643f4e5c Mon Sep 17 00:00:00 2001 From: Josh Purcell Date: Fri, 3 Mar 2023 12:28:48 -0500 Subject: [PATCH] Add annotations to external services: - add external.annotations to schema - add external.annotations to LoadBalancer service - add external.annotations to NodePort service --- charts/redpanda/Chart.yaml | 2 +- charts/redpanda/templates/service.loadbalancer.yaml | 4 ++++ charts/redpanda/templates/services.nodeport.yaml | 4 ++++ charts/redpanda/values.schema.json | 3 +++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/charts/redpanda/Chart.yaml b/charts/redpanda/Chart.yaml index 3a66f3eff4..d7bdf21a05 100644 --- a/charts/redpanda/Chart.yaml +++ b/charts/redpanda/Chart.yaml @@ -23,7 +23,7 @@ type: application # The chart version and the app version are not the same and will not track # together. The chart version is a semver representation of changes to this # chart. -version: 2.12.2 +version: 3.0.1 # The app version is the default version of Redpanda to install. appVersion: v22.3.13 diff --git a/charts/redpanda/templates/service.loadbalancer.yaml b/charts/redpanda/templates/service.loadbalancer.yaml index 150de32a4d..c762e910b7 100644 --- a/charts/redpanda/templates/service.loadbalancer.yaml +++ b/charts/redpanda/templates/service.loadbalancer.yaml @@ -29,6 +29,10 @@ metadata: {{- . | nindent 4 }} {{- end }} repdanda.com/type: "loadbalancer" +{{- with $values.external.annotations }} + annotations: + {{- toYaml . | nindent 4 }} +{{- end }} spec: type: LoadBalancer {{- if not ( empty $root.Values.external.sourceRanges ) }} diff --git a/charts/redpanda/templates/services.nodeport.yaml b/charts/redpanda/templates/services.nodeport.yaml index f06152698f..967bdc4c01 100644 --- a/charts/redpanda/templates/services.nodeport.yaml +++ b/charts/redpanda/templates/services.nodeport.yaml @@ -26,6 +26,10 @@ metadata: {{- with include "full.labels" . }} {{- . | nindent 4 }} {{- end }} +{{- with $values.external.annotations }} + annotations: + {{- toYaml . | nindent 4 }} +{{- end }} spec: type: NodePort externalTrafficPolicy: Local diff --git a/charts/redpanda/values.schema.json b/charts/redpanda/values.schema.json index 79e20814bc..db35164769 100644 --- a/charts/redpanda/values.schema.json +++ b/charts/redpanda/values.schema.json @@ -191,6 +191,9 @@ }, "sourceRanges": { "type": "array" + }, + "annotations": { + "type": "object" } } },