From 197c9fcffa3ec4ac358804bf9d3e4aa9982235af Mon Sep 17 00:00:00 2001 From: sarataha Date: Tue, 21 Feb 2023 18:58:39 +0300 Subject: [PATCH 1/2] Add a new field to ResourceTemple. --- apis/core/templates.go | 1 + config/crd/bases/capi.weave.works_capitemplates.yaml | 2 ++ config/crd/bases/templates.weave.works_gitopstemplates.yaml | 2 ++ 3 files changed, 5 insertions(+) diff --git a/apis/core/templates.go b/apis/core/templates.go index 10894ae..2336ad2 100644 --- a/apis/core/templates.go +++ b/apis/core/templates.go @@ -125,6 +125,7 @@ type HelmReleaseTemplateSpec struct { type ResourceTemplate struct { Path string `json:"path,omitempty"` Content []ResourceTemplateContent `json:"content,omitempty"` + Raw string `json:"raw,omitempty"` } // HelmReleaseTemplate is the HelmRelease.spec that can be overridden diff --git a/config/crd/bases/capi.weave.works_capitemplates.yaml b/config/crd/bases/capi.weave.works_capitemplates.yaml index 9537ccb..76a513a 100644 --- a/config/crd/bases/capi.weave.works_capitemplates.yaml +++ b/config/crd/bases/capi.weave.works_capitemplates.yaml @@ -277,6 +277,8 @@ spec: type: array path: type: string + raw: + type: string type: object type: array type: object diff --git a/config/crd/bases/templates.weave.works_gitopstemplates.yaml b/config/crd/bases/templates.weave.works_gitopstemplates.yaml index 50bdb42..1875f5f 100644 --- a/config/crd/bases/templates.weave.works_gitopstemplates.yaml +++ b/config/crd/bases/templates.weave.works_gitopstemplates.yaml @@ -279,6 +279,8 @@ spec: type: array path: type: string + raw: + type: string type: object type: array type: object From ef0bd4acceb6ea7e290579aee679e47a9b4df528 Mon Sep 17 00:00:00 2001 From: sarataha Date: Fri, 24 Feb 2023 13:10:19 +0300 Subject: [PATCH 2/2] Add a comment describing raw field. --- apis/core/templates.go | 4 +++- config/crd/bases/capi.weave.works_capitemplates.yaml | 2 ++ config/crd/bases/templates.weave.works_gitopstemplates.yaml | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/apis/core/templates.go b/apis/core/templates.go index 2336ad2..9e2dbb5 100644 --- a/apis/core/templates.go +++ b/apis/core/templates.go @@ -125,7 +125,9 @@ type HelmReleaseTemplateSpec struct { type ResourceTemplate struct { Path string `json:"path,omitempty"` Content []ResourceTemplateContent `json:"content,omitempty"` - Raw string `json:"raw,omitempty"` + // Raw is the content of the resource template in a string format. + // It supports comments in the template file. + Raw string `json:"raw,omitempty"` } // HelmReleaseTemplate is the HelmRelease.spec that can be overridden diff --git a/config/crd/bases/capi.weave.works_capitemplates.yaml b/config/crd/bases/capi.weave.works_capitemplates.yaml index 76a513a..dee595d 100644 --- a/config/crd/bases/capi.weave.works_capitemplates.yaml +++ b/config/crd/bases/capi.weave.works_capitemplates.yaml @@ -278,6 +278,8 @@ spec: path: type: string raw: + description: Raw is the content of the resource template in + a string format. It supports comments in the template file. type: string type: object type: array diff --git a/config/crd/bases/templates.weave.works_gitopstemplates.yaml b/config/crd/bases/templates.weave.works_gitopstemplates.yaml index 1875f5f..423ca39 100644 --- a/config/crd/bases/templates.weave.works_gitopstemplates.yaml +++ b/config/crd/bases/templates.weave.works_gitopstemplates.yaml @@ -280,6 +280,8 @@ spec: path: type: string raw: + description: Raw is the content of the resource template in + a string format. It supports comments in the template file. type: string type: object type: array