Skip to content

Commit ab2b202

Browse files
Merge pull request #10655 from patrickdillon/cvo-version
no-jira: dynamically set CVO upgrade version
2 parents 16a0282 + f2fdb5e commit ab2b202

3 files changed

Lines changed: 8 additions & 1 deletion

File tree

data/data/manifests/bootkube/cvo-overrides.yaml.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ spec:
88
upstream: https://amd64.origin.releases.ci.openshift.org/graph
99
channel: stable-scos-4
1010
{{- else }}
11-
channel: stable-4.22
11+
channel: {{.CVOChannel}}
1212
{{- end }}
1313
clusterID: {{.CVOClusterID}}
1414
{{- if .CVOCapabilities }}

pkg/asset/manifests/operators.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"bytes"
66
"context"
77
"encoding/base64"
8+
"fmt"
89
"path"
910
"path/filepath"
1011
"strings"
@@ -24,6 +25,7 @@ import (
2425
"github.com/openshift/installer/pkg/asset/templates/content/manifests"
2526
"github.com/openshift/installer/pkg/asset/tls"
2627
"github.com/openshift/installer/pkg/types"
28+
"github.com/openshift/installer/pkg/version/versioninfo"
2729
"github.com/openshift/library-go/pkg/crypto"
2830
)
2931

@@ -170,8 +172,12 @@ func (m *Manifests) generateBootKubeManifests(dependencies asset.Parents) []*ass
170172
rootCA,
171173
)
172174

175+
versionInfo := versioninfo.GetInfo()
176+
cvoChannel := fmt.Sprintf("stable-%d.%d", versionInfo.Major, versionInfo.Minor)
177+
173178
templateData := &bootkubeTemplateData{
174179
CVOCapabilities: installConfig.Config.Capabilities,
180+
CVOChannel: cvoChannel,
175181
CVOClusterID: clusterID.UUID,
176182
McsTLSCert: base64.StdEncoding.EncodeToString(mcsCertKey.Cert()),
177183
McsTLSKey: base64.StdEncoding.EncodeToString(mcsCertKey.Key()),

pkg/asset/manifests/template.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ type cloudCredsSecretData struct {
6767

6868
type bootkubeTemplateData struct {
6969
CVOCapabilities *types.Capabilities
70+
CVOChannel string
7071
CVOClusterID string
7172
EtcdCaBundle string
7273
EtcdMetricCaCert string

0 commit comments

Comments
 (0)