Skip to content

Commit

Permalink
Updated wrapper and package
Browse files Browse the repository at this point in the history
  • Loading branch information
a1994sc committed Oct 21, 2023
1 parent e7c785d commit adc7dd0
Show file tree
Hide file tree
Showing 13 changed files with 35 additions and 14 deletions.
6 changes: 3 additions & 3 deletions charts/package/Chart.lock
Original file line number Diff line number Diff line change
@@ -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"
2 changes: 1 addition & 1 deletion charts/package/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Binary file added charts/package/charts/common-2.13.3.tgz
Binary file not shown.
Binary file removed charts/package/charts/common-2.8.0.tgz
Binary file not shown.
2 changes: 1 addition & 1 deletion charts/package/templates/package/gitrepo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
7 changes: 4 additions & 3 deletions charts/package/templates/package/helmreleases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 -}}
16 changes: 16 additions & 0 deletions charts/package/templates/sources/helmrepo.yml
Original file line number Diff line number Diff line change
@@ -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 -}}
2 changes: 1 addition & 1 deletion charts/package/templates/wrapper/values.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}
6 changes: 5 additions & 1 deletion charts/package/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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: {}
Expand Down
6 changes: 3 additions & 3 deletions charts/wrapper/Chart.lock
Original file line number Diff line number Diff line change
@@ -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"
2 changes: 1 addition & 1 deletion charts/wrapper/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: wrapper
version: 1.0.5
version: 1.0.6
description: Adds extra supporting packages
dependencies:
- name: common
Expand Down
Binary file added charts/wrapper/charts/common-2.13.3.tgz
Binary file not shown.
Binary file removed charts/wrapper/charts/common-2.8.0.tgz
Binary file not shown.

0 comments on commit adc7dd0

Please sign in to comment.