Skip to content

Commit d67cbc3

Browse files
committed
chore: update manifests
Signed-off-by: Gaurav Gahlot <gaurav.gahlot@ionos.com>
1 parent 5815a60 commit d67cbc3

11 files changed

Lines changed: 15939 additions & 45 deletions
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
apiVersion: cert-manager.io/v1
2+
kind: Issuer
3+
metadata:
4+
name: selfsigned-issuer
5+
namespace: system
6+
spec:
7+
selfSigned: {}
8+
9+
---
10+
11+
apiVersion: cert-manager.io/v1
12+
kind: Certificate
13+
metadata:
14+
name: serving-cert
15+
namespace: system
16+
spec:
17+
dnsNames:
18+
- capi-kamaji-webhook-service.kamaji-system.svc
19+
- capi-kamaji-webhook-service.kamaji-system.svc.cluster.local
20+
issuerRef:
21+
kind: Issuer
22+
name: selfsigned-issuer
23+
secretName: webhook-server-cert
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
resources:
2+
- certificate.yaml
3+
4+
configurations:
5+
- kustomizeconfig.yaml
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
nameReference:
2+
- kind: Issuer
3+
group: cert-manager.io
4+
fieldSpecs:
5+
- kind: Certificate
6+
group: cert-manager.io
7+
path: spec/issuerRef/name

config/crd/bases/controlplane.cluster.x-k8s.io_kamajicontrolplanes.yaml

Lines changed: 7926 additions & 0 deletions
Large diffs are not rendered by default.

config/crd/bases/controlplane.cluster.x-k8s.io_kamajicontrolplanetemplates.yaml

Lines changed: 7900 additions & 0 deletions
Large diffs are not rendered by default.

config/crd/kustomization.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ resources:
99
patchesStrategicMerge:
1010
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix.
1111
# patches here are for enabling the conversion webhook for each CRD
12-
#- patches/webhook_in_kamajicontrolplanes.yaml
13-
#- patches/webhook_in_kamajicontrolplanetemplates.yaml
12+
- patches/webhook_in_kamajicontrolplanes.yaml
13+
- patches/webhook_in_kamajicontrolplanetemplates.yaml
1414
#+kubebuilder:scaffold:crdkustomizewebhookpatch
1515

1616
# [CERTMANAGER] To enable cert-manager, uncomment all the sections with [CERTMANAGER] prefix.
1717
# patches here are for enabling the CA injection for each CRD
18-
#- patches/cainjection_in_kamajicontrolplanes.yaml
19-
#- patches/cainjection_in_kamajicontrolplanetemplates.yaml
18+
- patches/cainjection_in_kamajicontrolplanes.yaml
19+
- patches/cainjection_in_kamajicontrolplanetemplates.yaml
2020
#+kubebuilder:scaffold:crdkustomizecainjectionpatch
2121

2222
# the following config is for teaching kustomize how to do kustomization for CRDs.

config/default/kustomization.yaml

Lines changed: 24 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -17,49 +17,32 @@ bases:
1717
- ../crd
1818
- ../rbac
1919
- ../manager
20-
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in
21-
# crd/kustomization.yaml
22-
#- ../webhook
23-
# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER'. 'WEBHOOK' components are required.
24-
#- ../certmanager
20+
# [WEBHOOK]
21+
- ../webhook
22+
# [CERTMANAGER]
23+
- ../certmanager
2524
# [PROMETHEUS] To enable prometheus monitor, uncomment all sections with 'PROMETHEUS'.
2625
#- ../prometheus
2726

28-
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in
29-
# crd/kustomization.yaml
30-
#- manager_webhook_patch.yaml
27+
patchesStrategicMerge:
28+
# [WEBHOOK]
29+
- manager_webhook_patch.yaml
30+
# [CERTMANAGER]
31+
- webhookcainjection_patch.yaml
3132

32-
# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER'.
33-
# Uncomment 'CERTMANAGER' sections in crd/kustomization.yaml to enable the CA injection in the admission webhooks.
34-
# 'CERTMANAGER' needs to be enabled to use ca injection
35-
#- webhookcainjection_patch.yaml
36-
37-
# the following config is for teaching kustomize how to do var substitution
3833
vars:
39-
# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER' prefix.
40-
#- name: CERTIFICATE_NAMESPACE # namespace of the certificate CR
41-
# objref:
42-
# kind: Certificate
43-
# group: cert-manager.io
44-
# version: v1
45-
# name: serving-cert # this name should match the one in certificate.yaml
46-
# fieldref:
47-
# fieldpath: metadata.namespace
48-
#- name: CERTIFICATE_NAME
49-
# objref:
50-
# kind: Certificate
51-
# group: cert-manager.io
52-
# version: v1
53-
# name: serving-cert # this name should match the one in certificate.yaml
54-
#- name: SERVICE_NAMESPACE # namespace of the service
55-
# objref:
56-
# kind: Service
57-
# version: v1
58-
# name: webhook-service
59-
# fieldref:
60-
# fieldpath: metadata.namespace
61-
#- name: SERVICE_NAME
62-
# objref:
63-
# kind: Service
64-
# version: v1
65-
# name: webhook-service
34+
# [CERTMANAGER] Used for CA injection annotation substitution.
35+
- name: CERTIFICATE_NAMESPACE
36+
objref:
37+
kind: Certificate
38+
group: cert-manager.io
39+
version: v1
40+
name: serving-cert
41+
fieldref:
42+
fieldpath: metadata.namespace
43+
- name: CERTIFICATE_NAME
44+
objref:
45+
kind: Certificate
46+
group: cert-manager.io
47+
version: v1
48+
name: serving-cert
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: controller-manager
5+
namespace: system
6+
spec:
7+
template:
8+
spec:
9+
containers:
10+
- name: controller
11+
ports:
12+
- containerPort: 9443
13+
name: webhook-server
14+
protocol: TCP
15+
volumeMounts:
16+
- mountPath: /tmp/k8s-webhook-server/serving-certs
17+
name: cert
18+
readOnly: true
19+
volumes:
20+
- name: cert
21+
secret:
22+
defaultMode: 420
23+
secretName: webhook-server-cert
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
apiVersion: apiextensions.k8s.io/v1
2+
kind: CustomResourceDefinition
3+
metadata:
4+
annotations:
5+
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
6+
name: kamajicontrolplanes.controlplane.cluster.x-k8s.io
7+
8+
---
9+
apiVersion: apiextensions.k8s.io/v1
10+
kind: CustomResourceDefinition
11+
metadata:
12+
annotations:
13+
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
14+
name: kamajicontrolplanetemplates.controlplane.cluster.x-k8s.io

config/webhook/kustomization.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
resources:
2+
- service.yaml

0 commit comments

Comments
 (0)