Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Update manifests to use 0.4.1 controller gen for webhook creation" #3049

Merged
merged 1 commit into from
Mar 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 15 additions & 18 deletions helm-charts/seldon-core-operator/templates/webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@
{{- $cert := genSignedCert "seldon-webhook-service" nil $altNames 365 $ca -}}
---

{{- if not .Values.certManager.enabled -}}
apiVersion: v1
data:
ca.crt: '{{ $ca.Cert | b64enc }}'
tls.crt: '{{ $cert.Cert | b64enc }}'
tls.key: '{{ $cert.Key | b64enc }}'
kind: Secret
metadata:
name: seldon-webhook-server-cert
namespace: '{{ include "seldon.namespace" . }}'
type: kubernetes.io/tls
{{- end }}
---

apiVersion: admissionregistration.k8s.io/v1beta1
kind: ValidatingWebhookConfiguration
metadata:
Expand All @@ -17,10 +31,7 @@ metadata:
app.kubernetes.io/version: '{{ .Chart.Version }}'
name: seldon-validating-webhook-configuration-{{ include "seldon.namespace" . }}
webhooks:
- admissionReviewVersions:
- v1
- v1beta1
clientConfig:
- clientConfig:
caBundle: '{{ $ca.Cert | b64enc }}'
service:
name: seldon-webhook-service
Expand Down Expand Up @@ -173,19 +184,5 @@ webhooks:
resources:
- seldondeployments
sideEffects: None
---

{{- if not .Values.certManager.enabled -}}
apiVersion: v1
data:
ca.crt: '{{ $ca.Cert | b64enc }}'
tls.crt: '{{ $cert.Cert | b64enc }}'
tls.key: '{{ $cert.Key | b64enc }}'
kind: Secret
metadata:
name: seldon-webhook-server-cert
namespace: '{{ include "seldon.namespace" . }}'
type: kubernetes.io/tls
{{- end }}

{{- end }}
2 changes: 0 additions & 2 deletions operator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,6 @@ deploy-lite: manifests
# Generate manifests e.g. CRD, RBAC etc.
manifests: controller-gen
$(CONTROLLER_GEN) rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases crd:crdVersions=v1beta1
# temporary fix until we update to v1 webhooks by updating code to have webhookVersions=v1
mv config/webhook/manifests.v1beta1.yaml config/webhook/manifests.yaml

# Commented out alternative is looking ahead to issue that on Openshift our v1 CRD is too large
# to be installed. This may also affect operator-sdk community operators.
Expand Down
8 changes: 4 additions & 4 deletions operator/config/webhook/manifests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ metadata:
creationTimestamp: null
name: validating-webhook-configuration
webhooks:
- admissionReviewVersions:
- v1
- v1beta1
clientConfig:
- clientConfig:
caBundle: Cg==
service:
name: webhook-service
namespace: system
Expand All @@ -28,6 +26,7 @@ webhooks:
- seldondeployments
sideEffects: None
- clientConfig:
caBundle: Cg==
service:
name: webhook-service
namespace: system
Expand All @@ -46,6 +45,7 @@ webhooks:
- seldondeployments
sideEffects: None
- clientConfig:
caBundle: Cg==
service:
name: webhook-service
namespace: system
Expand Down