Skip to content

Commit

Permalink
manifests: stop using kube core operator
Browse files Browse the repository at this point in the history
In order to switch to OpenShift operators and bootstrap we
need to remove the kube-core-operator rendering and not
rely on the assets provided by this operator.

The new assets are provided by kube/openshift operator renderers.
  • Loading branch information
mfojtik committed Oct 17, 2018
1 parent 1b78c47 commit c9b0e2f
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 233 deletions.
8 changes: 1 addition & 7 deletions pkg/asset/ignition/bootstrap/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ func (a *Bootstrap) Dependencies() []asset.Asset {
&kubeconfig.Kubelet{},
&manifests.Manifests{},
&manifests.Tectonic{},
&manifests.KubeCoreOperator{},
}
}

Expand Down Expand Up @@ -170,18 +169,13 @@ func (a *Bootstrap) getTemplateData(installConfig *types.InstallConfig) (*bootst

func (a *Bootstrap) addBootstrapFiles(dependencies asset.Parents) {
kubeletKubeconfig := &kubeconfig.Kubelet{}
kubeCoreOperator := &manifests.KubeCoreOperator{}
dependencies.Get(kubeletKubeconfig, kubeCoreOperator)
dependencies.Get(kubeletKubeconfig)

a.Config.Storage.Files = append(
a.Config.Storage.Files,
ignition.FileFromBytes("/etc/kubernetes/kubeconfig", 0600, kubeletKubeconfig.Files()[0].Data),
ignition.FileFromBytes("/var/lib/kubelet/kubeconfig", 0600, kubeletKubeconfig.Files()[0].Data),
)
a.Config.Storage.Files = append(
a.Config.Storage.Files,
ignition.FilesFromAsset(rootDir, 0644, kubeCoreOperator)...,
)
a.Config.Storage.Files = append(
a.Config.Storage.Files,
ignition.FileFromString("/opt/tectonic/report-progress.sh", 0555, content.ReportShFileContents),
Expand Down
21 changes: 0 additions & 21 deletions pkg/asset/manifests/content/tectonic/kube-core-00-appversion.go

This file was deleted.

65 changes: 0 additions & 65 deletions pkg/asset/manifests/content/tectonic/kube-core-00-operator.go

This file was deleted.

133 changes: 0 additions & 133 deletions pkg/asset/manifests/kube-core-operator.go

This file was deleted.

7 changes: 2 additions & 5 deletions pkg/asset/manifests/operators.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ func (m *Manifests) Name() string {
func (m *Manifests) Dependencies() []asset.Asset {
return []asset.Asset{
&installconfig.InstallConfig{},
&KubeCoreOperator{},
&networkOperator{},
&kubeAddonOperator{},
&machineAPIOperator{},
Expand All @@ -70,16 +69,14 @@ func (m *Manifests) Dependencies() []asset.Asset {

// Generate generates the respective operator config.yml files
func (m *Manifests) Generate(dependencies asset.Parents) error {
kco := &KubeCoreOperator{}
no := &networkOperator{}
addon := &kubeAddonOperator{}
mao := &machineAPIOperator{}
installConfig := &installconfig.InstallConfig{}
dependencies.Get(kco, no, addon, mao, installConfig)
dependencies.Get(no, addon, mao, installConfig)

// kco+no+mao go to kube-system config map
// no+mao go to kube-system config map
m.KubeSysConfig = configMap("kube-system", "cluster-config-v1", genericData{
"kco-config": string(kco.Files()[0].Data),
"network-config": string(no.Files()[0].Data),
"install-config": string(installConfig.Files()[0].Data),
"mao-config": string(mao.Files()[0].Data),
Expand Down
2 changes: 0 additions & 2 deletions pkg/asset/manifests/tectonic.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ func (t *Tectonic) Generate(dependencies asset.Parents) error {
"99_binding-discovery.yaml": []byte(content.BindingDiscovery),
"99_kube-addon-00-appversion.yaml": []byte(content.AppVersionKubeAddon),
"99_kube-addon-01-operator.yaml": applyTemplateData(content.KubeAddonOperator, templateData),
"99_kube-core-00-appversion.yaml": []byte(content.AppVersionKubeCore),
"99_kube-core-00-operator.yaml": applyTemplateData(content.KubeCoreOperator, templateData),
"99_openshift-cluster-api_cluster.yaml": clusterk8sio.Raw,
"99_openshift-cluster-api_worker-machineset.yaml": worker.MachineSetRaw,
"99_openshift-cluster-api_worker-user-data-secret.yaml": worker.UserDataSecretRaw,
Expand Down

0 comments on commit c9b0e2f

Please sign in to comment.