Skip to content

Commit

Permalink
Rename admission webhooks to avoid name collision (#725)
Browse files Browse the repository at this point in the history
fixes #723
  • Loading branch information
Dipta Das authored and tamalsaha committed Apr 4, 2019
1 parent b1f960c commit 3af1ee2
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 17 deletions.
31 changes: 26 additions & 5 deletions chart/stash/templates/mutating-webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ webhooks:
service:
namespace: default
name: kubernetes
path: /apis/admission.stash.appscode.com/v1alpha1/deployments
path: /apis/admission.stash.appscode.com/v1alpha1/deploymentmutators
caBundle: {{ b64enc .Values.apiserver.ca }}
rules:
- operations:
Expand All @@ -39,7 +39,7 @@ webhooks:
service:
namespace: default
name: kubernetes
path: /apis/admission.stash.appscode.com/v1alpha1/daemonsets
path: /apis/admission.stash.appscode.com/v1alpha1/daemonsetmutators
caBundle: {{ b64enc .Values.apiserver.ca }}
rules:
- operations:
Expand All @@ -61,7 +61,7 @@ webhooks:
service:
namespace: default
name: kubernetes
path: /apis/admission.stash.appscode.com/v1alpha1/statefulsets
path: /apis/admission.stash.appscode.com/v1alpha1/statefulsetmutators
caBundle: {{ b64enc .Values.apiserver.ca }}
rules:
- operations:
Expand All @@ -81,7 +81,7 @@ webhooks:
service:
namespace: default
name: kubernetes
path: /apis/admission.stash.appscode.com/v1alpha1/replicationcontrollers
path: /apis/admission.stash.appscode.com/v1alpha1/replicationcontrollermutators
caBundle: {{ b64enc .Values.apiserver.ca }}
rules:
- operations:
Expand All @@ -102,7 +102,7 @@ webhooks:
service:
namespace: default
name: kubernetes
path: /apis/admission.stash.appscode.com/v1alpha1/replicasets
path: /apis/admission.stash.appscode.com/v1alpha1/replicasetmutators
caBundle: {{ b64enc .Values.apiserver.ca }}
rules:
- operations:
Expand Down Expand Up @@ -140,4 +140,25 @@ webhooks:
{{- if and (ge $major 1) (ge $minor 12) }}
sideEffects: None
{{- end }}
- name: deploymentconfig.admission.stash.appscode.com
clientConfig:
service:
namespace: default
name: kubernetes
path: /apis/admission.stash.appscode.com/v1alpha1/deploymentconfigmutators
caBundle: {{ b64enc .Values.apiserver.ca }}
rules:
- operations:
- CREATE
- UPDATE
apiGroups:
- apps.openshift.io
apiVersions:
- "*"
resources:
- deploymentconfigs
failurePolicy: Ignore
{{- if and (ge $major 1) (ge $minor 12) }}
sideEffects: None
{{- end }}
{{ end }}
6 changes: 3 additions & 3 deletions chart/stash/templates/validating-webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ webhooks:
service:
namespace: default
name: kubernetes
path: /apis/admission.stash.appscode.com/v1alpha1/restics
path: /apis/admission.stash.appscode.com/v1alpha1/resticvalidators
caBundle: {{ b64enc .Values.apiserver.ca }}
rules:
- operations:
Expand All @@ -38,7 +38,7 @@ webhooks:
service:
namespace: default
name: kubernetes
path: /apis/admission.stash.appscode.com/v1alpha1/recoveries
path: /apis/admission.stash.appscode.com/v1alpha1/recoveryvalidators
caBundle: {{ b64enc .Values.apiserver.ca }}
rules:
- operations:
Expand All @@ -59,7 +59,7 @@ webhooks:
service:
namespace: default
name: kubernetes
path: /apis/admission.stash.appscode.com/v1alpha1/repositories
path: /apis/admission.stash.appscode.com/v1alpha1/repositoryvalidators
caBundle: {{ b64enc .Values.apiserver.ca }}
rules:
- operations:
Expand Down
12 changes: 6 additions & 6 deletions hack/deploy/mutating-webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ webhooks:
service:
namespace: default
name: kubernetes
path: /apis/admission.stash.appscode.com/v1alpha1/deployments
path: /apis/admission.stash.appscode.com/v1alpha1/deploymentmutators
caBundle: ${KUBE_CA}
rules:
- operations:
Expand All @@ -30,7 +30,7 @@ webhooks:
service:
namespace: default
name: kubernetes
path: /apis/admission.stash.appscode.com/v1alpha1/daemonsets
path: /apis/admission.stash.appscode.com/v1alpha1/daemonsetmutators
caBundle: ${KUBE_CA}
rules:
- operations:
Expand All @@ -50,7 +50,7 @@ webhooks:
service:
namespace: default
name: kubernetes
path: /apis/admission.stash.appscode.com/v1alpha1/statefulsets
path: /apis/admission.stash.appscode.com/v1alpha1/statefulsetmutators
caBundle: ${KUBE_CA}
rules:
- operations:
Expand All @@ -68,7 +68,7 @@ webhooks:
service:
namespace: default
name: kubernetes
path: /apis/admission.stash.appscode.com/v1alpha1/replicationcontrollers
path: /apis/admission.stash.appscode.com/v1alpha1/replicationcontrollermutators
caBundle: ${KUBE_CA}
rules:
- operations:
Expand All @@ -87,7 +87,7 @@ webhooks:
service:
namespace: default
name: kubernetes
path: /apis/admission.stash.appscode.com/v1alpha1/replicasets
path: /apis/admission.stash.appscode.com/v1alpha1/replicasetmutators
caBundle: ${KUBE_CA}
rules:
- operations:
Expand All @@ -107,7 +107,7 @@ webhooks:
service:
namespace: default
name: kubernetes
path: /apis/admission.stash.appscode.com/v1alpha1/deploymentconfigs
path: /apis/admission.stash.appscode.com/v1alpha1/deploymentconfigmutators
caBundle: ${KUBE_CA}
rules:
- operations:
Expand Down
6 changes: 3 additions & 3 deletions hack/deploy/validating-webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ webhooks:
service:
namespace: default
name: kubernetes
path: /apis/admission.stash.appscode.com/v1alpha1/restics
path: /apis/admission.stash.appscode.com/v1alpha1/resticvalidators
caBundle: ${KUBE_CA}
rules:
- operations:
Expand All @@ -29,7 +29,7 @@ webhooks:
service:
namespace: default
name: kubernetes
path: /apis/admission.stash.appscode.com/v1alpha1/recoveries
path: /apis/admission.stash.appscode.com/v1alpha1/recoveryvalidators
caBundle: ${KUBE_CA}
rules:
- operations:
Expand All @@ -48,7 +48,7 @@ webhooks:
service:
namespace: default
name: kubernetes
path: /apis/admission.stash.appscode.com/v1alpha1/repositories
path: /apis/admission.stash.appscode.com/v1alpha1/repositoryvalidators
caBundle: ${KUBE_CA}
rules:
- operations:
Expand Down

0 comments on commit 3af1ee2

Please sign in to comment.