From 4a84a4b6b9bbb33e36fbd218694b09fd495d7e0c Mon Sep 17 00:00:00 2001 From: Clayton Coleman Date: Fri, 26 Oct 2018 12:57:44 -0400 Subject: [PATCH] cvo: Rename the API object for CVOConfig to ClusterVersion Update the override object to point to the new name for CVOConfig, `config.openshift.io` `ClusterVersion`. --- .../content/bootkube/cvo-overrides.go | 33 +++++++++++++++++++ pkg/asset/manifests/operators.go | 1 + 2 files changed, 34 insertions(+) diff --git a/pkg/asset/manifests/content/bootkube/cvo-overrides.go b/pkg/asset/manifests/content/bootkube/cvo-overrides.go index f2e4a5ca9c2..ec905486359 100644 --- a/pkg/asset/manifests/content/bootkube/cvo-overrides.go +++ b/pkg/asset/manifests/content/bootkube/cvo-overrides.go @@ -9,7 +9,40 @@ var ( // This is a gate to prevent CVO from installing these operators which is conflicting // with already owned resources by tectonic-operators. // This files can be dropped when the overrides list becomes empty. + // IMPORTANT: You must also edit LegacyCVOOverrides CVOOverrides = template.Must(template.New("cvo-override.yaml").Parse(` +apiVersion: config.openshift.io/v1 +kind: ClusterVersion +metadata: + namespace: openshift-cluster-version + name: cluster-version-operator +spec: + upstream: http://localhost:8080/graph + channel: fast + clusterID: {{.CVOClusterID}} + overrides: + - kind: Deployment # this conflicts with kube-core-operator + namespace: openshift-cluster-network-operator + name: cluster-network-operator + unmanaged: true + - kind: ServiceAccount # missing run level 0 on the namespace and has 0000_08 + namespace: openshift-cluster-dns-operator + name: cluster-dns-operator + unmanaged: true + - kind: Deployment # this conflicts with kube-core-operator + namespace: openshift-cluster-dns-operator + name: cluster-dns-operator + unmanaged: true + - kind: APIService # packages.apps.redhat.com fails to start properly + name: v1alpha1.packages.apps.redhat.com + unmanaged: true +`)) + + // LegacyCVOOverrides is the constant to represent contents of legacy-cvo-override.yaml file + // This is a gate to prevent CVO from installing these operators which is conflicting + // with already owned resources by tectonic-operators. + // This files can be dropped when the overrides list becomes empty. + LegacyCVOOverrides = template.Must(template.New("cvo-override.yaml").Parse(` apiVersion: clusterversion.openshift.io/v1 kind: CVOConfig metadata: diff --git a/pkg/asset/manifests/operators.go b/pkg/asset/manifests/operators.go index b6eabac7999..d09ac7ba7ea 100644 --- a/pkg/asset/manifests/operators.go +++ b/pkg/asset/manifests/operators.go @@ -134,6 +134,7 @@ func (m *Manifests) generateBootKubeManifests(dependencies asset.Parents) []*ass "pull.json": applyTemplateData(bootkube.Pull, templateData), "tectonic-network-operator.yaml": applyTemplateData(bootkube.TectonicNetworkOperator, templateData), "cvo-overrides.yaml": applyTemplateData(bootkube.CVOOverrides, templateData), + "legacy-cvo-overrides.yaml": applyTemplateData(bootkube.LegacyCVOOverrides, templateData), "etcd-service-endpoints.yaml": applyTemplateData(bootkube.EtcdServiceEndpointsKubeSystem, templateData), "kube-system-secret-etcd-client.yaml": applyTemplateData(bootkube.KubeSystemSecretEtcdClient, templateData),