Skip to content

Commit

Permalink
Merge pull request #415 from abhinavdahiya/cvo_overrides
Browse files Browse the repository at this point in the history
manifests: add cvo-overrides
  • Loading branch information
openshift-merge-robot committed Oct 4, 2018
2 parents bf36c90 + aa271c0 commit 93e9292
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 0 deletions.
59 changes: 59 additions & 0 deletions pkg/asset/manifests/content/bootkube/cvo-overrides.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
package bootkube

import (
"text/template"
)

var (
// CVOOverrides is the constant to represent contents of 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.
CVOOverrides = template.Must(template.New("cvo-override.yaml").Parse(`
apiVersion: clusterversion.openshift.io/v1
kind: CVOConfig
metadata:
namespace: openshift-cluster-version
name: cluster-version-operator
upstream: http://localhost:8080/graph
channel: fast
clusterID: {{.CVOClusterID}}
overrides:
- kind: Deployment # this conflicts with kube-core-operator
namespace: openshift-core-operators
name: openshift-cluster-kube-apiserver-operator
unmanaged: true
- kind: Deployment # this conflicts with kube-core-operator
namespace: openshift-core-operators
name: openshift-cluster-kube-scheduler-operator
unmanaged: true
- kind: Deployment # this conflicts with kube-core-operator
namespace: openshift-core-operators
name: openshift-cluster-kube-controller-manager-operator
unmanaged: true
- kind: Deployment # this conflicts with kube-core-operator
namespace: openshift-core-operators
name: openshift-cluster-openshift-apiserver-operator
unmanaged: true
- kind: Deployment # this conflicts with kube-core-operator
namespace: openshift-core-operators
name: openshift-cluster-openshift-controller-manager-operator
unmanaged: true
- kind: Deployment # this conflicts with kube-core-operator
namespace: openshift-cluster-network-operator
name: cluster-network-operator
unmanaged: true
- kind: Deployment # this conflicts with tectonic-ingress-controller-operator
namespace: openshift-cluster-ingress-operator
name: cluster-ingress-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
`))
)
2 changes: 2 additions & 0 deletions pkg/asset/manifests/operators.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ func (m *manifests) generateBootKubeManifests(dependencies map[asset.Asset]*asse
ServiceServingCaKey: base64.StdEncoding.EncodeToString(dependencies[m.serviceServingCA].Contents[keyIndex].Data),
TectonicNetworkOperatorImage: "quay.io/coreos/tectonic-network-operator-dev:3b6952f5a1ba89bb32dd0630faddeaf2779c9a85",
WorkerIgnConfig: base64.StdEncoding.EncodeToString(dependencies[m.workerIgnition].Contents[0].Data),
CVOClusterID: ic.ClusterID,
}

assetData := map[string][]byte{
Expand All @@ -168,6 +169,7 @@ func (m *manifests) generateBootKubeManifests(dependencies map[asset.Asset]*asse
"openshift-apiserver-secret.yaml": applyTemplateData(bootkube.OpenshiftApiserverSecret, templateData),
"pull.json": applyTemplateData(bootkube.Pull, templateData),
"tectonic-network-operator.yaml": applyTemplateData(bootkube.TectonicNetworkOperator, templateData),
"cvo-overrides.yaml": applyTemplateData(bootkube.CVOOverrides, templateData),

"01-tectonic-namespace.yaml": []byte(bootkube.TectonicNamespace),
"02-ingress-namespace.yaml": []byte(bootkube.IngressNamespace),
Expand Down
1 change: 1 addition & 0 deletions pkg/asset/manifests/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ type bootkubeTemplateData struct {
ServiceServingCaKey string
TectonicNetworkOperatorImage string
WorkerIgnConfig string
CVOClusterID string
}

type tectonicTemplateData struct {
Expand Down

0 comments on commit 93e9292

Please sign in to comment.