diff --git a/cmd/openshift-install/graph.go b/cmd/openshift-install/graph.go index 56e272eb429..c2547fef655 100644 --- a/cmd/openshift-install/graph.go +++ b/cmd/openshift-install/graph.go @@ -41,7 +41,7 @@ func runGraphCmd(cmd *cobra.Command, args []string) error { string(gographviz.Style): "filled", } for _, t := range targets { - name := fmt.Sprintf(`"Target %s"`, t.name) + name := fmt.Sprintf("%q", fmt.Sprintf("Target %s", t.name)) g.AddNode("G", name, tNodeAttr) for _, dep := range t.assets { addEdge(g, name, dep) @@ -65,8 +65,7 @@ func runGraphCmd(cmd *cobra.Command, args []string) error { } func addEdge(g *gographviz.Graph, parent string, asset asset.Asset) { - elem := reflect.TypeOf(asset).Elem() - name := fmt.Sprintf(`"%s"`, elem.Name()) + name := fmt.Sprintf("%q", reflect.TypeOf(asset).Elem()) if !g.IsNode(name) { logrus.Debugf("adding node %s", name) diff --git a/docs/design/resource_dep.svg b/docs/design/resource_dep.svg index 4543fd3d61d..329ede19184 100644 --- a/docs/design/resource_dep.svg +++ b/docs/design/resource_dep.svg @@ -1,913 +1,1099 @@ - - + G - - -InstallConfig - -InstallConfig + + + +installconfig.InstallConfig + +installconfig.InstallConfig -Target Install Config - -Target Install Config - - -InstallConfig->Target Install Config - - - - -Manifests - -Manifests - - -InstallConfig->Manifests - - - - -Networking - -Networking - - -InstallConfig->Networking - - - - -IngressCertKey - -IngressCertKey - - -InstallConfig->IngressCertKey - - - - -MCSCertKey - -MCSCertKey - - -InstallConfig->MCSCertKey - - - - -Tectonic - -Tectonic - - -InstallConfig->Tectonic - - - - -ClusterK8sIO - -ClusterK8sIO - - -InstallConfig->ClusterK8sIO - - - - -Worker - -Worker - - -InstallConfig->Worker - - - - -Master - -Master - - -InstallConfig->Master - - - - -Bootstrap - -Bootstrap - - -InstallConfig->Bootstrap - - - - -APIServerCertKey - -APIServerCertKey - - -InstallConfig->APIServerCertKey - - - - -Admin - -Admin - - -InstallConfig->Admin - - - - -Kubelet - -Kubelet - - -InstallConfig->Kubelet - - - - -TerraformVariables - -TerraformVariables - - -InstallConfig->TerraformVariables - - - - -Cluster - -Cluster - - -InstallConfig->Cluster - - - - -clusterID - -clusterID - - -clusterID->InstallConfig - - - - -emailAddress - -emailAddress - - -emailAddress->InstallConfig - - - - -password - -password - - -password->InstallConfig - - - - -sshPublicKey - -sshPublicKey - - -sshPublicKey->InstallConfig - - - - -baseDomain - -baseDomain - - -baseDomain->InstallConfig - - - - -clusterName - -clusterName - - -clusterName->InstallConfig - - - - -pullSecret - -pullSecret - - -pullSecret->InstallConfig - - - - -platform - -platform - - -platform->InstallConfig - - - - -Templates - -Templates + +Target Install Config + +Target Install Config + + + +installconfig.InstallConfig->Target Install Config + + + + + +manifests.Manifests + +manifests.Manifests + + + +installconfig.InstallConfig->manifests.Manifests + + + + + +manifests.Networking + +manifests.Networking + + + +installconfig.InstallConfig->manifests.Networking + + + + + +tls.IngressCertKey + +tls.IngressCertKey + + + +installconfig.InstallConfig->tls.IngressCertKey + + + + + +tls.MCSCertKey + +tls.MCSCertKey + + + +installconfig.InstallConfig->tls.MCSCertKey + + + + + +manifests.Tectonic + +manifests.Tectonic + + + +installconfig.InstallConfig->manifests.Tectonic + + + + + +manifests.ClusterK8sIO + +manifests.ClusterK8sIO + + + +installconfig.InstallConfig->manifests.ClusterK8sIO + + + + + +machines.Worker + +machines.Worker + + + +installconfig.InstallConfig->machines.Worker + + + + + +machine.Worker + +machine.Worker + + + +installconfig.InstallConfig->machine.Worker + + + + + +machines.Master + +machines.Master + + + +installconfig.InstallConfig->machines.Master + + + + + +machine.Master + +machine.Master + + + +installconfig.InstallConfig->machine.Master + + + + + +bootstrap.Bootstrap + +bootstrap.Bootstrap + + + +installconfig.InstallConfig->bootstrap.Bootstrap + + + + + +tls.APIServerCertKey + +tls.APIServerCertKey + + + +installconfig.InstallConfig->tls.APIServerCertKey + + + + + +kubeconfig.Admin + +kubeconfig.Admin + + + +installconfig.InstallConfig->kubeconfig.Admin + + + + + +kubeconfig.Kubelet + +kubeconfig.Kubelet + + + +installconfig.InstallConfig->kubeconfig.Kubelet + + + + + +cluster.TerraformVariables + +cluster.TerraformVariables + + + +installconfig.InstallConfig->cluster.TerraformVariables + + + + + +cluster.Cluster + +cluster.Cluster + + + +installconfig.InstallConfig->cluster.Cluster + + + + + +installconfig.clusterID + +installconfig.clusterID + + + +installconfig.clusterID->installconfig.InstallConfig + + + + + +installconfig.emailAddress + +installconfig.emailAddress + + + +installconfig.emailAddress->installconfig.InstallConfig + + + + + +installconfig.password + +installconfig.password + + + +installconfig.password->installconfig.InstallConfig + + + + + +installconfig.sshPublicKey + +installconfig.sshPublicKey + + + +installconfig.sshPublicKey->installconfig.InstallConfig + + + + + +installconfig.baseDomain + +installconfig.baseDomain + + + +installconfig.baseDomain->installconfig.InstallConfig + + + + + +installconfig.clusterName + +installconfig.clusterName + + + +installconfig.clusterName->installconfig.InstallConfig + + + + + +installconfig.pullSecret + +installconfig.pullSecret + + + +installconfig.pullSecret->installconfig.InstallConfig + + + + + +installconfig.platform + +installconfig.platform + + + +installconfig.platform->installconfig.InstallConfig + + + + + +templates.Templates + +templates.Templates -Target Manifest templates - -Target Manifest templates - - -Templates->Target Manifest templates - - - - -KubeCloudConfig - -KubeCloudConfig - - -KubeCloudConfig->Templates - - - - -KubeCloudConfig->Manifests - - - - -MachineConfigServerTLSSecret - -MachineConfigServerTLSSecret - - -MachineConfigServerTLSSecret->Templates - - - - -MachineConfigServerTLSSecret->Manifests - - - - -OpenshiftServiceCertSignerSecret - -OpenshiftServiceCertSignerSecret - - -OpenshiftServiceCertSignerSecret->Templates - - - - -OpenshiftServiceCertSignerSecret->Manifests - - - - -Pull - -Pull - - -Pull->Templates - - - - -Pull->Manifests - - - - -CVOOverrides - -CVOOverrides - - -CVOOverrides->Templates - - - - -CVOOverrides->Manifests - - - - -LegacyCVOOverrides - -LegacyCVOOverrides - - -LegacyCVOOverrides->Templates - - - - -LegacyCVOOverrides->Manifests - - - - -HostEtcdServiceEndpointsKubeSystem - -HostEtcdServiceEndpointsKubeSystem - - -HostEtcdServiceEndpointsKubeSystem->Templates - - - - -HostEtcdServiceEndpointsKubeSystem->Manifests - - - - -KubeSystemConfigmapEtcdServingCA - -KubeSystemConfigmapEtcdServingCA - - -KubeSystemConfigmapEtcdServingCA->Templates - - - - -KubeSystemConfigmapEtcdServingCA->Manifests - - - - -KubeSystemConfigmapRootCA - -KubeSystemConfigmapRootCA - - -KubeSystemConfigmapRootCA->Templates - - - - -KubeSystemConfigmapRootCA->Manifests - - - - -KubeSystemSecretEtcdClient - -KubeSystemSecretEtcdClient - - -KubeSystemSecretEtcdClient->Templates - - - - -KubeSystemSecretEtcdClient->Manifests - - - - -OpenshiftWebConsoleNamespace - -OpenshiftWebConsoleNamespace - - -OpenshiftWebConsoleNamespace->Templates - - - - -OpenshiftWebConsoleNamespace->Manifests - - - - -OpenshiftMachineConfigOperator - -OpenshiftMachineConfigOperator - - -OpenshiftMachineConfigOperator->Templates - - - - -OpenshiftMachineConfigOperator->Manifests - - - - -OpenshiftClusterAPINamespace - -OpenshiftClusterAPINamespace - - -OpenshiftClusterAPINamespace->Templates - - - - -OpenshiftClusterAPINamespace->Manifests - - - - -OpenshiftServiceCertSignerNamespace - -OpenshiftServiceCertSignerNamespace - - -OpenshiftServiceCertSignerNamespace->Templates - - - - -OpenshiftServiceCertSignerNamespace->Manifests - - - - -EtcdServiceKubeSystem - -EtcdServiceKubeSystem - - -EtcdServiceKubeSystem->Templates - - - - -EtcdServiceKubeSystem->Manifests - - - - -HostEtcdServiceKubeSystem - -HostEtcdServiceKubeSystem - - -HostEtcdServiceKubeSystem->Templates - - - - -HostEtcdServiceKubeSystem->Manifests - - - - -BindingDiscovery - -BindingDiscovery - - -BindingDiscovery->Templates - - - - -BindingDiscovery->Tectonic - - - - -CloudCredsSecret - -CloudCredsSecret - - -CloudCredsSecret->Templates - - - - -CloudCredsSecret->Tectonic - - - - -RoleCloudCredsSecretReader - -RoleCloudCredsSecretReader - - -RoleCloudCredsSecretReader->Templates - - - - -RoleCloudCredsSecretReader->Tectonic - - + +Target Manifest templates + +Target Manifest templates + + + +templates.Templates->Target Manifest templates + + + + + +bootkube.KubeCloudConfig + +bootkube.KubeCloudConfig + + + +bootkube.KubeCloudConfig->templates.Templates + + + + + +bootkube.KubeCloudConfig->manifests.Manifests + + + + + +bootkube.MachineConfigServerTLSSecret + +bootkube.MachineConfigServerTLSSecret + + + +bootkube.MachineConfigServerTLSSecret->templates.Templates + + + + + +bootkube.MachineConfigServerTLSSecret->manifests.Manifests + + + + + +bootkube.OpenshiftServiceCertSignerSecret + +bootkube.OpenshiftServiceCertSignerSecret + + + +bootkube.OpenshiftServiceCertSignerSecret->templates.Templates + + + + + +bootkube.OpenshiftServiceCertSignerSecret->manifests.Manifests + + + + + +bootkube.Pull + +bootkube.Pull + + + +bootkube.Pull->templates.Templates + + + + + +bootkube.Pull->manifests.Manifests + + + + + +bootkube.CVOOverrides + +bootkube.CVOOverrides + + + +bootkube.CVOOverrides->templates.Templates + + + + + +bootkube.CVOOverrides->manifests.Manifests + + + + + +bootkube.HostEtcdServiceEndpointsKubeSystem + +bootkube.HostEtcdServiceEndpointsKubeSystem + + + +bootkube.HostEtcdServiceEndpointsKubeSystem->templates.Templates + + + + + +bootkube.HostEtcdServiceEndpointsKubeSystem->manifests.Manifests + + + + + +bootkube.KubeSystemConfigmapEtcdServingCA + +bootkube.KubeSystemConfigmapEtcdServingCA + + + +bootkube.KubeSystemConfigmapEtcdServingCA->templates.Templates + + + + + +bootkube.KubeSystemConfigmapEtcdServingCA->manifests.Manifests + + + + + +bootkube.KubeSystemConfigmapRootCA + +bootkube.KubeSystemConfigmapRootCA + + + +bootkube.KubeSystemConfigmapRootCA->templates.Templates + + + + + +bootkube.KubeSystemConfigmapRootCA->manifests.Manifests + + + + + +bootkube.KubeSystemSecretEtcdClient + +bootkube.KubeSystemSecretEtcdClient + + + +bootkube.KubeSystemSecretEtcdClient->templates.Templates + + + + + +bootkube.KubeSystemSecretEtcdClient->manifests.Manifests + + + + + +bootkube.OpenshiftWebConsoleNamespace + +bootkube.OpenshiftWebConsoleNamespace + + + +bootkube.OpenshiftWebConsoleNamespace->templates.Templates + + + + + +bootkube.OpenshiftWebConsoleNamespace->manifests.Manifests + + + + + +bootkube.OpenshiftMachineConfigOperator + +bootkube.OpenshiftMachineConfigOperator + + + +bootkube.OpenshiftMachineConfigOperator->templates.Templates + + + + + +bootkube.OpenshiftMachineConfigOperator->manifests.Manifests + + + + + +bootkube.OpenshiftClusterAPINamespace + +bootkube.OpenshiftClusterAPINamespace + + + +bootkube.OpenshiftClusterAPINamespace->templates.Templates + + + + + +bootkube.OpenshiftClusterAPINamespace->manifests.Manifests + + + + + +bootkube.OpenshiftServiceCertSignerNamespace + +bootkube.OpenshiftServiceCertSignerNamespace + + + +bootkube.OpenshiftServiceCertSignerNamespace->templates.Templates + + + + + +bootkube.OpenshiftServiceCertSignerNamespace->manifests.Manifests + + + + + +bootkube.EtcdServiceKubeSystem + +bootkube.EtcdServiceKubeSystem + + + +bootkube.EtcdServiceKubeSystem->templates.Templates + + + + + +bootkube.EtcdServiceKubeSystem->manifests.Manifests + + + + + +bootkube.HostEtcdServiceKubeSystem + +bootkube.HostEtcdServiceKubeSystem + + + +bootkube.HostEtcdServiceKubeSystem->templates.Templates + + + + + +bootkube.HostEtcdServiceKubeSystem->manifests.Manifests + + + + + +tectonic.BindingDiscovery + +tectonic.BindingDiscovery + + + +tectonic.BindingDiscovery->templates.Templates + + + + + +tectonic.BindingDiscovery->manifests.Tectonic + + + + + +tectonic.CloudCredsSecret + +tectonic.CloudCredsSecret + + + +tectonic.CloudCredsSecret->templates.Templates + + + + + +tectonic.CloudCredsSecret->manifests.Tectonic + + + + + +tectonic.RoleCloudCredsSecretReader + +tectonic.RoleCloudCredsSecretReader + + + +tectonic.RoleCloudCredsSecretReader->templates.Templates + + + + + +tectonic.RoleCloudCredsSecretReader->manifests.Tectonic + + -Target Manifests - -Target Manifests - - -Manifests->Target Manifests - - - - -Manifests->Bootstrap - - - - -Networking->Manifests - - - - -Networking->ClusterK8sIO - - - - -RootCA - -RootCA - - -RootCA->Manifests - - - - -EtcdCA - -EtcdCA - - -RootCA->EtcdCA - - - - -KubeCA - -KubeCA - - -RootCA->KubeCA - - - - -ServiceServingCA - -ServiceServingCA - - -RootCA->ServiceServingCA - - - - -RootCA->MCSCertKey - - - - -RootCA->Worker - - - - -RootCA->Master - - - - -RootCA->Bootstrap - - - - -AggregatorCA - -AggregatorCA - - -RootCA->AggregatorCA - - - - -RootCA->Admin - - - - -RootCA->Kubelet - - - - -EtcdCA->Manifests - - - - -EtcdClientCertKey - -EtcdClientCertKey - - -EtcdCA->EtcdClientCertKey - - - - -EtcdCA->Bootstrap - - - - -IngressCertKey->Manifests - - - - -KubeCA->IngressCertKey - - - - -KubeCA->Manifests - - - - -KubeletCertKey - -KubeletCertKey - - -KubeCA->KubeletCertKey - - - - -KubeCA->Bootstrap - - - - -KubeCA->APIServerCertKey - - - - -AdminCertKey - -AdminCertKey - - -KubeCA->AdminCertKey - - - - -ServiceServingCA->Manifests - - - - -ServiceServingCA->Bootstrap - - - - -EtcdClientCertKey->Manifests - - - - -EtcdClientCertKey->Bootstrap - - - - -MCSCertKey->Manifests - - - - -MCSCertKey->Bootstrap - - - - -KubeletCertKey->Manifests - - - - -KubeletCertKey->Bootstrap - - - - -KubeletCertKey->Kubelet - - - - -Tectonic->Target Manifests - - - - -Tectonic->Bootstrap - - - - -ClusterK8sIO->Tectonic - - - - -Worker->Tectonic - - - - -Worker->Worker - - + +Target Manifests + +Target Manifests + + + +manifests.Manifests->Target Manifests + + + + + +manifests.Manifests->bootstrap.Bootstrap + + + + + +manifests.Networking->manifests.Manifests + + + + + +manifests.Networking->manifests.ClusterK8sIO + + + + + +tls.RootCA + +tls.RootCA + + + +tls.RootCA->manifests.Manifests + + + + + +tls.EtcdCA + +tls.EtcdCA + + + +tls.RootCA->tls.EtcdCA + + + + + +tls.KubeCA + +tls.KubeCA + + + +tls.RootCA->tls.KubeCA + + + + + +tls.ServiceServingCA + +tls.ServiceServingCA + + + +tls.RootCA->tls.ServiceServingCA + + + + + +tls.RootCA->tls.MCSCertKey + + + + + +tls.RootCA->machine.Worker + + + + + +tls.RootCA->machine.Master + + + + + +tls.RootCA->bootstrap.Bootstrap + + + + + +tls.AggregatorCA + +tls.AggregatorCA + + + +tls.RootCA->tls.AggregatorCA + + + + + +tls.RootCA->kubeconfig.Admin + + + + + +tls.RootCA->kubeconfig.Kubelet + + + + + +tls.EtcdCA->manifests.Manifests + + + + + +tls.EtcdClientCertKey + +tls.EtcdClientCertKey + + + +tls.EtcdCA->tls.EtcdClientCertKey + + + + + +tls.EtcdCA->bootstrap.Bootstrap + + + + + +tls.IngressCertKey->manifests.Manifests + + + + + +tls.KubeCA->manifests.Manifests + + + + + +tls.KubeCA->tls.IngressCertKey + + + + + +tls.KubeletCertKey + +tls.KubeletCertKey + + + +tls.KubeCA->tls.KubeletCertKey + + + + + +tls.KubeCA->bootstrap.Bootstrap + + + + + +tls.KubeCA->tls.APIServerCertKey + + + + + +tls.AdminCertKey + +tls.AdminCertKey + + + +tls.KubeCA->tls.AdminCertKey + + + + + +tls.ServiceServingCA->manifests.Manifests + + + + + +tls.ServiceServingCA->bootstrap.Bootstrap + + + + + +tls.EtcdClientCertKey->manifests.Manifests + + + + + +tls.EtcdClientCertKey->bootstrap.Bootstrap + + + + + +tls.MCSCertKey->manifests.Manifests + + + + + +tls.MCSCertKey->bootstrap.Bootstrap + + + + + +tls.KubeletCertKey->manifests.Manifests + + + + + +tls.KubeletCertKey->bootstrap.Bootstrap + + + + + +tls.KubeletCertKey->kubeconfig.Kubelet + + + + + +manifests.Tectonic->Target Manifests + + + + + +manifests.Tectonic->bootstrap.Bootstrap + + + + + +manifests.ClusterK8sIO->manifests.Tectonic + + + + + +machines.Worker->manifests.Tectonic + + + + + +machine.Worker->machines.Worker + + -Target Ignition Configs - -Target Ignition Configs - - -Worker->Target Ignition Configs - - - - -Master->Tectonic - - - - -Master->Master - - - - -Master->Target Ignition Configs - - - - -Master->TerraformVariables - - - - -Bootstrap->Target Ignition Configs - - - - -Bootstrap->TerraformVariables - - - - -AggregatorCA->Bootstrap - - - - -APIServerProxyCertKey - -APIServerProxyCertKey - - -AggregatorCA->APIServerProxyCertKey - - - - -APIServerCertKey->Bootstrap - - - - -APIServerProxyCertKey->Bootstrap - - - - -AdminCertKey->Bootstrap - - - - -AdminCertKey->Admin - - - - -ServiceAccountKeyPair - -ServiceAccountKeyPair - - -ServiceAccountKeyPair->Bootstrap - - - - -Admin->Bootstrap - - + +Target Ignition Configs + +Target Ignition Configs + + + +machine.Worker->Target Ignition Configs + + + + + +machines.Master->manifests.Tectonic + + + + + +machine.Master->machines.Master + + + + + +machine.Master->Target Ignition Configs + + + + + +machine.Master->cluster.TerraformVariables + + + + + +bootstrap.Bootstrap->Target Ignition Configs + + + + + +bootstrap.Bootstrap->cluster.TerraformVariables + + + + + +tls.AggregatorCA->bootstrap.Bootstrap + + + + + +tls.APIServerProxyCertKey + +tls.APIServerProxyCertKey + + + +tls.AggregatorCA->tls.APIServerProxyCertKey + + + + + +tls.APIServerCertKey->bootstrap.Bootstrap + + + + + +tls.APIServerProxyCertKey->bootstrap.Bootstrap + + + + + +tls.AdminCertKey->bootstrap.Bootstrap + + + + + +tls.AdminCertKey->kubeconfig.Admin + + + + + +tls.ServiceAccountKeyPair + +tls.ServiceAccountKeyPair + + + +tls.ServiceAccountKeyPair->bootstrap.Bootstrap + + + + + +kubeconfig.Admin->bootstrap.Bootstrap + + -Target Cluster - -Target Cluster - - -Admin->Target Cluster - - - - -Admin->Cluster - - - - -Kubelet->Bootstrap - - - - -TerraformVariables->Target Cluster - - - - -TerraformVariables->Cluster - - - - -Cluster->Target Cluster - - + +Target Cluster + +Target Cluster + + + +kubeconfig.Admin->Target Cluster + + + + + +kubeconfig.Admin->cluster.Cluster + + + + + +kubeconfig.Kubelet->bootstrap.Bootstrap + + + + + +cluster.TerraformVariables->Target Cluster + + + + + +cluster.TerraformVariables->cluster.Cluster + + + + + +cluster.Cluster->Target Cluster + + diff --git a/pkg/asset/manifests/operators.go b/pkg/asset/manifests/operators.go index 03fcdc06d26..dd3033f99c3 100644 --- a/pkg/asset/manifests/operators.go +++ b/pkg/asset/manifests/operators.go @@ -68,7 +68,6 @@ func (m *Manifests) Dependencies() []asset.Asset { &bootkube.OpenshiftServiceCertSignerSecret{}, &bootkube.Pull{}, &bootkube.CVOOverrides{}, - &bootkube.LegacyCVOOverrides{}, &bootkube.HostEtcdServiceEndpointsKubeSystem{}, &bootkube.KubeSystemConfigmapEtcdServingCA{}, &bootkube.KubeSystemConfigmapRootCA{}, @@ -162,7 +161,6 @@ func (m *Manifests) generateBootKubeManifests(dependencies asset.Parents) []*ass openshiftServiceCertSignerSecret := &bootkube.OpenshiftServiceCertSignerSecret{} pull := &bootkube.Pull{} cVOOverrides := &bootkube.CVOOverrides{} - legacyCVOOverrides := &bootkube.LegacyCVOOverrides{} hostEtcdServiceEndpointsKubeSystem := &bootkube.HostEtcdServiceEndpointsKubeSystem{} kubeSystemConfigmapEtcdServingCA := &bootkube.KubeSystemConfigmapEtcdServingCA{} kubeSystemConfigmapRootCA := &bootkube.KubeSystemConfigmapRootCA{} @@ -180,7 +178,6 @@ func (m *Manifests) generateBootKubeManifests(dependencies asset.Parents) []*ass openshiftServiceCertSignerSecret, pull, cVOOverrides, - legacyCVOOverrides, hostEtcdServiceEndpointsKubeSystem, kubeSystemConfigmapEtcdServingCA, kubeSystemConfigmapRootCA, @@ -198,7 +195,6 @@ func (m *Manifests) generateBootKubeManifests(dependencies asset.Parents) []*ass "openshift-service-signer-secret.yaml": applyTemplateData(openshiftServiceCertSignerSecret.Files()[0].Data, templateData), "pull.json": applyTemplateData(pull.Files()[0].Data, templateData), "cvo-overrides.yaml": applyTemplateData(cVOOverrides.Files()[0].Data, templateData), - "legacy-cvo-overrides.yaml": applyTemplateData(legacyCVOOverrides.Files()[0].Data, templateData), "host-etcd-service-endpoints.yaml": applyTemplateData(hostEtcdServiceEndpointsKubeSystem.Files()[0].Data, templateData), "kube-system-configmap-etcd-serving-ca.yaml": applyTemplateData(kubeSystemConfigmapEtcdServingCA.Files()[0].Data, templateData), "kube-system-configmap-root-ca.yaml": applyTemplateData(kubeSystemConfigmapRootCA.Files()[0].Data, templateData), diff --git a/pkg/asset/templates/content/bootkube/legacy-cvo-overrides.go b/pkg/asset/templates/content/bootkube/legacy-cvo-overrides.go deleted file mode 100644 index f5968813fdf..00000000000 --- a/pkg/asset/templates/content/bootkube/legacy-cvo-overrides.go +++ /dev/null @@ -1,68 +0,0 @@ -package bootkube - -import ( - "os" - "path/filepath" - - "github.com/openshift/installer/pkg/asset" - "github.com/openshift/installer/pkg/asset/templates/content" -) - -const ( - legacyCVOOverridesFileName = "legacy-cvo-overrides.yaml.template" -) - -var _ asset.WritableAsset = (*LegacyCVOOverrides)(nil) - -// LegacyCVOOverrides is the constant to represent contents of legacy-cvo-override.yaml.template 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. -type LegacyCVOOverrides struct { - fileName string - FileList []*asset.File -} - -// Dependencies returns all of the dependencies directly needed by the asset -func (t *LegacyCVOOverrides) Dependencies() []asset.Asset { - return []asset.Asset{} -} - -// Name returns the human-friendly name of the asset. -func (t *LegacyCVOOverrides) Name() string { - return "LegacyCVOOverrides" -} - -// Generate generates the actual files by this asset -func (t *LegacyCVOOverrides) Generate(parents asset.Parents) error { - t.fileName = legacyCVOOverridesFileName - data, err := content.GetBootkubeTemplate(t.fileName) - if err != nil { - return err - } - t.FileList = []*asset.File{ - { - Filename: filepath.Join(content.TemplateDir, t.fileName), - Data: []byte(data), - }, - } - return nil -} - -// Files returns the files generated by the asset. -func (t *LegacyCVOOverrides) Files() []*asset.File { - return t.FileList -} - -// Load returns the asset from disk. -func (t *LegacyCVOOverrides) Load(f asset.FileFetcher) (bool, error) { - file, err := f.FetchByName(filepath.Join(content.TemplateDir, legacyCVOOverridesFileName)) - if err != nil { - if os.IsNotExist(err) { - return false, nil - } - return false, err - } - t.FileList = []*asset.File{file} - return true, nil -} diff --git a/pkg/asset/templates/templates.go b/pkg/asset/templates/templates.go index 726ef245614..eb23f3f6df7 100644 --- a/pkg/asset/templates/templates.go +++ b/pkg/asset/templates/templates.go @@ -28,7 +28,6 @@ func (m *Templates) Dependencies() []asset.Asset { &bootkube.OpenshiftServiceCertSignerSecret{}, &bootkube.Pull{}, &bootkube.CVOOverrides{}, - &bootkube.LegacyCVOOverrides{}, &bootkube.HostEtcdServiceEndpointsKubeSystem{}, &bootkube.KubeSystemConfigmapEtcdServingCA{}, &bootkube.KubeSystemConfigmapRootCA{}, @@ -52,7 +51,6 @@ func (m *Templates) Generate(dependencies asset.Parents) error { openshiftServiceCertSignerSecret := &bootkube.OpenshiftServiceCertSignerSecret{} pull := &bootkube.Pull{} cVOOverrides := &bootkube.CVOOverrides{} - legacyCVOOverrides := &bootkube.LegacyCVOOverrides{} hostEtcdServiceEndpointsKubeSystem := &bootkube.HostEtcdServiceEndpointsKubeSystem{} kubeSystemConfigmapEtcdServingCA := &bootkube.KubeSystemConfigmapEtcdServingCA{} kubeSystemConfigmapRootCA := &bootkube.KubeSystemConfigmapRootCA{} @@ -74,7 +72,6 @@ func (m *Templates) Generate(dependencies asset.Parents) error { openshiftServiceCertSignerSecret, pull, cVOOverrides, - legacyCVOOverrides, hostEtcdServiceEndpointsKubeSystem, kubeSystemConfigmapEtcdServingCA, kubeSystemConfigmapRootCA, @@ -95,7 +92,6 @@ func (m *Templates) Generate(dependencies asset.Parents) error { m.FileList = append(m.FileList, openshiftServiceCertSignerSecret.Files()...) m.FileList = append(m.FileList, pull.Files()...) m.FileList = append(m.FileList, cVOOverrides.Files()...) - m.FileList = append(m.FileList, legacyCVOOverrides.Files()...) m.FileList = append(m.FileList, hostEtcdServiceEndpointsKubeSystem.Files()...) m.FileList = append(m.FileList, kubeSystemConfigmapEtcdServingCA.Files()...) m.FileList = append(m.FileList, kubeSystemConfigmapRootCA.Files()...)