From cb4b45f84df194f959e5cdc5113737ddcce77f02 Mon Sep 17 00:00:00 2001 From: John Stewart Date: Sat, 2 Mar 2024 10:08:16 -0500 Subject: [PATCH] feat(helm): allow for service annotations --- .github/workflows/generate-chart-readme.yaml | 2 +- charts/pgcat/Chart.yaml | 2 +- charts/pgcat/templates/service.yaml | 4 ++++ charts/pgcat/values.yaml | 2 ++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate-chart-readme.yaml b/.github/workflows/generate-chart-readme.yaml index affc40cf..a0df690b 100644 --- a/.github/workflows/generate-chart-readme.yaml +++ b/.github/workflows/generate-chart-readme.yaml @@ -32,7 +32,7 @@ jobs: curl -Lkso $TEMP_FILE $DIFF_URL files_changed="$(sed -nr 's/[\-\+]{3} [ab]\/(.*)/\1/p' $TEMP_FILE | sort | uniq)" # Adding || true to avoid "Process exited with code 1" errors - charts_dirs_changed="$(echo "$files_changed" | xargs dirname | grep -o "pgcat/[^/]*" | sort | uniq || true)" + charts_dirs_changed="$(echo "$files_changed" | xargs dirname | grep -o "pgcat/[^/]*" | cut -d "/" -f1 | sort | uniq || true)" for chart in ${charts_dirs_changed}; do echo "Updating README.md for ${chart}" readme-generator --values "charts/${chart}/values.yaml" --readme "charts/${chart}/README.md" --schema "/tmp/schema.json" diff --git a/charts/pgcat/Chart.yaml b/charts/pgcat/Chart.yaml index c77d29c0..449a2f1c 100644 --- a/charts/pgcat/Chart.yaml +++ b/charts/pgcat/Chart.yaml @@ -5,4 +5,4 @@ maintainers: - name: Wildcard email: support@w6d.io appVersion: "1.1.1" -version: 0.1.0 +version: 0.2.0 diff --git a/charts/pgcat/templates/service.yaml b/charts/pgcat/templates/service.yaml index 56c4be71..70ad6958 100644 --- a/charts/pgcat/templates/service.yaml +++ b/charts/pgcat/templates/service.yaml @@ -1,6 +1,10 @@ apiVersion: v1 kind: Service metadata: + {{- with .Values.service.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} name: {{ include "pgcat.fullname" . }} labels: {{- include "pgcat.labels" . | nindent 4 }} diff --git a/charts/pgcat/values.yaml b/charts/pgcat/values.yaml index 86be4104..b5c98e12 100644 --- a/charts/pgcat/values.yaml +++ b/charts/pgcat/values.yaml @@ -85,9 +85,11 @@ containerSecurityContext: {} ## PgCat service ## +## @param service.annotations PgCat service annotations ## @param service.type PgCat service type ## @param service.port PgCat service port service: + annotations: {} type: ClusterIP port: 6432