-
Notifications
You must be signed in to change notification settings - Fork 3
/
install.yaml
123 lines (123 loc) · 2.55 KB
/
install.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
apiVersion: v1
kind: Secret
metadata:
name: sigrun-tls
type: Opaque
data:
tls.crt: {{whCert}}
tls.key: {{whKey}}
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: sigrun-account
namespace: default
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: sigrun-account
rules:
- apiGroups: [""]
resources: ["configmaps"]
resourceNames: ["sigrun-controller-config"]
verbs: ["get"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: sigrun-account
subjects:
- kind: ServiceAccount
name: sigrun-account
namespace: default
roleRef:
kind: ClusterRole
name: sigrun-account
apiGroup: rbac.authorization.k8s.io
---
apiVersion: v1
kind: Service
metadata:
name: sigrun
namespace: default
labels:
name: sigrun
spec:
ports:
- name: sigrun-webhook
port: 443
targetPort: 8080
- name: sigrun-controller
port: 8000
targetPort: 8000
selector:
name: sigrun
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: sigrun
namespace: default
labels:
name: sigrun
spec:
replicas: 1
selector:
matchLabels:
name: sigrun
template:
metadata:
name: sigrun
labels:
name: sigrun
spec:
serviceAccountName: sigrun-account
containers:
- name: sigrun-controller
image: ghcr.io/shravanshetty1/sigrun-controller:latest
imagePullPolicy: IfNotPresent
volumeMounts:
- name: webhook-certs
mountPath: /etc/certs
readOnly: true
securityContext:
readOnlyRootFilesystem: true
volumes:
- name: webhook-certs
secret:
secretName: sigrun-tls
---
apiVersion: admissionregistration.k8s.io/v1beta1
kind: ValidatingWebhookConfiguration
metadata:
name: sigrun
webhooks:
- name: sigrun.default.svc
clientConfig:
service:
name: sigrun
namespace: default
path: "/validate"
caBundle: "{{caCert}}"
rules:
- operations: ["CREATE","UPDATE"]
apiGroups: [""]
apiVersions: ["v1"]
resources: ["pods"]
- operations: ["CREATE","UPDATE"]
apiGroups: ["apps"]
apiVersions: ["v1"]
resources: ["deployments","daemonsets","replicasets","statefulsets"]
- operations: ["CREATE","UPDATE"]
apiGroups: ["batch"]
apiVersions: ["v1"]
resources: ["cronjobs","jobs"]
---
apiVersion: v1
kind: ConfigMap
metadata:
name: sigrun-controller-config
data:
guid_to_repo_info: ""
image_to_guids: ""