Skip to content
This repository was archived by the owner on Apr 17, 2025. It is now read-only.

Commit 1bb67d8

Browse files
committed
Add kustomization for resource list extension
Add kustomization resources for the new Deployment, Service, APIService and cert-manager configuration for the resource list extension.
1 parent 7ebcf7a commit 1bb67d8

File tree

5 files changed

+125
-0
lines changed

5 files changed

+125
-0
lines changed

config/apiextension/apiextension.yaml

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
---
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: ClusterRole
4+
metadata:
5+
name: resourcelist
6+
rules:
7+
- apiGroups:
8+
- "*"
9+
resources:
10+
- "*"
11+
verbs:
12+
- get
13+
- list
14+
- watch
15+
---
16+
apiVersion: rbac.authorization.k8s.io/v1
17+
kind: ClusterRoleBinding
18+
metadata:
19+
name: resourcelist
20+
roleRef:
21+
apiGroup: rbac.authorization.k8s.io
22+
kind: ClusterRole
23+
name: resourcelist
24+
subjects:
25+
- kind: ServiceAccount
26+
name: default
27+
namespace: hnc-system
28+
---
29+
apiVersion: apps/v1
30+
kind: Deployment
31+
metadata:
32+
labels:
33+
app: resourcelist
34+
name: resourcelist
35+
spec:
36+
replicas: 1
37+
selector:
38+
matchLabels:
39+
app: resourcelist
40+
template:
41+
metadata:
42+
labels:
43+
app: resourcelist
44+
spec:
45+
securityContext:
46+
fsGroup: 2000
47+
runAsNonRoot: true
48+
runAsUser: 1000
49+
containers:
50+
- image: controller:latest # this is usually overridden by kustomize
51+
name: resourcelist
52+
command:
53+
- /apiextension
54+
args:
55+
- "--cert=/certs/tls.crt"
56+
- "--key=/certs/tls.key"
57+
imagePullPolicy: IfNotPresent
58+
volumeMounts:
59+
- name: certs
60+
mountPath: /certs
61+
securityContext:
62+
allowPrivilegeEscalation: false
63+
readOnlyRootFilesystem: true
64+
runAsNonRoot: true
65+
seccompProfile:
66+
type: RuntimeDefault
67+
capabilities:
68+
drop: ["ALL"]
69+
ports:
70+
- containerPort: 7443
71+
name: server
72+
protocol: TCP
73+
volumes:
74+
- secret:
75+
defaultMode: 420
76+
secretName: hnc-resourcelist
77+
name: certs
78+
---
79+
apiVersion: v1
80+
kind: Service
81+
metadata:
82+
labels:
83+
app: resourcelist
84+
name: resourcelist
85+
spec:
86+
ports:
87+
- port: 7443
88+
protocol: TCP
89+
targetPort: 7443
90+
selector:
91+
app: resourcelist
92+
---
93+
apiVersion: cert-manager.io/v1
94+
kind: Certificate
95+
metadata:
96+
name: resourcelist
97+
spec:
98+
dnsNames:
99+
- hnc-resourcelist.hnc-system.svc
100+
- hnc-resourcelist.hnc-system.svc.cluster.local
101+
issuerRef:
102+
kind: Issuer
103+
name: selfsigned-issuer
104+
secretName: hnc-resourcelist
105+
---
106+
apiVersion: apiregistration.k8s.io/v1
107+
kind: APIService
108+
metadata:
109+
name: v1alpha2.resources.hnc.x-k8s.io
110+
annotations:
111+
cert-manager.io/inject-ca-from: hnc-system/hnc-resourcelist
112+
spec:
113+
group: resources.hnc.x-k8s.io
114+
version: v1alpha2
115+
groupPriorityMinimum: 10
116+
versionPriority: 10
117+
service:
118+
namespace: hnc-system
119+
name: resourcelist
120+
port: 7443
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
resources:
2+
- apiextension.yaml

config/variants/default-cc/kustomization.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ bases:
1414
- ../../manager
1515
- ../../rbac
1616
- ../../webhook
17+
- ../../apiextension
1718

1819
patches:
1920
- patch: |-

config/variants/default-cm/kustomization.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ bases:
1414
- ../../manager
1515
- ../../rbac
1616
- ../../webhook
17+
- ../../apiextension
1718

1819
patchesStrategicMerge:
1920
- webhookcainjection_patch.yaml

config/variants/hrq/kustomization.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ bases:
1414
- ../../manager
1515
- ../../rbac
1616
- ../../webhook
17+
- ../../apiextension
1718

1819
patchesStrategicMerge:
1920
- webhook_patch.yaml

0 commit comments

Comments
 (0)