diff --git a/charts/package/Chart.lock b/charts/package/Chart.lock index ebc6249..f4c086a 100644 --- a/charts/package/Chart.lock +++ b/charts/package/Chart.lock @@ -1,6 +1,6 @@ dependencies: - name: common repository: oci://registry-1.docker.io/bitnamicharts - version: 2.8.0 -digest: sha256:0119fce6b509ebf3eaf5218f87f6ec0af64ec7da15f272115673b0716c4b6919 -generated: "2023-08-08T17:31:11.735148021-04:00" + version: 2.13.3 +digest: sha256:9a971689db0c66ea95ac2e911c05014c2b96c6077c991131ff84f2982f88fb83 +generated: "2023-10-21T15:59:40.911552246-04:00" diff --git a/charts/package/Chart.yaml b/charts/package/Chart.yaml index b1e2216..b6029e5 100644 --- a/charts/package/Chart.yaml +++ b/charts/package/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: packager -version: 1.0.0 +version: 1.0.1 description: Allows bundling of supporting charts dependencies: - name: common diff --git a/charts/package/charts/common-2.13.3.tgz b/charts/package/charts/common-2.13.3.tgz new file mode 100644 index 0000000..3fe4889 Binary files /dev/null and b/charts/package/charts/common-2.13.3.tgz differ diff --git a/charts/package/charts/common-2.8.0.tgz b/charts/package/charts/common-2.8.0.tgz deleted file mode 100644 index 8a74369..0000000 Binary files a/charts/package/charts/common-2.8.0.tgz and /dev/null differ diff --git a/charts/package/templates/package/gitrepo.yml b/charts/package/templates/package/gitrepo.yml index 7480ce6..1b95897 100644 --- a/charts/package/templates/package/gitrepo.yml +++ b/charts/package/templates/package/gitrepo.yml @@ -4,7 +4,7 @@ {{- $pkg = include "resourceName" $pkg -}} {{- $fluxSettings := merge (dig "flux" dict $vals) $.Values.flux -}} --- -apiVersion: source.toolkit.fluxcd.io/v1 +apiVersion: source.toolkit.fluxcd.io/v1beta2 kind: GitRepository metadata: name: {{ $pkg }} diff --git a/charts/package/templates/package/helmreleases.yml b/charts/package/templates/package/helmreleases.yml index 459cdf4..6e10023 100644 --- a/charts/package/templates/package/helmreleases.yml +++ b/charts/package/templates/package/helmreleases.yml @@ -22,7 +22,7 @@ spec: sourceRef: kind: HelmRepository name: {{ dig "helmRepo" "repoName" "registry1" $vals }} - namespace: {{ $.Release.Namespace }} + namespace: {{ dig "namespace" $.Release.Namespace $vals.helmRepo }} {{- else if $vals.git }} chart: {{ dig "git" "path" "chart" $vals }} sourceRef: @@ -40,7 +40,8 @@ spec: {{- toYaml $vals.postRenderers | nindent 2 }} {{- end }} valuesFrom: - - name: {{ $pkg }}-values - kind: Secret + - kind: Secret + name: {{ $pkg }}-values + {{- toYaml $vals.valuesFrom | nindent 2 }} {{ end -}} {{- end -}} diff --git a/charts/package/templates/sources/helmrepo.yml b/charts/package/templates/sources/helmrepo.yml new file mode 100644 index 0000000..014c707 --- /dev/null +++ b/charts/package/templates/sources/helmrepo.yml @@ -0,0 +1,16 @@ +{{- /* Used for GitOps on a package's Helm chart */ -}} +{{- range $pkg, $vals := .Values.sources -}} +--- +apiVersion: source.toolkit.fluxcd.io/v1beta2 +kind: HelmRepository +metadata: + name: {{ $pkg }} + namespace: {{ dig "namespace" "flux-system" $vals }} + labels: + app.kubernetes.io/name: {{ $pkg }} + {{- include "commonLabels" $ | nindent 4 }} +spec: + url: {{ $vals.url }} + type: {{ dig "type" "generic" $vals }} + interval: {{ dig "interval" "10m0s" $vals }} +{{ end -}} diff --git a/charts/package/templates/wrapper/values.yml b/charts/package/templates/wrapper/values.yml index 7567c2a..e72f9e9 100644 --- a/charts/package/templates/wrapper/values.yml +++ b/charts/package/templates/wrapper/values.yml @@ -18,7 +18,7 @@ stringData: package: name: {{ $pkg }} {{- if (omit $overlays.package "git" "helmRepo" "flux" "postRenderers" "dependsOn") }} - {{- tpl (toYaml (omit $overlays.package "git" "helmRepo" "flux" "postRenderers" "dependsOn" "wrapper" "values")) $ | nindent 6 }} + {{- tpl (toYaml (omit $overlays.package "git" "helmRepo" "flux" "postRenderers" "dependsOn" "wrapper" "values" "valuesFrom")) $ | nindent 6 }} {{- end }} {{ end -}} {{- end -}} diff --git a/charts/package/values.yaml b/charts/package/values.yaml index 54e92d3..8fcf9e7 100644 --- a/charts/package/values.yaml +++ b/charts/package/values.yaml @@ -40,7 +40,7 @@ wrapper: # -- Name of the OCI chart in `repo` chartName: wrapper # -- Tag of the OCI chart in `repo` - tag: "1.0.5" + tag: "1.0.6" packages: sample: @@ -62,6 +62,8 @@ packages: chartName: # -- Tag of the chart in the Helm repo, required tag: + # Namespace to find the helm repo. + namespace: # -- Git source is supported for both Helm and Kustomize deployments. If both `git` and `helmRepo` are provided `helmRepo` will take precedence. git: @@ -79,6 +81,8 @@ packages: # -- Path inside of the git repo to find the helm chart or kustomize # @default -- For Helm charts `chart`. For Kustomize `/`. path: + # Namespace to find the git repo. + namespace: # -- Override flux settings for this package flux: {} diff --git a/charts/wrapper/Chart.lock b/charts/wrapper/Chart.lock index ad214aa..49e57c1 100644 --- a/charts/wrapper/Chart.lock +++ b/charts/wrapper/Chart.lock @@ -1,6 +1,6 @@ dependencies: - name: common repository: oci://registry-1.docker.io/bitnamicharts - version: 2.8.0 -digest: sha256:0119fce6b509ebf3eaf5218f87f6ec0af64ec7da15f272115673b0716c4b6919 -generated: "2023-08-08T17:31:27.09446986-04:00" + version: 2.13.3 +digest: sha256:9a971689db0c66ea95ac2e911c05014c2b96c6077c991131ff84f2982f88fb83 +generated: "2023-10-21T15:59:27.551162809-04:00" diff --git a/charts/wrapper/Chart.yaml b/charts/wrapper/Chart.yaml index d5e818b..4914704 100644 --- a/charts/wrapper/Chart.yaml +++ b/charts/wrapper/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: wrapper -version: 1.0.5 +version: 1.0.6 description: Adds extra supporting packages dependencies: - name: common diff --git a/charts/wrapper/charts/common-2.13.3.tgz b/charts/wrapper/charts/common-2.13.3.tgz new file mode 100644 index 0000000..3fe4889 Binary files /dev/null and b/charts/wrapper/charts/common-2.13.3.tgz differ diff --git a/charts/wrapper/charts/common-2.8.0.tgz b/charts/wrapper/charts/common-2.8.0.tgz deleted file mode 100644 index 8a74369..0000000 Binary files a/charts/wrapper/charts/common-2.8.0.tgz and /dev/null differ