Skip to content

Commit

Permalink
Merge pull request #2852 from RafalSkolasinski/remove-mutating-webhook
Browse files Browse the repository at this point in the history
remove mutating webhook from Seldon Core Operator
  • Loading branch information
axsaucedo authored Jan 26, 2021
2 parents 4cdc447 + 1e43cc8 commit fbf7a77
Show file tree
Hide file tree
Showing 30 changed files with 1,245 additions and 4,430 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ rules:
- apiGroups:
- admissionregistration.k8s.io
resources:
- mutatingwebhookconfigurations
- validatingwebhookconfigurations
verbs:
- get
Expand Down
168 changes: 0 additions & 168 deletions helm-charts/seldon-core-operator/templates/webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -172,174 +172,6 @@ webhooks:
matchLabels:
seldon.io/controller-id: {{ .Values.controllerId }}
{{- end }}
{{- end }}
rules:
- apiGroups:
- machinelearning.seldon.io
apiVersions:
- v1alpha3
operations:
- CREATE
- UPDATE
resources:
- seldondeployments
sideEffects: None
---

apiVersion: admissionregistration.k8s.io/v1beta1
kind: MutatingWebhookConfiguration
metadata:
annotations:
cert-manager.io/inject-ca-from: '{{ include "seldon.namespace" . }}/seldon-serving-cert'
creationTimestamp: null
labels:
app: seldon
app.kubernetes.io/instance: '{{ .Release.Name }}'
app.kubernetes.io/name: '{{ include "seldon.name" . }}'
app.kubernetes.io/version: '{{ .Chart.Version }}'
name: seldon-mutating-webhook-configuration-{{ include "seldon.namespace" . }}
webhooks:
- clientConfig:
caBundle: '{{ $ca.Cert | b64enc }}'
service:
name: seldon-webhook-service
namespace: '{{ include "seldon.namespace" . }}'
path: /mutate-machinelearning-seldon-io-v1-seldondeployment
failurePolicy: Fail
name: v1.mseldondeployment.kb.io
{{- if semverCompare ">=1.15.0" .Capabilities.KubeVersion.GitVersion }}
{{- if not .Values.singleNamespace }}
namespaceSelector:
matchExpressions:
- key: seldon.io/controller-id
operator: DoesNotExist
{{- if .Values.kubeflow }}
matchLabels:
serving.kubeflow.org/inferenceservice: enabled
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.singleNamespace }}
namespaceSelector:
matchLabels:
seldon.io/controller-id: {{ include "seldon.namespace" . }}
{{- end }}
{{- if not .Values.kubeflow }}
{{- if semverCompare ">=1.15.0" .Capabilities.KubeVersion.GitVersion }}
{{- if not .Values.controllerId }}
objectSelector:
matchExpressions:
- key: seldon.io/controller-id
operator: DoesNotExist
{{- end }}
{{- end }}
{{- if .Values.controllerId }}
objectSelector:
matchLabels:
seldon.io/controller-id: {{ .Values.controllerId }}
{{- end }}
{{- end }}
rules:
- apiGroups:
- machinelearning.seldon.io
apiVersions:
- v1
operations:
- CREATE
- UPDATE
resources:
- seldondeployments
sideEffects: None
- clientConfig:
caBundle: '{{ $ca.Cert | b64enc }}'
service:
name: seldon-webhook-service
namespace: '{{ include "seldon.namespace" . }}'
path: /mutate-machinelearning-seldon-io-v1alpha2-seldondeployment
failurePolicy: Fail
name: v1alpha2.mseldondeployment.kb.io
{{- if semverCompare ">=1.15.0" .Capabilities.KubeVersion.GitVersion }}
{{- if not .Values.singleNamespace }}
namespaceSelector:
matchExpressions:
- key: seldon.io/controller-id
operator: DoesNotExist
{{- if .Values.kubeflow }}
matchLabels:
serving.kubeflow.org/inferenceservice: enabled
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.singleNamespace }}
namespaceSelector:
matchLabels:
seldon.io/controller-id: {{ include "seldon.namespace" . }}
{{- end }}
{{- if not .Values.kubeflow }}
{{- if semverCompare ">=1.15.0" .Capabilities.KubeVersion.GitVersion }}
{{- if not .Values.controllerId }}
objectSelector:
matchExpressions:
- key: seldon.io/controller-id
operator: DoesNotExist
{{- end }}
{{- end }}
{{- if .Values.controllerId }}
objectSelector:
matchLabels:
seldon.io/controller-id: {{ .Values.controllerId }}
{{- end }}
{{- end }}
rules:
- apiGroups:
- machinelearning.seldon.io
apiVersions:
- v1alpha2
operations:
- CREATE
- UPDATE
resources:
- seldondeployments
sideEffects: None
- clientConfig:
caBundle: '{{ $ca.Cert | b64enc }}'
service:
name: seldon-webhook-service
namespace: '{{ include "seldon.namespace" . }}'
path: /mutate-machinelearning-seldon-io-v1alpha3-seldondeployment
failurePolicy: Fail
name: v1alpha3.mseldondeployment.kb.io
{{- if semverCompare ">=1.15.0" .Capabilities.KubeVersion.GitVersion }}
{{- if not .Values.singleNamespace }}
namespaceSelector:
matchExpressions:
- key: seldon.io/controller-id
operator: DoesNotExist
{{- if .Values.kubeflow }}
matchLabels:
serving.kubeflow.org/inferenceservice: enabled
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.singleNamespace }}
namespaceSelector:
matchLabels:
seldon.io/controller-id: {{ include "seldon.namespace" . }}
{{- end }}
{{- if not .Values.kubeflow }}
{{- if semverCompare ">=1.15.0" .Capabilities.KubeVersion.GitVersion }}
{{- if not .Values.controllerId }}
objectSelector:
matchExpressions:
- key: seldon.io/controller-id
operator: DoesNotExist
{{- end }}
{{- end }}
{{- if .Values.controllerId }}
objectSelector:
matchLabels:
seldon.io/controller-id: {{ .Values.controllerId }}
{{- end }}
{{- end }}
rules:
- apiGroups:
Expand Down
3 changes: 1 addition & 2 deletions notebooks/explainer_examples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -621,8 +621,7 @@
" annotations:\n",
" seldon.io/rest-timeout: \"100000\"\n",
" predictors:\n",
" - componentSpecs:\n",
" graph:\n",
" - graph:\n",
" implementation: TENSORFLOW_SERVER\n",
" modelUri: gs://seldon-models/tfserving/cifar10/resnet32\n",
" name: cifar10-classifier\n",
Expand Down
1 change: 0 additions & 1 deletion operator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ COPY licenses/license.txt licenses/license.txt
COPY --from=builder /workspace/hashicorp-golang-lru.tar.gz licenses/mpl_source/hashicorp-golang-lru.tar.gz
COPY --from=builder /workspace/armon-consul-api.tar.gz licenses/mpl_source/armon-consul-api.tar.gz
COPY --from=builder /workspace/hasicorp-hcl.tar.gz licenses/mpl_source/hasicorp-hcl.tar.gz
COPY generated/admissionregistration.k8s.io_v1beta1_mutatingwebhookconfiguration_seldon-mutating-webhook-configuration.yaml /tmp/operator-resources/mutate.yaml
COPY generated/admissionregistration.k8s.io_v1beta1_validatingwebhookconfiguration_seldon-validating-webhook-configuration.yaml /tmp/operator-resources/validate.yaml
COPY generated/~g_v1_service_seldon-webhook-service.yaml /tmp/operator-resources/service.yaml
COPY generated/~g_v1_configmap_seldon-config.yaml /tmp/operator-resources/configmap.yaml
Expand Down
3 changes: 1 addition & 2 deletions operator/Dockerfile.redhat
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,10 @@ LABEL name="Seldon Operator" \

WORKDIR /
COPY --from=builder /workspace/manager .
COPY licenses/license.txt licenses/license.txt
COPY licenses/license.txt licenses/license.txt
COPY --from=builder /workspace/hashicorp-golang-lru.tar.gz licenses/mpl_source/hashicorp-golang-lru.tar.gz
COPY --from=builder /workspace/armon-consul-api.tar.gz licenses/mpl_source/armon-consul-api.tar.gz
COPY --from=builder /workspace/hasicorp-hcl.tar.gz licenses/mpl_source/hasicorp-hcl.tar.gz
COPY generated/admissionregistration.k8s.io_v1beta1_mutatingwebhookconfiguration_seldon-mutating-webhook-configuration.yaml /tmp/operator-resources/mutate.yaml
COPY generated/admissionregistration.k8s.io_v1beta1_validatingwebhookconfiguration_seldon-validating-webhook-configuration.yaml /tmp/operator-resources/validate.yaml
COPY generated/~g_v1_service_seldon-webhook-service.yaml /tmp/operator-resources/service.yaml
COPY generated/~g_v1_configmap_seldon-config.yaml /tmp/operator-resources/configmap.yaml
Expand Down
Loading

0 comments on commit fbf7a77

Please sign in to comment.