From 2b722efce7da30b03bec317c34ac5c8764ed4ece Mon Sep 17 00:00:00 2001 From: Lucas Bickel Date: Thu, 3 Dec 2020 16:13:55 +0100 Subject: [PATCH] feat(csi-secret-provider-class): intialize chart (#127) --- .env | 1 + README.md | 1 + charts/csi-secret-provider-class/.helmignore | 23 +++++++++ charts/csi-secret-provider-class/Chart.lock | 6 +++ charts/csi-secret-provider-class/Chart.yaml | 17 +++++++ charts/csi-secret-provider-class/README.md | 47 +++++++++++++++++++ .../ci/default-values.yaml | 5 ++ .../templates/NOTES.txt | 1 + .../templates/secretproviderclass.yaml | 13 +++++ charts/csi-secret-provider-class/values.yaml | 16 +++++++ hack/deploy/init.sh | 3 ++ 11 files changed, 133 insertions(+) create mode 100644 charts/csi-secret-provider-class/.helmignore create mode 100644 charts/csi-secret-provider-class/Chart.lock create mode 100644 charts/csi-secret-provider-class/Chart.yaml create mode 100644 charts/csi-secret-provider-class/README.md create mode 100644 charts/csi-secret-provider-class/ci/default-values.yaml create mode 100644 charts/csi-secret-provider-class/templates/NOTES.txt create mode 100644 charts/csi-secret-provider-class/templates/secretproviderclass.yaml create mode 100644 charts/csi-secret-provider-class/values.yaml diff --git a/.env b/.env index 6a7fef60f..6b6eb8d24 100644 --- a/.env +++ b/.env @@ -14,3 +14,4 @@ HELM_DOCS_TEMPLATE_FILE="../../hack/config/helm-docs/README.md.gotmpl" # infra tools ADFINIS_CHARTS_ARGOCD_VERSION="1.5.2" ADFINIS_CHARTS_PROMETHEUS_OPERATOR_VERSION="0.38" +ADFINIS_CHARTS_SECRETS_STORE_CSI_DRIVER_VERSION="0.0.17" diff --git a/README.md b/README.md index cbcfbb9e2..b6571ae4f 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,7 @@ helm repo add adfinis https://charts.adfinis.com | [barman](charts/barman) | Chart for Barman PostgreSQL Backup and Recovery Manager | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) ![App version: 2.1.x](https://img.shields.io/badge/app%20version-2.1.x-brightgreen) | | [caasperli](charts/caasperli) | Deploy Caasperli to a Kubernetes Cluster | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) ![App version: latest](https://img.shields.io/badge/app%20version-latest-brightgreen) | | [common](charts/common) | Common chartbuilding components and helpers, based on incubator/common | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) ![App version: 0.x](https://img.shields.io/badge/app%20version-0.x-brightgreen) | +| [csi-secret-provider-class](charts/csi-secret-provider-class) | A Helm chart to create a SecretProviderClass resource | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) ![App version: 0.x](https://img.shields.io/badge/app%20version-0.x-brightgreen) | | [infra-apps](charts/infra-apps) | Argo CD app-of-apps config for infrastructure components | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) ![App version: 0.x](https://img.shields.io/badge/app%20version-0.x-brightgreen) | | [logging-apps](charts/logging-apps) | Argo CD app-of-apps config for logging applications | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) ![App version: 0.x](https://img.shields.io/badge/app%20version-0.x-brightgreen) | | [misc-apps](charts/misc-apps) | Argo CD app-of-apps config for miscellaneous small tools | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) ![App version: 0.x](https://img.shields.io/badge/app%20version-0.x-brightgreen) | diff --git a/charts/csi-secret-provider-class/.helmignore b/charts/csi-secret-provider-class/.helmignore new file mode 100644 index 000000000..0e8a0eb36 --- /dev/null +++ b/charts/csi-secret-provider-class/.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/csi-secret-provider-class/Chart.lock b/charts/csi-secret-provider-class/Chart.lock new file mode 100644 index 000000000..0005910d0 --- /dev/null +++ b/charts/csi-secret-provider-class/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: common + repository: https://charts.adfinis.com + version: 0.0.5 +digest: sha256:9ee68395c06e42a72b7e849e1df7b3be6c658ade9aa4911d195d8e380981f7fb +generated: "2020-12-03T16:06:53.437610587+01:00" diff --git a/charts/csi-secret-provider-class/Chart.yaml b/charts/csi-secret-provider-class/Chart.yaml new file mode 100644 index 000000000..6067ac919 --- /dev/null +++ b/charts/csi-secret-provider-class/Chart.yaml @@ -0,0 +1,17 @@ +apiVersion: v2 +name: csi-secret-provider-class +description: A Helm chart to create a SecretProviderClass resource +type: application +version: 0.1.0 +appVersion: 0.1.0 +home: https://github.com/adfinis-sygroup/helm-charts/tree/master/charts/csi-secret-provider-class +sources: + - https://github.com/adfinis-sygroup/helm-charts +maintainers: + - name: adfinis-sygroup + email: support@adfinis.com + url: https://adfinis.com +dependencies: + - name: common + repository: https://charts.adfinis.com + version: 0.0.5 diff --git a/charts/csi-secret-provider-class/README.md b/charts/csi-secret-provider-class/README.md new file mode 100644 index 000000000..81944b7bf --- /dev/null +++ b/charts/csi-secret-provider-class/README.md @@ -0,0 +1,47 @@ +# csi-secret-provider-class + +![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.0](https://img.shields.io/badge/AppVersion-0.1.0-informational?style=flat-square) + +A Helm chart to create a SecretProviderClass resource + +**Homepage:** + +## Maintainers +This chart is maintained by [Adfinis](https://adfinis.com/?pk_campaign=github&pk_kwd=helm-charts). + +## Source Code + +* + +## Requirements + +| Repository | Name | Version | +|------------|------|---------| +| https://charts.adfinis.com | common | 0.0.5 | + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| parameters | object | `{}` | parameters for provider | +| parametersTpl | string | raw values from `parameters` | template to generate parameters | +| provider | string | `nil` | specify secret provider | +| secretObjects | list | `[]` | secretObjects for for SecretProviderClass | +| secretObjectsTpl | string | raw values from `secretObjects` | template to generate secretObjects | + +## About this chart + +Adfinis fights for a software world that is more open, where the quality is +better and where software must be accessible to everyone. This chart +is part of the action behind this commitment. Feel free to +[contact](https://adfinis.com/kontakt/?pk_campaign=github&pk_kwd=helm-charts) +us if you have any questions. + +## License + +This Helm chart is free software: you can redistribute it and/or modify it under the terms +of the GNU Affero General Public License as published by the Free Software Foundation, +version 3 of the License. + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.4.0](https://github.com/norwoodj/helm-docs/releases/v1.4.0) diff --git a/charts/csi-secret-provider-class/ci/default-values.yaml b/charts/csi-secret-provider-class/ci/default-values.yaml new file mode 100644 index 000000000..5a4436d7c --- /dev/null +++ b/charts/csi-secret-provider-class/ci/default-values.yaml @@ -0,0 +1,5 @@ +provider: dummy +parameters: + foo: bar +secretObjects: + - secretName: test diff --git a/charts/csi-secret-provider-class/templates/NOTES.txt b/charts/csi-secret-provider-class/templates/NOTES.txt new file mode 100644 index 000000000..37a0eebcf --- /dev/null +++ b/charts/csi-secret-provider-class/templates/NOTES.txt @@ -0,0 +1 @@ +The {{ template "common.fullname" . }} SecretProviderClass was installed. diff --git a/charts/csi-secret-provider-class/templates/secretproviderclass.yaml b/charts/csi-secret-provider-class/templates/secretproviderclass.yaml new file mode 100644 index 000000000..4251c3a4b --- /dev/null +++ b/charts/csi-secret-provider-class/templates/secretproviderclass.yaml @@ -0,0 +1,13 @@ +apiVersion: secrets-store.csi.x-k8s.io/v1alpha1 +kind: SecretProviderClass +{{ template "common.metadata" $ }} +spec: + provider: {{ required "Specify a valid provider." .Values.provider }} + {{- if .Values.parameters }} + parameters: + {{- tpl .Values.parametersTpl . | nindent 4 }} + {{- end }} + {{- if .Values.secretObjects }} + secretObjects: + {{- tpl .Values.secretObjectsTpl . | nindent 4 }} + {{- end }} diff --git a/charts/csi-secret-provider-class/values.yaml b/charts/csi-secret-provider-class/values.yaml new file mode 100644 index 000000000..11b602d01 --- /dev/null +++ b/charts/csi-secret-provider-class/values.yaml @@ -0,0 +1,16 @@ +# provider -- specify secret provider +provider: ~ + +# parameters -- parameters for provider +parameters: {} + +# parametersTpl -- template to generate parameters +# @default -- raw values from `parameters` +parametersTpl: "{{ .Values.parameters | toYaml }}" + +# secretObjects -- secretObjects for for SecretProviderClass +secretObjects: [] + +# secretObjectsTpl -- template to generate secretObjects +# @default -- raw values from `secretObjects` +secretObjectsTpl: "{{ .Values.secretObjects | toYaml }}" diff --git a/hack/deploy/init.sh b/hack/deploy/init.sh index d80c3479f..cd0f02bc1 100755 --- a/hack/deploy/init.sh +++ b/hack/deploy/init.sh @@ -7,6 +7,7 @@ source hack/sh/rc.sh readonly infra_ns=$ADFINIS_CHARTS_INFRA_NS readonly argocd_version=$ADFINIS_CHARTS_ARGOCD_VERSION readonly prometheus_operator_version=$ADFINIS_CHARTS_PROMETHEUS_OPERATOR_VERSION +readonly secrets_store_csi_driver_version=$ADFINIS_CHARTS_SECRETS_STORE_CSI_DRIVER_VERSION set +x @@ -19,3 +20,5 @@ kubectl apply -f https://raw.githubusercontent.com/argoproj/argo-cd/v$argocd_ver kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/release-$prometheus_operator_version/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/release-$prometheus_operator_version/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml + +kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/secrets-store-csi-driver/v$secrets_store_csi_driver_version/deploy/secrets-store.csi.x-k8s.io_secretproviderclasses.yaml