Add support for cert-manager
[nonrtric.git] / service-exposure / MutatingWebhookConfiguration.yaml
index 1a3dd20..bb5cd6a 100644 (file)
@@ -1,6 +1,6 @@
 #
 # ============LICENSE_START=======================================================
-#  Copyright (C) 2022 Nordix Foundation.
+#  Copyright (C) 2022-2023 Nordix Foundation.
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -22,6 +22,8 @@ kind: MutatingWebhookConfiguration
 metadata:
   name: jwt-proxy-webhook
   namespace: default
+  annotations:
+    cert-manager.io/inject-ca-from: default/webhook-server-cert
 webhooks:
   - name: rapps-webhook.default.svc.cluster.local
     admissionReviewVersions:
@@ -33,10 +35,9 @@ webhooks:
         app.kubernetes.io/name: rapp-helloworld-invoker1
     clientConfig:
       service:
-        name: jwt-proxy-admission-controller
+        name: jwt-proxy-admission-controller 
         namespace: default
         path: "/inject-sidecar"
-      caBundle: "${CA_PEM_B64}" 
     rules:
       - operations: [ "CREATE" ]
         apiGroups: [""]