Skip to content

Commit

Permalink
Remove kube-core operator from installer entirely
Browse files Browse the repository at this point in the history
  • Loading branch information
mfojtik committed Oct 8, 2018
1 parent 7c15908 commit 1ad081a
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 230 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 @@ -166,18 +165,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)...,
)
}

func (a *Bootstrap) addBootkubeFiles(dependencies asset.Parents, templateData *bootstrapTemplateData) {
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.

130 changes: 0 additions & 130 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 @@ -43,7 +43,6 @@ func (m *Manifests) Name() string {
func (m *Manifests) Dependencies() []asset.Asset {
return []asset.Asset{
&installconfig.InstallConfig{},
&KubeCoreOperator{},
&networkOperator{},
&kubeAddonOperator{},
&machineAPIOperator{},
Expand All @@ -69,16 +68,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 @@ -58,8 +58,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_role-admin.yaml": []byte(content.RoleAdmin),
"99_role-user.yaml": []byte(content.RoleUser),
"99_tectonic-ingress-00-appversion.yaml": []byte(content.AppVersionTectonicIngress),
Expand Down

0 comments on commit 1ad081a

Please sign in to comment.