Skip to content

Commit f2ccca3

Browse files
committed
refactor: rename OCP -> OpenShift
Do not assume OCP, the CVO can also run in OKD
1 parent 80bd498 commit f2ccca3

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

pkg/start/start.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -194,24 +194,24 @@ func (o *Options) Run(ctx context.Context) error {
194194
payloadRoot = payload.RootPath(o.PayloadOverride)
195195
}
196196

197-
cvoOcpVersion := "0.0.1-snapshot"
198-
// Peek at the local release metadata to determine the version of OCP this CVO belongs to. This assumes the CVO is
197+
cvoOpenShiftVersion := "0.0.1-snapshot"
198+
// Peek at the local release metadata to determine the version of OpenShift this CVO belongs to. This assumes the CVO is
199199
// executing in a container from the payload image. Full payload content is only read later once leader lease is
200200
// acquired, and here we should only read as little data as possible to determine the version so we can establish
201201
// enabled feature gate checker for all following code.
202202
//
203-
// We cannot refuse to start CVO if for some reason we cannot determine the OCP version on startup from the local
203+
// We cannot refuse to start CVO if for some reason we cannot determine the OpenShift version on startup from the local
204204
// release metadata. The only consequence is we fail to determine enabled/disabled feature gates and will have to use
205205
// some defaults.
206206
releaseMetadata, err := payloadRoot.LoadReleaseMetadata()
207207
switch {
208208
case err != nil:
209-
klog.Warningf("Failed to read release metadata to determine OCP version for this CVO (will use placeholder version %q): %v", cvoOcpVersion, err)
209+
klog.Warningf("Failed to read release metadata to determine OpenShift version for this CVO (will use placeholder version %q): %v", cvoOpenShiftVersion, err)
210210
case releaseMetadata.Version == "":
211-
klog.Warningf("Version missing from release metadata, cannot determine OCP version for this CVO (will use placeholder version %q)", cvoOcpVersion)
211+
klog.Warningf("Version missing from release metadata, cannot determine OpenShift version for this CVO (will use placeholder version %q)", cvoOpenShiftVersion)
212212
default:
213-
cvoOcpVersion = releaseMetadata.Version
214-
klog.Infof("Determined OCP version for this CVO: %q", cvoOcpVersion)
213+
cvoOpenShiftVersion = releaseMetadata.Version
214+
klog.Infof("Determined OpenShift version for this CVO: %q", cvoOpenShiftVersion)
215215
}
216216

217217
clusterVersionConfigInformerFactory, configInformerFactory := o.prepareConfigInformerFactories(cb)

0 commit comments

Comments
 (0)