diff --git a/charts/spiffe-helper-csi-driver/Chart.yaml b/charts/spiffe-helper-csi-driver/Chart.yaml index 566a94f36..b405875ab 100644 --- a/charts/spiffe-helper-csi-driver/Chart.yaml +++ b/charts/spiffe-helper-csi-driver/Chart.yaml @@ -20,3 +20,7 @@ maintainers: email: fymemon@yahoo.com - name: edwbuck email: edwbuck@gmail.com +dependencies: + - name: spire-lib + repository: file://../spire/charts/spire-lib + version: 0.1.0 diff --git a/charts/spiffe-helper-csi-driver/README.md b/charts/spiffe-helper-csi-driver/README.md index 8254f267d..0d59c204a 100644 --- a/charts/spiffe-helper-csi-driver/README.md +++ b/charts/spiffe-helper-csi-driver/README.md @@ -34,6 +34,14 @@ helm install -n spire-server spire-crds spire-crds --repo https://spiffe.github. helm install -n spire-server spire spire --repo https://spiffe.github.io/helm-charts-hardened/ ``` +## Build Instructions + +Until there is an official release of this chart, before you can use it out of git, you have to run +``` +cd charts/spiffe-helper-csi-driver +helm dep up +``` + ## Install Instructions ``` helm install -n spire-server spiffe-helper-csi-driver charts/spiffe-helper-csi-driver diff --git a/charts/spiffe-helper-csi-driver/templates/_spire-lib.tpl b/charts/spiffe-helper-csi-driver/templates/_spire-lib.tpl deleted file mode 100644 index 3ed589794..000000000 --- a/charts/spiffe-helper-csi-driver/templates/_spire-lib.tpl +++ /dev/null @@ -1,26 +0,0 @@ -{{- define "spire-lib.registry" }} -{{- if ne (len (dig "spire" "image" "registry" "" .global)) 0 }} -{{- print .global.spire.image.registry "/"}} -{{- else if ne (len (.image.registry)) 0 }} -{{- print .image.registry "/"}} -{{- end }} -{{- end }} - -{{- define "spire-lib.image" -}} -{{- $registry := include "spire-lib.registry" . }} -{{- $repo := .image.repository }} -{{- $tag := (default .image.tag .image.version) | toString }} -{{- if eq (substr 0 7 $tag) "sha256:" }} -{{- printf "%s/%s@%s" $registry $repo $tag }} -{{- else if .appVersion }} -{{- $appVersion := .appVersion }} -{{- if and (hasKey . "ubi") (dig "openshift" false .global) }} -{{- $appVersion = printf "ubi-%s" $appVersion }} -{{- end }} -{{- printf "%s%s:%s" $registry $repo (default $appVersion $tag) }} -{{- else if $tag }} -{{- printf "%s%s:%s" $registry $repo $tag }} -{{- else }} -{{- printf "%s%s" $registry $repo }} -{{- end }} -{{- end }}