Skip to content

Commit

Permalink
Fix ecs-inventory & k8s-inventory existing secrets (#349)
Browse files Browse the repository at this point in the history
* dont fail deployment if using existing secrets (#195)

* dont fail deployment if using existing secrets
* bump chart version

---------

* K8s inventory fix existing secrets (#196)

* change useExistingSecrets to match values useExistingSecret in values file
* bump chart version
* fix existing secret reference in ecs-inventory chart

---------

Signed-off-by: Brady Todhunter <[email protected]>
  • Loading branch information
Btodhunter authored Feb 16, 2024
1 parent 8eeb28a commit be69782
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion stable/ecs-inventory/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ maintainers:
email: [email protected]

type: application
version: 0.0.5
version: 0.0.6
appVersion: "1.3.0"

icon: https://anchore.com/wp-content/uploads/2016/08/anchore.png
2 changes: 1 addition & 1 deletion stable/ecs-inventory/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
{{- with .Values.annotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if not .Values.useExistingSecrets }}
{{- if not .Values.useExistingSecret }}
checksum/secrets: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
{{- end }}
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
Expand Down
2 changes: 1 addition & 1 deletion stable/k8s-inventory/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: k8s-inventory
version: 0.2.0
version: 0.2.2
appVersion: "1.2.0"
description: A Helm chart for Kubernetes Automated Inventory, which describes which images are in use in a given Kubernetes Cluster
keywords:
Expand Down
4 changes: 2 additions & 2 deletions stable/k8s-inventory/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Create the name of the service account to use
Require Anchore endpoint and Anchore credentials
*/}}
{{- define "checkAnchoreRequisites" }}
{{- if or (not .Values.k8sInventory.anchore.url) (not .Values.k8sInventory.anchore.user) (not .Values.k8sInventory.anchore.password) }}
{{- if or (not .Values.k8sInventory.anchore.url) (not .Values.k8sInventory.anchore.user) (and (not .Values.useExistingSecret) (not .Values.k8sInventory.anchore.password)) }}
{{- fail "Anchore endpoint and credentials are required. See the chart README for more instructions on configuring Anchore Requisites." }}
{{- end }}
{{- end }}
{{- end }}
2 changes: 1 addition & 1 deletion stable/k8s-inventory/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ spec:
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if not .Values.useExistingSecrets }}
{{- if not .Values.useExistingSecret }}
checksum/secrets: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
{{- end }}
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
Expand Down
2 changes: 1 addition & 1 deletion stable/k8s-inventory/templates/secrets.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if not .Values.useExistingSecrets }}
{{- if not .Values.useExistingSecret }}
apiVersion: v1
kind: Secret
metadata:
Expand Down

0 comments on commit be69782

Please sign in to comment.