Skip to content

Commit

Permalink
Merge pull request #38 from projectsyn/webhooks
Browse files Browse the repository at this point in the history
Enable webhooks by default
  • Loading branch information
ccremer authored Aug 24, 2022
2 parents 4efa1ec + c698fd9 commit 18eec8b
Show file tree
Hide file tree
Showing 14 changed files with 195 additions and 1 deletion.
2 changes: 2 additions & 0 deletions class/defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,5 @@ parameters:
cpu: 500m
metrics:
enabled: ${crossplane:monitoring:enabled}
webhooks:
enabled: true
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/references/parameters.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ parameters:
crossplane:
images:
crossplane:
image: mymirror.io/crossplane/crossplane
registry: mymirror.io
providers:
helm:
package: crossplane/provider-helm:v0.3.5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,18 @@ spec:
fieldPath: metadata.namespace
- name: LEADER_ELECTION
value: 'true'
- name: WEBHOOK_TLS_SECRET_NAME
value: webhook-tls-secret
- name: WEBHOOK_TLS_CERT_DIR
value: /webhook/tls
image: docker.io/crossplane/crossplane:v1.9.0
imagePullPolicy: IfNotPresent
name: crossplane
ports:
- containerPort: 8080
name: metrics
- containerPort: 9443
name: webhooks
resources:
limits:
cpu: 1000m
Expand All @@ -69,6 +75,8 @@ spec:
volumeMounts:
- mountPath: /cache
name: package-cache
- mountPath: /webhook/tls
name: webhook-tls-secret
initContainers:
- args:
- core
Expand All @@ -78,6 +86,16 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: WEBHOOK_TLS_SECRET_NAME
value: webhook-tls-secret
- name: WEBHOOK_SERVICE_NAME
value: crossplane-webhooks
- name: WEBHOOK_SERVICE_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: WEBHOOK_SERVICE_PORT
value: '9443'
image: docker.io/crossplane/crossplane:v1.9.0
imagePullPolicy: IfNotPresent
name: crossplane-init
Expand All @@ -100,3 +118,6 @@ spec:
medium: null
sizeLimit: 5Mi
name: package-cache
- name: webhook-tls-secret
secret:
secretName: webhook-tls-secret
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: v1
kind: Secret
metadata:
name: webhook-tls-secret
type: Opaque
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: v1
kind: Service
metadata:
labels:
app: crossplane
app.kubernetes.io/component: cloud-infrastructure-controller
app.kubernetes.io/instance: crossplane
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: crossplane
app.kubernetes.io/part-of: crossplane
app.kubernetes.io/version: 1.9.0
helm.sh/chart: crossplane-1.9.0
release: crossplane
name: crossplane-webhooks
spec:
ports:
- port: 9443
protocol: TCP
targetPort: 9443
selector:
app: crossplane
release: crossplane
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,18 @@ spec:
fieldPath: metadata.namespace
- name: LEADER_ELECTION
value: 'true'
- name: WEBHOOK_TLS_SECRET_NAME
value: webhook-tls-secret
- name: WEBHOOK_TLS_CERT_DIR
value: /webhook/tls
image: docker.io/crossplane/crossplane:v1.9.0
imagePullPolicy: IfNotPresent
name: crossplane
ports:
- containerPort: 8080
name: metrics
- containerPort: 9443
name: webhooks
resources:
limits:
cpu: 1000m
Expand All @@ -69,6 +75,8 @@ spec:
volumeMounts:
- mountPath: /cache
name: package-cache
- mountPath: /webhook/tls
name: webhook-tls-secret
initContainers:
- args:
- core
Expand All @@ -78,6 +86,16 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: WEBHOOK_TLS_SECRET_NAME
value: webhook-tls-secret
- name: WEBHOOK_SERVICE_NAME
value: crossplane-webhooks
- name: WEBHOOK_SERVICE_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: WEBHOOK_SERVICE_PORT
value: '9443'
image: docker.io/crossplane/crossplane:v1.9.0
imagePullPolicy: IfNotPresent
name: crossplane-init
Expand All @@ -100,3 +118,6 @@ spec:
medium: null
sizeLimit: 5Mi
name: package-cache
- name: webhook-tls-secret
secret:
secretName: webhook-tls-secret
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: v1
kind: Secret
metadata:
name: webhook-tls-secret
type: Opaque
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: v1
kind: Service
metadata:
labels:
app: crossplane
app.kubernetes.io/component: cloud-infrastructure-controller
app.kubernetes.io/instance: crossplane
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: crossplane
app.kubernetes.io/part-of: crossplane
app.kubernetes.io/version: 1.9.0
helm.sh/chart: crossplane-1.9.0
release: crossplane
name: crossplane-webhooks
spec:
ports:
- port: 9443
protocol: TCP
targetPort: 9443
selector:
app: crossplane
release: crossplane
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,18 @@ spec:
fieldPath: metadata.namespace
- name: LEADER_ELECTION
value: 'true'
- name: WEBHOOK_TLS_SECRET_NAME
value: webhook-tls-secret
- name: WEBHOOK_TLS_CERT_DIR
value: /webhook/tls
image: docker.io/crossplane/crossplane:v1.9.0
imagePullPolicy: IfNotPresent
name: crossplane
ports:
- containerPort: 8080
name: metrics
- containerPort: 9443
name: webhooks
resources:
limits:
cpu: 1000m
Expand All @@ -69,6 +75,8 @@ spec:
volumeMounts:
- mountPath: /cache
name: package-cache
- mountPath: /webhook/tls
name: webhook-tls-secret
initContainers:
- args:
- core
Expand All @@ -78,6 +86,16 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: WEBHOOK_TLS_SECRET_NAME
value: webhook-tls-secret
- name: WEBHOOK_SERVICE_NAME
value: crossplane-webhooks
- name: WEBHOOK_SERVICE_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: WEBHOOK_SERVICE_PORT
value: '9443'
image: docker.io/crossplane/crossplane:v1.9.0
imagePullPolicy: IfNotPresent
name: crossplane-init
Expand All @@ -100,3 +118,6 @@ spec:
medium: null
sizeLimit: 5Mi
name: package-cache
- name: webhook-tls-secret
secret:
secretName: webhook-tls-secret
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: v1
kind: Secret
metadata:
name: webhook-tls-secret
type: Opaque
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: v1
kind: Service
metadata:
labels:
app: crossplane
app.kubernetes.io/component: cloud-infrastructure-controller
app.kubernetes.io/instance: crossplane
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: crossplane
app.kubernetes.io/part-of: crossplane
app.kubernetes.io/version: 1.9.0
helm.sh/chart: crossplane-1.9.0
release: crossplane
name: crossplane-webhooks
spec:
ports:
- port: 9443
protocol: TCP
targetPort: 9443
selector:
app: crossplane
release: crossplane
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,18 @@ spec:
fieldPath: metadata.namespace
- name: LEADER_ELECTION
value: 'true'
- name: WEBHOOK_TLS_SECRET_NAME
value: webhook-tls-secret
- name: WEBHOOK_TLS_CERT_DIR
value: /webhook/tls
image: docker.io/crossplane/crossplane:v1.9.0
imagePullPolicy: IfNotPresent
name: crossplane
ports:
- containerPort: 8080
name: metrics
- containerPort: 9443
name: webhooks
resources:
limits:
cpu: 1000m
Expand All @@ -69,6 +75,8 @@ spec:
volumeMounts:
- mountPath: /cache
name: package-cache
- mountPath: /webhook/tls
name: webhook-tls-secret
initContainers:
- args:
- core
Expand All @@ -78,6 +86,16 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: WEBHOOK_TLS_SECRET_NAME
value: webhook-tls-secret
- name: WEBHOOK_SERVICE_NAME
value: crossplane-webhooks
- name: WEBHOOK_SERVICE_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: WEBHOOK_SERVICE_PORT
value: '9443'
image: docker.io/crossplane/crossplane:v1.9.0
imagePullPolicy: IfNotPresent
name: crossplane-init
Expand All @@ -100,3 +118,6 @@ spec:
medium: null
sizeLimit: 5Mi
name: package-cache
- name: webhook-tls-secret
secret:
secretName: webhook-tls-secret
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: v1
kind: Secret
metadata:
name: webhook-tls-secret
type: Opaque
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: v1
kind: Service
metadata:
labels:
app: crossplane
app.kubernetes.io/component: cloud-infrastructure-controller
app.kubernetes.io/instance: crossplane
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: crossplane
app.kubernetes.io/part-of: crossplane
app.kubernetes.io/version: 1.9.0
helm.sh/chart: crossplane-1.9.0
release: crossplane
name: crossplane-webhooks
spec:
ports:
- port: 9443
protocol: TCP
targetPort: 9443
selector:
app: crossplane
release: crossplane

0 comments on commit 18eec8b

Please sign in to comment.