-
Notifications
You must be signed in to change notification settings - Fork 960
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Add v1 APIs and Conversion webhooks for v0.35.x (#6620)
- Loading branch information
Showing
38 changed files
with
9,245 additions
and
611 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
charts/karpenter-crd/templates/karpenter.k8s.aws_ec2nodeclasses.yaml
This file was deleted.
Oops, something went wrong.
1,295 changes: 1,295 additions & 0 deletions
1,295
charts/karpenter-crd/templates/karpenter.k8s.aws_ec2nodeclasses.yaml
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
828 changes: 828 additions & 0 deletions
828
charts/karpenter-crd/templates/karpenter.sh_nodeclaims.yaml
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
1,041 changes: 1,041 additions & 0 deletions
1,041
charts/karpenter-crd/templates/karpenter.sh_nodepools.yaml
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
webhook: | ||
# -- Whether to enable the webhooks and webhook permissions. | ||
enabled: true | ||
serviceName: karpenter | ||
serviceNamespace: kube-system | ||
# -- The container port to use for the webhook. | ||
port: 8443 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: {{ .Release.Name }}-post-install-hook | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
{{- include "karpenter.labels" . | nindent 4 }} | ||
annotations: | ||
"helm.sh/hook": post-install,post-upgrade,post-rollback | ||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded,hook-failed | ||
{{- with .Values.additionalAnnotations }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
ttlSecondsAfterFinished: 0 | ||
template: | ||
spec: | ||
serviceAccountName: {{ include "karpenter.serviceAccountName" . }} | ||
restartPolicy: OnFailure | ||
{{- with .Values.tolerations }} | ||
tolerations: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
containers: | ||
- name: post-install-job | ||
image: public.ecr.aws/bitnami/kubectl:1.30 | ||
command: | ||
- /bin/sh | ||
- -c | ||
- | | ||
{{- if .Values.webhook.enabled }} | ||
kubectl patch customresourcedefinitions nodepools.karpenter.sh --type='merge' -p '{"spec":{"conversion":{"strategy": "Webhook", "webhook":{"conversionReviewVersions": ["v1beta1", "v1"], "clientConfig":{"service":{"name":"{{ include "karpenter.fullname" . }}", "port": {{ .Values.webhook.port }} ,"namespace": "{{ .Release.Namespace }}"}}}}}}' | ||
kubectl patch customresourcedefinitions nodeclaims.karpenter.sh --type='merge' -p '{"spec":{"conversion":{"strategy": "Webhook", "webhook":{"conversionReviewVersions": ["v1beta1", "v1"], "clientConfig":{"service":{"name":"{{ include "karpenter.fullname" . }}", "port": {{ .Values.webhook.port }} ,"namespace": "{{ .Release.Namespace }}"}}}}}}' | ||
kubectl patch customresourcedefinitions ec2nodeclasses.karpenter.k8s.aws --type='merge' -p '{"spec":{"conversion":{"strategy": "Webhook", "webhook":{"conversionReviewVersions": ["v1beta1", "v1"], "clientConfig":{"service":{"name":"{{ include "karpenter.fullname" . }}", "port": {{ .Values.webhook.port }} ,"namespace": "{{ .Release.Namespace }}"}}}}}}' | ||
{{- else }} | ||
echo "disabled webhooks" | ||
kubectl patch customresourcedefinitions nodepools.karpenter.sh --type='json' -p '[{'op': 'remove', 'path': '/spec/conversion'}]' | ||
kubectl patch customresourcedefinitions nodeclaims.karpenter.sh --type='json' -p '[{'op': 'remove', 'path': '/spec/conversion'}]' | ||
kubectl patch customresourcedefinitions ec2nodeclasses.karpenter.k8s.aws --type='json' -p '[{'op': 'remove', 'path': '/spec/conversion'}]' | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.