diff --git a/install/0001_00_machine-config-operator_00_service.yaml b/install/0000_80_machine-config-operator_00_service.yaml similarity index 100% rename from install/0001_00_machine-config-operator_00_service.yaml rename to install/0000_80_machine-config-operator_00_service.yaml diff --git a/install/0000_80_machine-config-operator_05_osimageurl.yaml b/install/0000_80_machine-config-operator_05_osimageurl.yaml index 45e282383b..3bc124b6ee 100644 --- a/install/0000_80_machine-config-operator_05_osimageurl.yaml +++ b/install/0000_80_machine-config-operator_05_osimageurl.yaml @@ -4,6 +4,7 @@ metadata: name: machine-config-osimageurl namespace: openshift-machine-config-operator data: + releaseVersion: 0.0.1-snapshot # The OS payload, managed by the daemon + pivot + rpm-ostree # https://github.com/openshift/machine-config-operator/issues/183 osImageURL: "registry.svc.ci.openshift.org/openshift:machine-os-content" diff --git a/pkg/operator/sync.go b/pkg/operator/sync.go index 0b47600ab7..576f01b8a0 100644 --- a/pkg/operator/sync.go +++ b/pkg/operator/sync.go @@ -685,6 +685,11 @@ func (optr *Operator) getOsImageURL(namespace string) (string, error) { if err != nil { return "", err } + releaseVersion := cm.Data["releaseVersion"] + optrVersion, _ := optr.vStore.Get("operator") + if releaseVersion != optrVersion { + return "", fmt.Errorf("refusing to read osImageURL version %q, operator version %q", releaseVersion, optrVersion) + } return cm.Data["osImageURL"], nil }