Skip to content

Commit

Permalink
add default provisioner to helm chart
Browse files Browse the repository at this point in the history
  • Loading branch information
bwagner5 committed Nov 9, 2021
1 parent 82226ca commit eb198a2
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
karpenter
/karpenter
coverage.out
coverage.html
*.test
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ licenses: ## Verifies dependency licenses and requires GITHUB_TOKEN to be set
golicense hack/license-config.hcl karpenter

apply: ## Deploy the controller into your ~/.kube/config cluster
helm template karpenter charts/karpenter --namespace karpenter \
helm template --include-crds karpenter charts/karpenter --namespace karpenter \
$(HELM_OPTS) \
--set controller.image=ko://github.com/awslabs/karpenter/cmd/controller \
--set webhook.image=ko://github.com/awslabs/karpenter/cmd/webhook \
Expand Down
29 changes: 29 additions & 0 deletions charts/karpenter/templates/default_provisioner.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{{- if .Values.defaultProvisioner.create }}
apiVersion: karpenter.sh/v1alpha5
kind: Provisioner
metadata:
name: default
spec:
{{ if .Values.defaultProvisioner.ttlSecondsAfterEmpty }}
ttlSecondsAfterEmpty: {{ .Values.defaultProvisioner.ttlSecondsAfterEmpty }}
{{- end }}
{{ if .Values.defaultProvisioner.ttlSecondsUntilExpired }}
ttlSecondsUntilExpired: {{ .Values.defaultProvisioner.ttlSecondsUntilExpired }}
{{- end }}
{{- with .Values.defaultProvisioner.provider }}
provider:
{{- toYaml . | nindent 6 }}
{{- end }}
{{- with .Values.defaultProvisioner.taints }}
taints:
{{- toYaml . | nindent 6 }}
{{- end }}
{{- with .Values.defaultProvisioner.requirements }}
requirements:
{{- toYaml . | nindent 6 }}
{{- end }}
{{- with .Values.defaultProvisioner.labels }}
labels:
{{- toYaml . | nindent 6 }}
{{- end }}
{{- end }}
9 changes: 9 additions & 0 deletions charts/karpenter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,12 @@ webhook:
tolerations: []
affinity: {}
image: "public.ecr.aws/karpenter/webhook:v0.4.2@sha256:2d004cd277209242d7e886308be419f86107811b4d0f1ed21c908b77e284202b"
defaultProvisioner:
create: true
ttlSecondsAfterEmpty: 300
#ttlSecondsUntilExpired: 86400
provider: {}
requirements: []
taints: []
labels: {}

0 comments on commit eb198a2

Please sign in to comment.