diff --git a/charts/argocd-appset-secret-plugin/Chart.yaml b/charts/argocd-appset-secret-plugin/Chart.yaml index 94949df..6e9e1e7 100644 --- a/charts/argocd-appset-secret-plugin/Chart.yaml +++ b/charts/argocd-appset-secret-plugin/Chart.yaml @@ -16,7 +16,7 @@ maintainers: # pipeline. Library charts do not define any templates and therefore cannot be deployed. type: application -version: 0.4.0 +version: 0.5.0 # renovate: image=jessebot/argocd-appset-secret-plugin appVersion: "v0.3.0" diff --git a/charts/argocd-appset-secret-plugin/README.md b/charts/argocd-appset-secret-plugin/README.md index 6b08fc8..ad5bf08 100644 --- a/charts/argocd-appset-secret-plugin/README.md +++ b/charts/argocd-appset-secret-plugin/README.md @@ -1,6 +1,6 @@ # argocd-appset-secret-plugin -![Version: 0.4.0](https://img.shields.io/badge/Version-0.4.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.3.0](https://img.shields.io/badge/AppVersion-v0.3.0-informational?style=flat-square) +![Version: 0.5.0](https://img.shields.io/badge/Version-0.5.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.3.0](https://img.shields.io/badge/AppVersion-v0.3.0-informational?style=flat-square) A Helm chart for adding a K8s Secret Plugin Generator to ApplicationSets @@ -30,7 +30,8 @@ A Helm chart for adding a K8s Secret Plugin Generator to ApplicationSets | podSecurityContext | object | `{}` | securityContext for the pod: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ | | replicaCount | int | `1` | number of replica pods to create | | resources | object | `{}` | | -| secretVars.existingSecret | string | `""` | the name of an existing secret to use for the secret keys to provide to applicationSets via the plugin generator | +| secretVars.existingSecret.key | string | `"secret_vars.yaml"` | key in secretVars.existingSecret to use for IN-LINE yaml secret values, this key should be the name of the file you want to create in the argocd-appset-secret-plugin container | +| secretVars.existingSecret.name | string | `""` | the name of an existing secret to use for the secret keys to provide to ApplicationSets via the plugin generator defaults to "%s-secret-vars" where %s is argocd-appset-secret-plugin.fullname which is the name of the release or whatever you specified for fullnameOverride | | securityContext | object | `{}` | securityContext for the container: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ | | service.port | int | `80` | service port to expose on the cluster | | service.targetPort | int | `4355` | service target port on the container | diff --git a/charts/argocd-appset-secret-plugin/templates/_helpers.tpl b/charts/argocd-appset-secret-plugin/templates/_helpers.tpl index bf8021f..aa84ab4 100644 --- a/charts/argocd-appset-secret-plugin/templates/_helpers.tpl +++ b/charts/argocd-appset-secret-plugin/templates/_helpers.tpl @@ -86,10 +86,10 @@ Defining the token and base url values for the configmap Create the name of the vars secret to use: either from an existing secret or the fullname of the chart + "-secret-vars" */}} -{{- define "argocd-appset-secret-plugin.varSecret" -}} -{{- if not .Values.secretVars.existingSecret }} +{{- define "argocd-appset-secret-plugin.secretName" -}} +{{- if not .Values.secretVars.existingSecret.name }} {{- printf "%s-secret-vars" (include "argocd-appset-secret-plugin.fullname" .) }} {{- else }} -{{- .Values.secretVars.existingSecret }} +{{- .Values.secretVars.existingSecret.name }} {{- end }} {{- end }} diff --git a/charts/argocd-appset-secret-plugin/templates/deployment.yaml b/charts/argocd-appset-secret-plugin/templates/deployment.yaml index 4a65054..6f92f36 100644 --- a/charts/argocd-appset-secret-plugin/templates/deployment.yaml +++ b/charts/argocd-appset-secret-plugin/templates/deployment.yaml @@ -43,8 +43,8 @@ spec: subPath: "token" readOnly: true - name: secret-vars - mountPath: "/var/run/secret-plugin/secret_vars.yaml" - subPath: "secret_vars.yaml" + mountPath: "/var/run/secret-plugin/{{ .Values.secretVars.existingSecret.key }}" + subPath: {{ .Values.secretVars.existingSecret.key }} readOnly: true resources: {{- toYaml .Values.resources | nindent 12 }} @@ -54,7 +54,7 @@ spec: secretName: "{{ include "argocd-appset-secret-plugin.tokenSecret" . }}" - name: secret-vars secret: - secretName: "{{ include "argocd-appset-secret-plugin.varSecret" . }}" + secretName: "{{ include "argocd-appset-secret-plugin.secretName" . }}" {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/charts/argocd-appset-secret-plugin/values.yaml b/charts/argocd-appset-secret-plugin/values.yaml index d916a86..749a410 100644 --- a/charts/argocd-appset-secret-plugin/values.yaml +++ b/charts/argocd-appset-secret-plugin/values.yaml @@ -19,8 +19,14 @@ nameOverride: "" fullnameOverride: "" secretVars: - # -- the name of an existing secret to use for the secret keys to provide to applicationSets via the plugin generator - existingSecret: "" + existingSecret: + # -- the name of an existing secret to use for the secret keys to provide to ApplicationSets via the plugin generator + # defaults to "%s-secret-vars" where %s is argocd-appset-secret-plugin.fullname which is the name of the + # release or whatever you specified for fullnameOverride + name: "" + # -- key in secretVars.existingSecret to use for IN-LINE yaml secret values, this key should be + # the name of the file you want to create in the argocd-appset-secret-plugin container + key: "secret_vars.yaml" token: # -- the name of an existing secret to use for the token that argoCD and the plugin will use for communication