Skip to content

Commit

Permalink
admission-webhook: Consolidate manifests
Browse files Browse the repository at this point in the history
Signed-off-by: Yannis Zarkadas <yanniszark@arrikto.com>
  • Loading branch information
yanniszark committed Mar 19, 2021
1 parent 86c1b95 commit bab9d10
Show file tree
Hide file tree
Showing 30 changed files with 58 additions and 384 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,15 @@ resources:
- service.yaml
- crd.yaml
commonLabels:
app: admission-webhook
kustomize.component: admission-webhook
namePrefix: admission-webhook-
app: poddefaults
kustomize.component: poddefaults
app.kubernetes.io/component: poddefaults
app.kubernetes.io/name: poddefaults
images:
- name: gcr.io/kubeflow-images-public/admission-webhook
newName: gcr.io/kubeflow-images-public/admission-webhook
newTag: vmaster-ge5452b6f
namespace: kubeflow
configMapGenerator:
- envs:
- params.env
name: admission-webhook-parameters
generatorOptions:
disableNameSuffixHash: true
vars:
Expand All @@ -31,12 +28,12 @@ vars:
# We need the var names to be relatively unique so that when we
# compose with other applications they won't conflict.
- fieldref:
fieldPath: data.namespace
fieldPath: metadata.namespace
name: podDefaultsNamespace
objref:
apiVersion: v1
kind: ConfigMap
name: admission-webhook-parameters
kind: Service
name: service
- fieldref:
fieldPath: metadata.name
name: podDefaultsServiceName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ webhooks:
- clientConfig:
caBundle: ""
service:
name: $(podDefaultsServiceName)
namespace: $(podDefaultsNamespace)
name: service
path: /apply-poddefault
name: $(podDefaultsDeploymentName).kubeflow.org
namespaceSelector:
Expand Down
19 changes: 19 additions & 0 deletions components/admission-webhook/manifests/base/params.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
varReference:
- path: webhooks/clientConfig/service/namespace
kind: MutatingWebhookConfiguration
- path: webhooks/clientConfig/service/name
kind: MutatingWebhookConfiguration
- path: webhooks/name
kind: MutatingWebhookConfiguration
nameReference:
- kind: Service
version: v1
fieldSpecs:
- kind: MutatingWebhookConfiguration
group: admissionregistration.k8s.io
path: webhooks/clientConfig/service/name
namespace:
- kind: MutatingWebhookConfiguration
group: admissionregistration.k8s.io
path: webhooks/clientConfig/service/namespace
create: true

This file was deleted.

This file was deleted.

131 changes: 0 additions & 131 deletions components/admission-webhook/manifests/bootstrap/base/config-map.yaml

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
apiVersion: cert-manager.io/v1alpha2
kind: Certificate
metadata:
name: admission-webhook-cert
name: cert
spec:
isCA: true
commonName: $(podDefaultsServiceName).$(podDefaultsNamespace).svc
dnsNames:
- $(podDefaultsServiceName).$(podDefaultsNamespace).svc
- $(podDefaultsServiceName).$(podDefaultsNamespace).svc.cluster.local
issuerRef:
kind: ClusterIssuer
name: $(podDefaultsIssuer)
secretName: webhook-certs
kind: Issuer
name: selfsigned-issuer
secretName: webhook-certs

---

apiVersion: cert-manager.io/v1alpha2
kind: Issuer
metadata:
name: selfsigned-issuer
spec:
selfSigned: {}
Loading

0 comments on commit bab9d10

Please sign in to comment.