From 817c62f32542da450821efd7bde780d7fdbb899b Mon Sep 17 00:00:00 2001 From: Kevin Fox Date: Tue, 29 Aug 2023 10:42:55 -0700 Subject: [PATCH 1/5] Move spire-lib macro's to their own library chart Signed-off-by: Kevin Fox --- charts/spire/Chart.yaml | 3 +++ charts/spire/README.md | 1 + charts/spire/charts/spire-lib/.helmignore | 23 +++++++++++++++++++ charts/spire/charts/spire-lib/Chart.yaml | 20 ++++++++++++++++ .../spire-lib/templates/_helpers.tpl} | 0 5 files changed, 47 insertions(+) create mode 100644 charts/spire/charts/spire-lib/.helmignore create mode 100644 charts/spire/charts/spire-lib/Chart.yaml rename charts/spire/{templates/_spire-lib.tpl => charts/spire-lib/templates/_helpers.tpl} (100%) diff --git a/charts/spire/Chart.yaml b/charts/spire/Chart.yaml index e5619d633..266ed069f 100644 --- a/charts/spire/Chart.yaml +++ b/charts/spire/Chart.yaml @@ -22,6 +22,9 @@ maintainers: email: edwbuck@gmail.com kubeVersion: ">=1.21.0-0" dependencies: + - name: spire-lib + repository: file://./charts/spire-lib + version: 0.1.0 - name: spire-server condition: spire-server.enabled repository: file://./charts/spire-server diff --git a/charts/spire/README.md b/charts/spire/README.md index f7610473a..0b812f5b5 100644 --- a/charts/spire/README.md +++ b/charts/spire/README.md @@ -82,6 +82,7 @@ Now you can interact with the Spire agent socket from your own application. The | file://./charts/spiffe-oidc-discovery-provider | spiffe-oidc-discovery-provider | 0.1.0 | | file://./charts/spire-agent | spire-agent | 0.1.0 | | file://./charts/spire-agent | upstream-spire-agent(spire-agent) | 0.1.0 | +| file://./charts/spire-lib | spire-lib | 0.1.0 | | file://./charts/spire-server | spire-server | 0.1.0 | | file://./charts/tornjak-frontend | tornjak-frontend | 0.1.0 | diff --git a/charts/spire/charts/spire-lib/.helmignore b/charts/spire/charts/spire-lib/.helmignore new file mode 100644 index 000000000..0e8a0eb36 --- /dev/null +++ b/charts/spire/charts/spire-lib/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/charts/spire/charts/spire-lib/Chart.yaml b/charts/spire/charts/spire-lib/Chart.yaml new file mode 100644 index 000000000..48a76bf20 --- /dev/null +++ b/charts/spire/charts/spire-lib/Chart.yaml @@ -0,0 +1,20 @@ +apiVersion: v2 +name: spire-lib +description: A library of helper templates for spire +type: library +version: 0.1.0 +appVersion: "0.1.0" +home: https://github.com/spiffe/helm-charts/tree/main/charts/spire +sources: + - https://github.com/spiffe/helm-charts/tree/main/charts/spire +icon: https://spiffe.io/img/logos/spire/icon/color/spire-icon-color.png +maintainers: + - name: marcofranssen + email: marco.franssen@gmail.com + url: https://marcofranssen.nl + - name: kfox1111 + email: Kevin.Fox@pnnl.gov + - name: faisal-memon + email: fymemon@yahoo.com + - name: edwbuck + email: edwbuck@gmail.com diff --git a/charts/spire/templates/_spire-lib.tpl b/charts/spire/charts/spire-lib/templates/_helpers.tpl similarity index 100% rename from charts/spire/templates/_spire-lib.tpl rename to charts/spire/charts/spire-lib/templates/_helpers.tpl From 85c801375e8d7d96bbafe0b92f109e2e676d0f83 Mon Sep 17 00:00:00 2001 From: Kevin Fox Date: Mon, 11 Sep 2023 08:38:47 -0700 Subject: [PATCH 2/5] Add dummy values Signed-off-by: Kevin Fox --- charts/spire/charts/spire-lib/values.yaml | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 charts/spire/charts/spire-lib/values.yaml diff --git a/charts/spire/charts/spire-lib/values.yaml b/charts/spire/charts/spire-lib/values.yaml new file mode 100644 index 000000000..e69de29bb From 94330f124cf630c892d1a49d056208662b16f28d Mon Sep 17 00:00:00 2001 From: Kevin Fox Date: Mon, 11 Sep 2023 09:54:58 -0700 Subject: [PATCH 3/5] Docs need to ignore spire-lib Signed-off-by: Kevin Fox --- charts/spire/charts/spire-lib/values.yaml | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 charts/spire/charts/spire-lib/values.yaml diff --git a/charts/spire/charts/spire-lib/values.yaml b/charts/spire/charts/spire-lib/values.yaml deleted file mode 100644 index e69de29bb..000000000 From 18b046f40abe2042cca691496a0a9e3234b43fa6 Mon Sep 17 00:00:00 2001 From: Kevin Fox Date: Mon, 11 Sep 2023 10:05:46 -0700 Subject: [PATCH 4/5] Docs need to ignore spire-lib Signed-off-by: Kevin Fox --- helm-docs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm-docs.sh b/helm-docs.sh index 91cc2bb91..70e83e533 100755 --- a/helm-docs.sh +++ b/helm-docs.sh @@ -14,7 +14,7 @@ if ! hash "${README_GENERATOR_EXE}" 2>/dev/null; then fi # generate docs and show the diff -mapfile -t chart_paths < <(find "$SCRIPTPATH/charts" -type f -iname "Chart.yaml" -exec dirname {} +) +mapfile -t chart_paths < <(find "$SCRIPTPATH/charts" -type f -iname "Chart.yaml" ! -name "*spire-lib/Chart.yaml" -exec dirname {} +) for cpath in "${chart_paths[@]}" do echo >&2 "Generating Chart documentation for ${cpath}…" From 64e0556bc854cccff3508beadccf6a2cf9d1374e Mon Sep 17 00:00:00 2001 From: Kevin Fox Date: Mon, 11 Sep 2023 10:32:05 -0700 Subject: [PATCH 5/5] Docs need to ignore spire-lib Signed-off-by: Kevin Fox --- helm-docs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm-docs.sh b/helm-docs.sh index 70e83e533..3f9943d18 100755 --- a/helm-docs.sh +++ b/helm-docs.sh @@ -14,7 +14,7 @@ if ! hash "${README_GENERATOR_EXE}" 2>/dev/null; then fi # generate docs and show the diff -mapfile -t chart_paths < <(find "$SCRIPTPATH/charts" -type f -iname "Chart.yaml" ! -name "*spire-lib/Chart.yaml" -exec dirname {} +) +mapfile -t chart_paths < <(find "$SCRIPTPATH/charts" -type f -iname "Chart.yaml" -exec dirname {} + | grep -v spire-lib) for cpath in "${chart_paths[@]}" do echo >&2 "Generating Chart documentation for ${cpath}…"