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

Switch to use the new SSP operator [release-1.3] #1026

Merged
merged 19 commits into from
Jan 7, 2021
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Temporary workaround in SSP CSV: disable webhook
Signed-off-by: Zvi Cahana <[email protected]>
zcahana committed Jan 4, 2021
commit 7768ed6935b6ee5f0466b3eddea12051e0b3b1ad
Original file line number Diff line number Diff line change
@@ -2081,6 +2081,8 @@ spec:
- name: CPU_PLUGIN_IMAGE
- name: OPERATOR_VERSION
value: v0.1.0-rc.2
- name: ENABLE_WEBHOOKS
value: "false"
image: quay.io/kubevirt/ssp-operator@sha256:1466407727c1c802b2b1191b1f5a22a0a8933a39bdf68556a2f97607f7c523aa
name: manager
ports:
@@ -2566,25 +2568,6 @@ spec:
timeoutSeconds: 30
type: MutatingAdmissionWebhook
webhookPath: /mutate-ns-hco-kubevirt-io
- admissionReviewVersions:
- v1beta1
containerPort: 9443
deploymentName: ssp-operator
failurePolicy: Fail
generateName: vssp.kb.io
rules:
- apiGroups:
- ssp.kubevirt.io
apiVersions:
- v1beta1
operations:
- CREATE
- UPDATE
resources:
- ssps
sideEffects: None
type: ValidatingAdmissionWebhook
webhookPath: /validate-ssp-kubevirt-io-v1beta1-ssp
- admissionReviewVersions:
- v1beta1
containerPort: 8443
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ metadata:
categories: OpenShift Optional
certified: "false"
containerImage: quay.io/kubevirt/hyperconverged-cluster-operator@sha256:e7356254a1251f1fba682be77c9a90b1f840d6a84ff88492fb1e87ae30dda9da
createdAt: "2020-12-24 04:16:53"
createdAt: "2021-01-04 22:22:44"
description: |-
**HyperConverged Cluster Operator** is an Operator pattern for managing multi-operator products.
Specifcally, the HyperConverged Cluster Operator manages the deployment of KubeVirt,
@@ -2081,6 +2081,8 @@ spec:
- name: CPU_PLUGIN_IMAGE
- name: OPERATOR_VERSION
value: v0.1.0-rc.2
- name: ENABLE_WEBHOOKS
value: "false"
image: quay.io/kubevirt/ssp-operator@sha256:1466407727c1c802b2b1191b1f5a22a0a8933a39bdf68556a2f97607f7c523aa
name: manager
ports:
@@ -2566,25 +2568,6 @@ spec:
timeoutSeconds: 30
type: MutatingAdmissionWebhook
webhookPath: /mutate-ns-hco-kubevirt-io
- admissionReviewVersions:
- v1beta1
containerPort: 9443
deploymentName: ssp-operator
failurePolicy: Fail
generateName: vssp.kb.io
rules:
- apiGroups:
- ssp.kubevirt.io
apiVersions:
- v1beta1
operations:
- CREATE
- UPDATE
resources:
- ssps
sideEffects: None
type: ValidatingAdmissionWebhook
webhookPath: /validate-ssp-kubevirt-io-v1beta1-ssp
- admissionReviewVersions:
- v1beta1
containerPort: 8443
2 changes: 2 additions & 0 deletions deploy/operator.yaml
Original file line number Diff line number Diff line change
@@ -332,6 +332,8 @@ spec:
- name: CPU_PLUGIN_IMAGE
- name: OPERATOR_VERSION
value: v0.1.0-rc.2
- name: ENABLE_WEBHOOKS
value: "false"
image: quay.io/kubevirt/ssp-operator@sha256:1466407727c1c802b2b1191b1f5a22a0a8933a39bdf68556a2f97607f7c523aa
name: manager
ports:
12 changes: 12 additions & 0 deletions hack/build-manifests.sh
Original file line number Diff line number Diff line change
@@ -156,6 +156,18 @@ function create_ssp_csv() {
"

gen_csv ${SSP_CSV_GENERATOR} ${operatorName} "${SSP_OPERATOR_IMAGE}" ${dumpCRDsArg} ${operatorArgs}

# Temporarily remove CSV webhook to workaround BZ#1908596:
# 1. Convert CSV to JSON
# 2. Remove SSP webhook definition
# 3. Set ENABLE_WEBHOOKS=false for the SSP container
# 4. Convert CSV back to YAML
sspCsv="${TEMPDIR}/${operatorName}.${CSV_EXT}"
csvJson=$(kubectl patch -f $sspCsv --local --type json --patch '[]' -o json)
csvJson=$(echo "$csvJson" | jq 'del(.spec.webhookdefinitions[] | select(.deploymentName == "ssp-operator"))')
csvJson=$(echo "$csvJson" | jq '(.spec.install.spec.deployments[] | select(.name == "ssp-operator").spec.template.spec.containers[0].env) += [{ "name": "ENABLE_WEBHOOKS", "value": "false" }]')
echo "$csvJson" | kubectl patch -f - --local --type json --patch '[]' -o yaml > $sspCsv

echo "${operatorName}"
}