Skip to content

Commit

Permalink
Added support to deploy injector as daemonset (#242)
Browse files Browse the repository at this point in the history
* Added support to deploy injector as daemonset

* Update Chart version

* Update values.yaml

* Remove deploymentType from values.yaml
  • Loading branch information
OriBenHur-akeyless authored Apr 30, 2024
1 parent 2b6aa1a commit 9659642
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/akeyless-k8s-secrets-injection/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 1.8.4
version: 1.8.5

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
Expand Down
12 changes: 12 additions & 0 deletions charts/akeyless-k8s-secrets-injection/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,15 @@ Create the name of the service account to use
{{- printf "autoscaling/v2beta2" }}
{{- end }}
{{- end }}

{{- define "deyploymant.type" -}}
{{- if .Values.deploymentType -}}
{{- if eq .Values.deploymentType "DaemonSet" -}}
{{- printf "DaemonSet" -}}
{{- else -}}
{{- printf "Deployment" -}}
{{- end -}}
{{- else -}}
{{- printf "Deployment" -}}
{{- end -}}
{{- end -}}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: apps/v1
kind: Deployment
kind: {{ include "deyploymant.type" $ }}
metadata:
name: {{ template "vault-secrets-webhook.fullname" . }}
labels:
Expand All @@ -12,7 +12,7 @@ metadata:
{{- toYaml .Values.deployment.labels | nindent 4 }}
{{- end }}
spec:
{{- if not .Values.HPA.enabled }}
{{- if and (eq (include "deyploymant.type" $) "Deployment") (not .Values.HPA.enabled) }}
replicas: {{ .Values.replicaCount }}
{{- end }}
selector:
Expand Down

0 comments on commit 9659642

Please sign in to comment.