-
Notifications
You must be signed in to change notification settings - Fork 832
/
webhooks.yaml
67 lines (67 loc) · 1.74 KB
/
webhooks.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
{{- if .Values.webhook.enabled }}
apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
name: defaulting.webhook.karpenter.k8s.aws
labels:
{{- include "karpenter.labels" . | nindent 4 }}
{{- with .Values.additionalAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
webhooks:
- name: defaulting.webhook.karpenter.k8s.aws
admissionReviewVersions: ["v1"]
clientConfig:
service:
name: {{ include "karpenter.fullname" . }}
namespace: {{ .Release.Namespace }}
port: {{ .Values.webhook.port }}
failurePolicy: Fail
sideEffects: None
rules:
- apiGroups:
- karpenter.k8s.aws
apiVersions:
- v1beta1
operations:
- CREATE
- UPDATE
resources:
- ec2nodeclasses
- ec2nodeclasses/status
scope: '*'
---
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
name: validation.webhook.karpenter.k8s.aws
labels:
{{- include "karpenter.labels" . | nindent 4 }}
{{- with .Values.additionalAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
webhooks:
- name: validation.webhook.karpenter.k8s.aws
admissionReviewVersions: ["v1"]
clientConfig:
service:
name: {{ include "karpenter.fullname" . }}
namespace: {{ .Release.Namespace }}
port: {{ .Values.webhook.port }}
failurePolicy: Fail
sideEffects: None
rules:
- apiGroups:
- karpenter.k8s.aws
apiVersions:
- v1beta1
operations:
- CREATE
- UPDATE
resources:
- ec2nodeclasses
- ec2nodeclasses/status
scope: '*'
{{- end }}