You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This patch uses the cert-manager operator to automatically generate the
self-signed CA, cert, and key and mount it within the webhook
deployment. It also uses cert-manager to inject the CA cert into the
mutatatingwebhookconfiguration.
Copy file name to clipboardExpand all lines: README.md
+3-47Lines changed: 3 additions & 47 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -142,57 +142,13 @@ In order to modify the deployment follow these steps:
142
142
143
143
1. Modify the GROUPS env variable to contain the list of classes (openshift groups) of which you would like to assign class labels. This file is found here: webhooks/assign-class-label/deployment.yaml
144
144
145
-
2. Generate a new OpenSSL certificate
145
+
2. Change namespace variable in the kubernetes manifests to match namespace you want the webhook to be deployed to.
3. Add the cert and key to the required resources:
158
-
159
-
```
160
-
cat webhook.crt | base64 | tr -d '\n'
161
-
```
162
-
163
-
```
164
-
cat webhook.key | base64 | tr -d '\n'
165
-
```
166
-
167
-
This will encode the certificate and key in base64 format which is required. Copy the output of the webhook.crt to the caBundle in webhooks/assign-class-label/webhook-config.yaml. Then create a secret.yaml that looks like this
168
-
169
-
```
170
-
apiVersion: v1
171
-
kind: Secret
172
-
metadata:
173
-
name: webhook-cert
174
-
type: Opaque
175
-
data:
176
-
webhook.crt:
177
-
webhook.key:
178
-
```
179
-
180
-
Copy and paste the output of the cat command to the respective fields for webhook.crt and webhook.key. Then execute
181
-
182
-
```
183
-
oc apply -f secret.yaml --as system:admin
184
-
```
185
-
186
-
within the same namespace that your webhook will be deployed to.
187
-
188
-
189
-
4. Change namespace variable in the kubernetes manifests to match namespace you want the webhook to be deployed to.
190
-
191
-
5. From webhooks/assign-class-label/ directory run:
147
+
3. From webhooks/assign-class-label/ directory run:
192
148
```
193
149
oc apply -k . --as system:admin
194
150
```
195
151
196
-
***Steps 2, 3, and 4 are only required if you are deploying to a new namespace/environment.***
152
+
***Step 2 is only required if you are deploying to a new namespace/environment.***
197
153
198
154
The python script and docker image used for the webserver should not need changes made to it. But in the case that changes must be made, the Dockerfile and python script can be found at docker/src/python/assign-class-label/.
0 commit comments