From fe57c92d198db4d723e9d2e4280b77b7909e6fda Mon Sep 17 00:00:00 2001 From: Ciucur Daniel Date: Tue, 19 Nov 2024 06:46:42 +0200 Subject: [PATCH] Add extraManifests value (#27) --- README.md | 3 +++ charts/zipkin/ci/extraManifests-values.yaml | 13 +++++++++++++ charts/zipkin/templates/extra-objects.yaml | 4 ++++ charts/zipkin/values.schema.json | 3 +++ charts/zipkin/values.yaml | 9 +++++++++ 5 files changed, 32 insertions(+) create mode 100644 charts/zipkin/ci/extraManifests-values.yaml create mode 100644 charts/zipkin/templates/extra-objects.yaml diff --git a/README.md b/README.md index 9f07400..a59bd3e 100644 --- a/README.md +++ b/README.md @@ -74,6 +74,9 @@ You can then run `helm search repo zipkin` to see the charts. | zipkin.storage.elasticsearch.username | string | no default | Basic authentication of X-Pack security | | zipkin.storage.elasticsearch.password | string | no default | Basic authentication of X-Pack security | | zipkin.storage.type | string | `"mem"` | | +| extraManifests | list | `[]` | Extra manifests to deploy with the helm chart | + + The values are validated using a JSON schema, which contains logic to enforce either: diff --git a/charts/zipkin/ci/extraManifests-values.yaml b/charts/zipkin/ci/extraManifests-values.yaml new file mode 100644 index 0000000..49ce0d6 --- /dev/null +++ b/charts/zipkin/ci/extraManifests-values.yaml @@ -0,0 +1,13 @@ +extraManifests: + - apiVersion: v1 + kind: ConfigMap + metadata: + name: some-config + data: + example: true + - apiVersion: v1 + kind: ConfigMap + metadata: + name: some-other-config + data: + example: true \ No newline at end of file diff --git a/charts/zipkin/templates/extra-objects.yaml b/charts/zipkin/templates/extra-objects.yaml new file mode 100644 index 0000000..928593c --- /dev/null +++ b/charts/zipkin/templates/extra-objects.yaml @@ -0,0 +1,4 @@ +{{ range .Values.extraManifests }} +--- +{{ tpl (toYaml .) $ }} +{{ end }} \ No newline at end of file diff --git a/charts/zipkin/values.schema.json b/charts/zipkin/values.schema.json index b38b4e0..67ba49f 100644 --- a/charts/zipkin/values.schema.json +++ b/charts/zipkin/values.schema.json @@ -300,6 +300,9 @@ "type": "object" } } + }, + "extraManifests": { + "type": "object" } } } diff --git a/charts/zipkin/values.yaml b/charts/zipkin/values.yaml index cd014a4..d8a8a6e 100644 --- a/charts/zipkin/values.yaml +++ b/charts/zipkin/values.yaml @@ -143,3 +143,12 @@ extraServicePorts: [] # global variables to use in values. typically used in tests. global: {} + +# extra manifests to deploy with the helm chart +extraManifests: [] + # - apiVersion: v1 + # kind: ConfigMap + # metadata: + # name: some-config + # data: + # example: true