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

test: force RollingUpgrade on all the deployments #1015

Closed
wants to merge 1 commit into from
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -1835,7 +1835,7 @@ spec:
matchLabels:
name: cluster-network-addons-operator
strategy:
type: Recreate
type: RollingUpdate
template:
metadata:
labels:
Expand Down Expand Up @@ -1978,7 +1978,8 @@ spec:
selector:
matchLabels:
name: kubevirt-ssp-operator
strategy: {}
strategy:
type: RollingUpdate
template:
metadata:
labels:
Expand Down Expand Up @@ -2018,7 +2019,8 @@ spec:
matchLabels:
name: cdi-operator
operator.cdi.kubevirt.io: ""
strategy: {}
strategy:
type: RollingUpdate
template:
metadata:
labels:
Expand Down Expand Up @@ -2069,7 +2071,8 @@ spec:
selector:
matchLabels:
name: node-maintenance-operator
strategy: {}
strategy:
type: RollingUpdate
template:
metadata:
labels:
Expand Down Expand Up @@ -2109,7 +2112,8 @@ spec:
matchLabels:
name: hostpath-provisioner-operator
operator.hostpath-provisioner.kubevirt.io: ""
strategy: {}
strategy:
type: RollingUpdate
template:
metadata:
labels:
Expand Down Expand Up @@ -2144,7 +2148,8 @@ spec:
matchLabels:
name: vm-import-operator
operator.v2v.kubevirt.io: ""
strategy: {}
strategy:
type: RollingUpdate
template:
metadata:
labels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
categories: OpenShift Optional
certified: "false"
containerImage: quay.io/kubevirt/hyperconverged-cluster-operator@sha256:0849ed82f0ea486ff5f0dd67ccf67d85e7a41bab263a2916311c530042dd9be6
createdAt: "2020-12-20 10:42:21"
createdAt: "2020-12-21 18:14:00"
description: |-
**HyperConverged Cluster Operator** is an Operator pattern for managing multi-operator products.
Specifcally, the HyperConverged Cluster Operator manages the deployment of KubeVirt,
Expand Down Expand Up @@ -1835,7 +1835,7 @@ spec:
matchLabels:
name: cluster-network-addons-operator
strategy:
type: Recreate
type: RollingUpdate
template:
metadata:
labels:
Expand Down Expand Up @@ -1978,7 +1978,8 @@ spec:
selector:
matchLabels:
name: kubevirt-ssp-operator
strategy: {}
strategy:
type: RollingUpdate
template:
metadata:
labels:
Expand Down Expand Up @@ -2018,7 +2019,8 @@ spec:
matchLabels:
name: cdi-operator
operator.cdi.kubevirt.io: ""
strategy: {}
strategy:
type: RollingUpdate
template:
metadata:
labels:
Expand Down Expand Up @@ -2069,7 +2071,8 @@ spec:
selector:
matchLabels:
name: node-maintenance-operator
strategy: {}
strategy:
type: RollingUpdate
template:
metadata:
labels:
Expand Down Expand Up @@ -2109,7 +2112,8 @@ spec:
matchLabels:
name: hostpath-provisioner-operator
operator.hostpath-provisioner.kubevirt.io: ""
strategy: {}
strategy:
type: RollingUpdate
template:
metadata:
labels:
Expand Down Expand Up @@ -2144,7 +2148,8 @@ spec:
matchLabels:
name: vm-import-operator
operator.v2v.kubevirt.io: ""
strategy: {}
strategy:
type: RollingUpdate
template:
metadata:
labels:
Expand Down
8 changes: 8 additions & 0 deletions tools/csv-merger/csv-merger.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
"flag"
"fmt"
"io/ioutil"
appsv1 "k8s.io/api/apps/v1"
"log"
"os"
"path/filepath"
Expand Down Expand Up @@ -338,6 +339,7 @@ func main() {
// TODO: remove this once fixed on OLM side
for _, deployment := range strategySpec.DeploymentSpecs {
delete(deployment.Spec.Template.Annotations, "description")

}

installStrategyBase.DeploymentSpecs = append(installStrategyBase.DeploymentSpecs, strategySpec.DeploymentSpecs...)
Expand Down Expand Up @@ -421,6 +423,12 @@ func main() {
csvExtended.Spec.InstallStrategy.StrategyName = "deployment"
csvExtended.Spec.InstallStrategy.StrategySpec = *installStrategyBase

// TODO: try forcing RollingUpdate strategy on all the deployment to
// bypass an upgrade bug
for i, _ := range csvExtended.Spec.InstallStrategy.StrategySpec.DeploymentSpecs {
csvExtended.Spec.InstallStrategy.StrategySpec.DeploymentSpecs[i].Spec.Strategy.Type = appsv1.RollingUpdateDeploymentStrategyType
}

if *metadataDescription != "" {
csvExtended.Annotations["description"] = *metadataDescription
}
Expand Down