From 87fef460fa42db01bd6b6639b9702789d7935c8a Mon Sep 17 00:00:00 2001 From: Martin Jackson Date: Thu, 31 Oct 2024 09:07:53 -0500 Subject: [PATCH] Add extraObjects support --- templates/core/extraObjects.yaml | 4 ++++ templates/plumbing/applications.yaml | 4 ++++ values.schema.json | 8 ++++++++ 3 files changed, 16 insertions(+) create mode 100644 templates/core/extraObjects.yaml diff --git a/templates/core/extraObjects.yaml b/templates/core/extraObjects.yaml new file mode 100644 index 0000000..6578deb --- /dev/null +++ b/templates/core/extraObjects.yaml @@ -0,0 +1,4 @@ +{{- range $obj := .Values.clusterGroup.extraObjects }} +--- +{{ $obj | toYaml }} +{{- end }}{{- /* range $obj */ }} diff --git a/templates/plumbing/applications.yaml b/templates/plumbing/applications.yaml index 6b914bc..c86517f 100644 --- a/templates/plumbing/applications.yaml +++ b/templates/plumbing/applications.yaml @@ -178,5 +178,9 @@ spec: retry: limit: {{ default 20 $.Values.global.applicationRetryLimit }} {{- end }}{{- /* .syncPolicy */}} +{{- range $obj := .extraObjects }} +--- +{{ $obj | toYaml }} +{{- end }}{{- /* range .extraObjects */}} {{- end }}{{- /* if .disabled */}} {{- end }}{{- /* range .Values.clusterGroup.applications */}} diff --git a/values.schema.json b/values.schema.json index cb3a872..326c3b0 100644 --- a/values.schema.json +++ b/values.schema.json @@ -394,6 +394,10 @@ "imperative": { "$ref": "#/definitions/Imperative" }, + "extraObjects": { + "type": "array", + "description": "Extra manifests used within the main clustergroup application, primarily ArgoCD Resource Hooks to sequence subscription installs" + }, "managedClusterGroups": { "anyOf": [ { @@ -547,6 +551,10 @@ "type": "array", "description": "List of extra fields that will be passed to ArgoCD." }, + "extraObjects": { + "type": "array", + "description": "A list of manifests (initially ArcoCD Resource Hooks) to add to the Application object." + }, "overrides": { "type": "object" },