Skip to content

Commit

Permalink
pkg/asset/manifests/operators: Drop worker-ignition dependency
Browse files Browse the repository at this point in the history
We'd added this in 4d636d3 (asset/manifests: bootstrap manifest
generation, 2018-08-31, openshift#286) to support the machine-API operator
which had been generating worker machine-sets.  But since e2dc955
(pkg/asset: add ClusterK8sIO, machines.Worker assets, 2018-10-15, openshift#468),
we've been creating those machine-sets ourselves.  And the machine-API
operator dropped their consuming code in
openshift/machine-api-operator@c59151f6 (delete machine/cluster object
loops, 2018-10-22, openshift/machine-api-operator#286).

Dropping this dependency fixes bootstrap Ignition config edits during
a multi-step deploy.  For example, with:

  $ openshift-install --dir=wking create ignition-configs
  $ tree wking
  wking
  ├── bootstrap.ign
  ├── master-0.ign
  └── worker.ign

before this commit, any edits to bootstrap.ign were clobbered in a
subsequent 'create cluster' call, because:

1. The bootstrap Ignition config depends on the manifests.
2. The manifests depended on the worker Ignition config.
3. The worker Ignition config is on disk, so it gets marked dirty.
  • Loading branch information
wking committed Oct 24, 2018
1 parent 060b1be commit 561a7e2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 25 deletions.
19 changes: 0 additions & 19 deletions pkg/asset/manifests/content/bootkube/ign-config.go

This file was deleted.

6 changes: 0 additions & 6 deletions pkg/asset/manifests/operators.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
"github.com/pkg/errors"

"github.com/openshift/installer/pkg/asset"
"github.com/openshift/installer/pkg/asset/ignition/machine"
"github.com/openshift/installer/pkg/asset/installconfig"
"github.com/openshift/installer/pkg/asset/kubeconfig"
"github.com/openshift/installer/pkg/asset/manifests/content/bootkube"
Expand Down Expand Up @@ -64,7 +63,6 @@ func (m *Manifests) Dependencies() []asset.Asset {
&tls.KubeletCertKey{},
&tls.ServiceAccountKeyPair{},
&kubeconfig.Admin{},
&machine.Worker{},
}
}

Expand Down Expand Up @@ -117,7 +115,6 @@ func (m *Manifests) generateBootKubeManifests(dependencies asset.Parents) []*ass
rootCA := &tls.RootCA{}
serviceAccountKeyPair := &tls.ServiceAccountKeyPair{}
serviceServingCA := &tls.ServiceServingCA{}
workerIgnition := &machine.Worker{}
dependencies.Get(
installConfig,
aggregatorCA,
Expand All @@ -133,7 +130,6 @@ func (m *Manifests) generateBootKubeManifests(dependencies asset.Parents) []*ass
rootCA,
serviceAccountKeyPair,
serviceServingCA,
workerIgnition,
)

etcdEndpointHostnames := make([]string, installConfig.Config.MasterCount())
Expand Down Expand Up @@ -169,15 +165,13 @@ func (m *Manifests) generateBootKubeManifests(dependencies asset.Parents) []*ass
ServiceServingCaCert: base64.StdEncoding.EncodeToString(serviceServingCA.Cert()),
ServiceServingCaKey: base64.StdEncoding.EncodeToString(serviceServingCA.Key()),
TectonicNetworkOperatorImage: "quay.io/coreos/tectonic-network-operator-dev:375423a332f2c12b79438fc6a6da6e448e28ec0f",
WorkerIgnConfig: base64.StdEncoding.EncodeToString(workerIgnition.Files()[0].Data),
CVOClusterID: installConfig.Config.ClusterID,
EtcdEndpointHostnames: etcdEndpointHostnames,
EtcdEndpointDNSSuffix: installConfig.Config.BaseDomain,
}

assetData := map[string][]byte{
"cluster-apiserver-certs.yaml": applyTemplateData(bootkube.ClusterApiserverCerts, templateData),
"ign-config.yaml": applyTemplateData(bootkube.IgnConfig, templateData),
"kube-apiserver-secret.yaml": applyTemplateData(bootkube.KubeApiserverSecret, templateData),
"kube-cloud-config.yaml": applyTemplateData(bootkube.KubeCloudConfig, templateData),
"kube-controller-manager-secret.yaml": applyTemplateData(bootkube.KubeControllerManagerSecret, templateData),
Expand Down

0 comments on commit 561a7e2

Please sign in to comment.