diff --git a/docs/design/resource_dep.svg b/docs/design/resource_dep.svg index da36499eab1..0eae3e6f3db 100644 --- a/docs/design/resource_dep.svg +++ b/docs/design/resource_dep.svg @@ -4,1893 +4,1946 @@ - - + + G - + cluster_Target - -Target + +Target cluster_bootkube - -bootkube + +bootkube cluster_bootstrap - -bootstrap + +bootstrap cluster_cluster - -cluster + +cluster cluster_installconfig - -installconfig + +installconfig cluster_kubeconfig - -kubeconfig + +kubeconfig cluster_machine - -machine + +machine cluster_machines - -machines + +machines cluster_manifests - -manifests + +manifests cluster_openshift - -openshift + +openshift cluster_password - -password + +password -cluster_rhcos - -rhcos +cluster_releaseimage + +releaseimage +cluster_rhcos + +rhcos + + cluster_tls - -tls + +tls installconfig.InstallConfig - -installconfig.InstallConfig + +installconfig.InstallConfig Target Install Config - -Target Install Config + +Target Install Config installconfig.InstallConfig->Target Install Config - - + + machines.Master - -machines.Master + +machines.Master installconfig.InstallConfig->machines.Master - - + + installconfig.ClusterID - -installconfig.ClusterID + +installconfig.ClusterID installconfig.InstallConfig->installconfig.ClusterID - - + + installconfig.PlatformCredsCheck - -installconfig.PlatformCredsCheck + +installconfig.PlatformCredsCheck installconfig.InstallConfig->installconfig.PlatformCredsCheck - - + + rhcos.Image - -rhcos.Image + +rhcos.Image installconfig.InstallConfig->rhcos.Image - - + + machine.Master - -machine.Master + +machine.Master installconfig.InstallConfig->machine.Master - - + + machines.Worker - -machines.Worker + +machines.Worker installconfig.InstallConfig->machines.Worker - - + + machine.Worker - -machine.Worker + +machine.Worker installconfig.InstallConfig->machine.Worker - - + + manifests.Manifests - -manifests.Manifests + +manifests.Manifests installconfig.InstallConfig->manifests.Manifests - - + + manifests.Ingress - -manifests.Ingress + +manifests.Ingress installconfig.InstallConfig->manifests.Ingress - - + + manifests.DNS - -manifests.DNS + +manifests.DNS installconfig.InstallConfig->manifests.DNS - - + + manifests.Infrastructure - -manifests.Infrastructure + +manifests.Infrastructure installconfig.InstallConfig->manifests.Infrastructure - - + + manifests.CloudProviderConfig - -manifests.CloudProviderConfig + +manifests.CloudProviderConfig installconfig.InstallConfig->manifests.CloudProviderConfig - - + + manifests.Networking - -manifests.Networking + +manifests.Networking installconfig.InstallConfig->manifests.Networking - - + + manifests.Proxy - -manifests.Proxy + +manifests.Proxy installconfig.InstallConfig->manifests.Proxy - - + + + + + +manifests.ImageContentSourcePolicy + +manifests.ImageContentSourcePolicy + + + +installconfig.InstallConfig->manifests.ImageContentSourcePolicy + + - + tls.MCSCertKey - -tls.MCSCertKey + +tls.MCSCertKey - + installconfig.InstallConfig->tls.MCSCertKey - - + + - + manifests.Openshift - -manifests.Openshift + +manifests.Openshift - + installconfig.InstallConfig->manifests.Openshift - - + + - + kubeconfig.AdminClient - -kubeconfig.AdminClient + +kubeconfig.AdminClient - + installconfig.InstallConfig->kubeconfig.AdminClient - - + + - + bootstrap.Bootstrap - -bootstrap.Bootstrap + +bootstrap.Bootstrap - + installconfig.InstallConfig->bootstrap.Bootstrap - - + + - + kubeconfig.Kubelet - -kubeconfig.Kubelet + +kubeconfig.Kubelet - + installconfig.InstallConfig->kubeconfig.Kubelet - - + + - + tls.KubeAPIServerExternalLBServerCertKey - -tls.KubeAPIServerExternalLBServerCertKey + +tls.KubeAPIServerExternalLBServerCertKey - + installconfig.InstallConfig->tls.KubeAPIServerExternalLBServerCertKey - - + + - + tls.KubeAPIServerInternalLBServerCertKey - -tls.KubeAPIServerInternalLBServerCertKey + +tls.KubeAPIServerInternalLBServerCertKey - + installconfig.InstallConfig->tls.KubeAPIServerInternalLBServerCertKey - - + + - + tls.KubeAPIServerServiceNetworkServerCertKey - -tls.KubeAPIServerServiceNetworkServerCertKey + +tls.KubeAPIServerServiceNetworkServerCertKey - + installconfig.InstallConfig->tls.KubeAPIServerServiceNetworkServerCertKey - - + + - + cluster.Metadata - -cluster.Metadata + +cluster.Metadata - + installconfig.InstallConfig->cluster.Metadata - - + + - + cluster.TerraformVariables - -cluster.TerraformVariables + +cluster.TerraformVariables - + installconfig.InstallConfig->cluster.TerraformVariables - - + + + + + +rhcos.BootstrapImage + +rhcos.BootstrapImage + + + +installconfig.InstallConfig->rhcos.BootstrapImage + + - + cluster.Cluster - -cluster.Cluster + +cluster.Cluster - + installconfig.InstallConfig->cluster.Cluster - - + + installconfig.sshPublicKey - -installconfig.sshPublicKey + +installconfig.sshPublicKey installconfig.sshPublicKey->installconfig.InstallConfig - - + + installconfig.baseDomain - -installconfig.baseDomain + +installconfig.baseDomain installconfig.baseDomain->installconfig.InstallConfig - - + + installconfig.clusterName - -installconfig.clusterName + +installconfig.clusterName installconfig.baseDomain->installconfig.clusterName - - + + installconfig.platform - -installconfig.platform + +installconfig.platform installconfig.platform->installconfig.InstallConfig - - + + installconfig.platform->installconfig.baseDomain - - + + installconfig.clusterName->installconfig.InstallConfig - - + + installconfig.pullSecret - -installconfig.pullSecret + +installconfig.pullSecret installconfig.pullSecret->installconfig.InstallConfig - - + + Target Manifests - -Target Manifests + +Target Manifests machines.Master->Target Manifests - - + + - + machines.Master->bootstrap.Bootstrap - - + + - + machines.Master->cluster.TerraformVariables - - + + installconfig.ClusterID->machines.Master - - + + installconfig.ClusterID->machines.Worker - - + + installconfig.ClusterID->manifests.Manifests - - + + installconfig.ClusterID->manifests.DNS - - + + installconfig.ClusterID->manifests.Infrastructure - - + + installconfig.ClusterID->manifests.CloudProviderConfig - - + + - + installconfig.ClusterID->manifests.Openshift - - + + - + installconfig.ClusterID->cluster.Metadata - - + + - + installconfig.ClusterID->cluster.TerraformVariables - - + + - + installconfig.ClusterID->cluster.Cluster - - + + installconfig.PlatformCredsCheck->machines.Master - - + + installconfig.PlatformCredsCheck->machines.Worker - - + + installconfig.PlatformCredsCheck->manifests.DNS - - + + installconfig.PlatformCredsCheck->manifests.CloudProviderConfig - - + + - + installconfig.PlatformCredsCheck->cluster.Cluster - - + + rhcos.Image->machines.Master - - + + rhcos.Image->machines.Worker - - + + - + rhcos.Image->cluster.TerraformVariables - - + + machine.Master->machines.Master - - + + - + Target Ignition Configs - -Target Ignition Configs + +Target Ignition Configs - + machine.Master->Target Ignition Configs - - + + - + machine.Master->cluster.TerraformVariables - - + + tls.RootCA - -tls.RootCA + +tls.RootCA tls.RootCA->machine.Master - - + + tls.RootCA->machine.Worker - - + + - + tls.RootCA->manifests.Manifests - - + + - + tls.RootCA->tls.MCSCertKey - - + + - + tls.RootCA->bootstrap.Bootstrap - - + + - + tls.JournalCertKey - -tls.JournalCertKey + +tls.JournalCertKey - + tls.RootCA->tls.JournalCertKey - - + + machines.Worker->Target Manifests - - + + - + machines.Worker->bootstrap.Bootstrap - - + + - + machines.Worker->cluster.TerraformVariables - - + + machine.Worker->machines.Worker - - + + - + machine.Worker->Target Ignition Configs - - + + manifests.Manifests->Target Manifests - - + + - + manifests.Manifests->bootstrap.Bootstrap - - + + manifests.Ingress->manifests.Manifests - - + + manifests.DNS->manifests.Manifests - - + + manifests.Infrastructure->manifests.Manifests - - + + manifests.CloudProviderConfig->manifests.Infrastructure - - + + manifests.Networking->manifests.Manifests - - + + manifests.Networking->manifests.Proxy - - + + openshift.NetworkCRDs - -openshift.NetworkCRDs + +openshift.NetworkCRDs openshift.NetworkCRDs->manifests.Networking - - + + manifests.Proxy->manifests.Manifests - - + + - + manifests.Proxy->bootstrap.Bootstrap - - + + manifests.Scheduler - -manifests.Scheduler + +manifests.Scheduler manifests.Scheduler->manifests.Manifests - - + + + + + +manifests.ImageContentSourcePolicy->manifests.Manifests + + - + tls.EtcdSignerCertKey - -tls.EtcdSignerCertKey + +tls.EtcdSignerCertKey - + tls.EtcdSignerCertKey->manifests.Manifests - - + + - + tls.EtcdCABundle - -tls.EtcdCABundle + +tls.EtcdCABundle - + tls.EtcdSignerCertKey->tls.EtcdCABundle - - + + - + tls.EtcdSignerClientCertKey - -tls.EtcdSignerClientCertKey + +tls.EtcdSignerClientCertKey - + tls.EtcdSignerCertKey->tls.EtcdSignerClientCertKey - - + + - + tls.EtcdSignerCertKey->bootstrap.Bootstrap - - + + - + tls.EtcdCABundle->manifests.Manifests - - + + - + tls.EtcdCABundle->bootstrap.Bootstrap - - + + - + tls.EtcdSignerClientCertKey->manifests.Manifests - - + + - + tls.EtcdSignerClientCertKey->bootstrap.Bootstrap - - + + - + tls.EtcdMetricCABundle - -tls.EtcdMetricCABundle + +tls.EtcdMetricCABundle - + tls.EtcdMetricCABundle->manifests.Manifests - - + + - + tls.EtcdMetricCABundle->bootstrap.Bootstrap - - + + - + tls.EtcdMetricSignerCertKey - -tls.EtcdMetricSignerCertKey + +tls.EtcdMetricSignerCertKey - + tls.EtcdMetricSignerCertKey->manifests.Manifests - - + + - + tls.EtcdMetricSignerCertKey->tls.EtcdMetricCABundle - - + + - + tls.EtcdMetricSignerClientCertKey - -tls.EtcdMetricSignerClientCertKey + +tls.EtcdMetricSignerClientCertKey - + tls.EtcdMetricSignerCertKey->tls.EtcdMetricSignerClientCertKey - - + + - + tls.EtcdMetricSignerCertKey->bootstrap.Bootstrap - - + + - + tls.EtcdMetricSignerClientCertKey->manifests.Manifests - - + + - + tls.EtcdMetricSignerClientCertKey->bootstrap.Bootstrap - - + + - + tls.MCSCertKey->manifests.Manifests - - + + - + tls.MCSCertKey->bootstrap.Bootstrap - - + + - + bootkube.CVOOverrides - -bootkube.CVOOverrides + +bootkube.CVOOverrides - + bootkube.CVOOverrides->manifests.Manifests - - + + - + bootkube.EtcdCAConfigMap - -bootkube.EtcdCAConfigMap + +bootkube.EtcdCAConfigMap - + bootkube.EtcdCAConfigMap->manifests.Manifests - - + + - + bootkube.EtcdClientSecret - -bootkube.EtcdClientSecret + +bootkube.EtcdClientSecret - + bootkube.EtcdClientSecret->manifests.Manifests - - + + - + bootkube.EtcdHostServiceEndpoints - -bootkube.EtcdHostServiceEndpoints + +bootkube.EtcdHostServiceEndpoints - + bootkube.EtcdHostServiceEndpoints->manifests.Manifests - - + + - + bootkube.EtcdHostService - -bootkube.EtcdHostService + +bootkube.EtcdHostService - + bootkube.EtcdHostService->manifests.Manifests - - + + - + bootkube.EtcdMetricClientSecret - -bootkube.EtcdMetricClientSecret + +bootkube.EtcdMetricClientSecret - + bootkube.EtcdMetricClientSecret->manifests.Manifests - - + + - + bootkube.EtcdMetricServingCAConfigMap - -bootkube.EtcdMetricServingCAConfigMap + +bootkube.EtcdMetricServingCAConfigMap - + bootkube.EtcdMetricServingCAConfigMap->manifests.Manifests - - + + - + bootkube.EtcdMetricSignerSecret - -bootkube.EtcdMetricSignerSecret + +bootkube.EtcdMetricSignerSecret - + bootkube.EtcdMetricSignerSecret->manifests.Manifests - - + + - + bootkube.EtcdNamespace - -bootkube.EtcdNamespace + +bootkube.EtcdNamespace - + bootkube.EtcdNamespace->manifests.Manifests - - + + - + bootkube.EtcdService - -bootkube.EtcdService + +bootkube.EtcdService - + bootkube.EtcdService->manifests.Manifests - - + + - + bootkube.EtcdSignerSecret - -bootkube.EtcdSignerSecret + +bootkube.EtcdSignerSecret - + bootkube.EtcdSignerSecret->manifests.Manifests - - + + - + bootkube.KubeCloudConfig - -bootkube.KubeCloudConfig + +bootkube.KubeCloudConfig - + bootkube.KubeCloudConfig->manifests.Manifests - - + + - + bootkube.EtcdServingCAConfigMap - -bootkube.EtcdServingCAConfigMap + +bootkube.EtcdServingCAConfigMap - + bootkube.EtcdServingCAConfigMap->manifests.Manifests - - + + - + bootkube.KubeSystemConfigmapRootCA - -bootkube.KubeSystemConfigmapRootCA + +bootkube.KubeSystemConfigmapRootCA - + bootkube.KubeSystemConfigmapRootCA->manifests.Manifests - - + + - + bootkube.MachineConfigServerTLSSecret - -bootkube.MachineConfigServerTLSSecret + +bootkube.MachineConfigServerTLSSecret - + bootkube.MachineConfigServerTLSSecret->manifests.Manifests - - + + - + bootkube.OpenshiftConfigSecretPullSecret - -bootkube.OpenshiftConfigSecretPullSecret + +bootkube.OpenshiftConfigSecretPullSecret - + bootkube.OpenshiftConfigSecretPullSecret->manifests.Manifests - - + + - + bootkube.OpenshiftMachineConfigOperator - -bootkube.OpenshiftMachineConfigOperator + +bootkube.OpenshiftMachineConfigOperator - + bootkube.OpenshiftMachineConfigOperator->manifests.Manifests - - + + - + manifests.Openshift->Target Manifests - - + + - + manifests.Openshift->bootstrap.Bootstrap - - + + - + password.KubeadminPassword - -password.KubeadminPassword + +password.KubeadminPassword - + password.KubeadminPassword->manifests.Openshift - - + + - + password.KubeadminPassword->Target Ignition Configs - - + + - + Target Cluster - -Target Cluster + +Target Cluster - + password.KubeadminPassword->Target Cluster - - + + - + password.KubeadminPassword->cluster.Cluster - - + + - + openshift.CloudCredsSecret - -openshift.CloudCredsSecret + +openshift.CloudCredsSecret - + openshift.CloudCredsSecret->manifests.Openshift - - + + - + openshift.KubeadminPasswordSecret - -openshift.KubeadminPasswordSecret + +openshift.KubeadminPasswordSecret - + openshift.KubeadminPasswordSecret->manifests.Openshift - - + + - + openshift.RoleCloudCredsSecretReader - -openshift.RoleCloudCredsSecretReader + +openshift.RoleCloudCredsSecretReader - + openshift.RoleCloudCredsSecretReader->manifests.Openshift - - + + - + openshift.RoleBindingCloudCredsSecretReader - -openshift.RoleBindingCloudCredsSecretReader + +openshift.RoleBindingCloudCredsSecretReader - + openshift.RoleBindingCloudCredsSecretReader->manifests.Openshift - - + + - + kubeconfig.AdminClient->Target Ignition Configs - - + + - + kubeconfig.AdminClient->bootstrap.Bootstrap - - + + - + kubeconfig.AdminClient->Target Cluster - - + + - + tls.AdminKubeConfigClientCertKey - -tls.AdminKubeConfigClientCertKey + +tls.AdminKubeConfigClientCertKey - + tls.AdminKubeConfigClientCertKey->kubeconfig.AdminClient - - + + - + tls.AdminKubeConfigSignerCertKey - -tls.AdminKubeConfigSignerCertKey + +tls.AdminKubeConfigSignerCertKey - + tls.AdminKubeConfigSignerCertKey->tls.AdminKubeConfigClientCertKey - - + + - + tls.AdminKubeConfigCABundle - -tls.AdminKubeConfigCABundle + +tls.AdminKubeConfigCABundle - + tls.AdminKubeConfigSignerCertKey->tls.AdminKubeConfigCABundle - - + + - + tls.KubeAPIServerCompleteCABundle - -tls.KubeAPIServerCompleteCABundle + +tls.KubeAPIServerCompleteCABundle - + tls.KubeAPIServerCompleteCABundle->kubeconfig.AdminClient - - + + - + tls.KubeAPIServerCompleteCABundle->bootstrap.Bootstrap - - + + - + tls.KubeAPIServerCompleteCABundle->kubeconfig.Kubelet - - + + - + tls.KubeAPIServerLocalhostCABundle - -tls.KubeAPIServerLocalhostCABundle + +tls.KubeAPIServerLocalhostCABundle - + tls.KubeAPIServerLocalhostCABundle->tls.KubeAPIServerCompleteCABundle - - + + - + tls.KubeAPIServerLocalhostCABundle->bootstrap.Bootstrap - - + + - + tls.KubeAPIServerLocalhostSignerCertKey - -tls.KubeAPIServerLocalhostSignerCertKey + +tls.KubeAPIServerLocalhostSignerCertKey - + tls.KubeAPIServerLocalhostSignerCertKey->tls.KubeAPIServerLocalhostCABundle - - + + - + tls.KubeAPIServerLocalhostSignerCertKey->bootstrap.Bootstrap - - + + - + tls.KubeAPIServerLocalhostServerCertKey - -tls.KubeAPIServerLocalhostServerCertKey + +tls.KubeAPIServerLocalhostServerCertKey - + tls.KubeAPIServerLocalhostSignerCertKey->tls.KubeAPIServerLocalhostServerCertKey - - + + - + tls.KubeControlPlaneCABundle - -tls.KubeControlPlaneCABundle + +tls.KubeControlPlaneCABundle - + tls.KubeAPIServerLocalhostSignerCertKey->tls.KubeControlPlaneCABundle - - + + - + tls.KubeAPIServerServiceNetworkCABundle - -tls.KubeAPIServerServiceNetworkCABundle + +tls.KubeAPIServerServiceNetworkCABundle - + tls.KubeAPIServerServiceNetworkCABundle->tls.KubeAPIServerCompleteCABundle - - + + - + tls.KubeAPIServerServiceNetworkCABundle->bootstrap.Bootstrap - - + + - + tls.KubeAPIServerServiceNetworkSignerCertKey - -tls.KubeAPIServerServiceNetworkSignerCertKey + +tls.KubeAPIServerServiceNetworkSignerCertKey - + tls.KubeAPIServerServiceNetworkSignerCertKey->tls.KubeAPIServerServiceNetworkCABundle - - + + - + tls.KubeAPIServerServiceNetworkSignerCertKey->bootstrap.Bootstrap - - + + - + tls.KubeAPIServerServiceNetworkSignerCertKey->tls.KubeAPIServerServiceNetworkServerCertKey - - + + - + tls.KubeAPIServerServiceNetworkSignerCertKey->tls.KubeControlPlaneCABundle - - + + - + tls.KubeAPIServerLBCABundle - -tls.KubeAPIServerLBCABundle + +tls.KubeAPIServerLBCABundle - + tls.KubeAPIServerLBCABundle->tls.KubeAPIServerCompleteCABundle - - + + - + tls.KubeAPIServerLBCABundle->bootstrap.Bootstrap - - + + - + tls.KubeAPIServerLBSignerCertKey - -tls.KubeAPIServerLBSignerCertKey + +tls.KubeAPIServerLBSignerCertKey - + tls.KubeAPIServerLBSignerCertKey->tls.KubeAPIServerLBCABundle - - + + - + tls.KubeAPIServerLBSignerCertKey->bootstrap.Bootstrap - - + + - + tls.KubeAPIServerLBSignerCertKey->tls.KubeAPIServerExternalLBServerCertKey - - + + - + tls.KubeAPIServerLBSignerCertKey->tls.KubeAPIServerInternalLBServerCertKey - - + + - + tls.KubeAPIServerLBSignerCertKey->tls.KubeControlPlaneCABundle - - + + - + bootstrap.Bootstrap->Target Ignition Configs - - + + - + bootstrap.Bootstrap->cluster.TerraformVariables - - + + - + kubeconfig.Kubelet->bootstrap.Bootstrap - - + + - + tls.KubeletClientCertKey - -tls.KubeletClientCertKey + +tls.KubeletClientCertKey - + tls.KubeletClientCertKey->bootstrap.Bootstrap - - + + - + tls.KubeletClientCertKey->kubeconfig.Kubelet - - + + - + tls.KubeletBootstrapCertSigner - -tls.KubeletBootstrapCertSigner + +tls.KubeletBootstrapCertSigner - + tls.KubeletBootstrapCertSigner->tls.KubeletClientCertKey - - + + - + tls.KubeletBootstrapCABundle - -tls.KubeletBootstrapCABundle + +tls.KubeletBootstrapCABundle - + tls.KubeletBootstrapCertSigner->tls.KubeletBootstrapCABundle - - + + - + tls.AdminKubeConfigCABundle->bootstrap.Bootstrap - - + + - + tls.KubeAPIServerCompleteClientCABundle - -tls.KubeAPIServerCompleteClientCABundle + +tls.KubeAPIServerCompleteClientCABundle - + tls.AdminKubeConfigCABundle->tls.KubeAPIServerCompleteClientCABundle - - + + - + tls.AggregatorCA - -tls.AggregatorCA + +tls.AggregatorCA - + tls.AggregatorCA->bootstrap.Bootstrap - - + + - + tls.APIServerProxyCertKey - -tls.APIServerProxyCertKey + +tls.APIServerProxyCertKey - + tls.AggregatorCA->tls.APIServerProxyCertKey - - + + - + tls.AggregatorCABundle - -tls.AggregatorCABundle + +tls.AggregatorCABundle - + tls.AggregatorCABundle->bootstrap.Bootstrap - - + + - + tls.AggregatorSignerCertKey - -tls.AggregatorSignerCertKey + +tls.AggregatorSignerCertKey - + tls.AggregatorSignerCertKey->bootstrap.Bootstrap - - + + - + tls.AggregatorSignerCertKey->tls.AggregatorCABundle - - + + - + tls.AggregatorClientCertKey - -tls.AggregatorClientCertKey + +tls.AggregatorClientCertKey - + tls.AggregatorSignerCertKey->tls.AggregatorClientCertKey - - + + - + tls.AggregatorClientCertKey->bootstrap.Bootstrap - - + + - + tls.APIServerProxyCertKey->bootstrap.Bootstrap - - + + - + tls.JournalCertKey->bootstrap.Bootstrap - - + + - + tls.JournalCertKey->Target Cluster - - + + - + tls.KubeAPIServerExternalLBServerCertKey->bootstrap.Bootstrap - - + + - + tls.KubeAPIServerInternalLBServerCertKey->bootstrap.Bootstrap - - + + - + tls.KubeAPIServerLocalhostServerCertKey->bootstrap.Bootstrap - - + + - + tls.KubeAPIServerServiceNetworkServerCertKey->bootstrap.Bootstrap - - + + - + tls.KubeAPIServerCompleteClientCABundle->bootstrap.Bootstrap - - + + - + tls.KubeletClientCABundle - -tls.KubeletClientCABundle + +tls.KubeletClientCABundle - + tls.KubeletClientCABundle->bootstrap.Bootstrap - - + + - + tls.KubeletClientCABundle->tls.KubeAPIServerCompleteClientCABundle - - + + - + tls.KubeletCSRSignerCertKey - -tls.KubeletCSRSignerCertKey + +tls.KubeletCSRSignerCertKey - + tls.KubeletCSRSignerCertKey->bootstrap.Bootstrap - - + + - + tls.KubeletCSRSignerCertKey->tls.KubeletClientCABundle - - + + - + tls.KubeletServingCABundle - -tls.KubeletServingCABundle + +tls.KubeletServingCABundle - + tls.KubeletCSRSignerCertKey->tls.KubeletServingCABundle - - + + - + tls.KubeControlPlaneCABundle->bootstrap.Bootstrap - - + + - + tls.KubeControlPlaneCABundle->tls.KubeAPIServerCompleteClientCABundle - - + + - + tls.KubeControlPlaneSignerCertKey - -tls.KubeControlPlaneSignerCertKey + +tls.KubeControlPlaneSignerCertKey - + tls.KubeControlPlaneSignerCertKey->bootstrap.Bootstrap - - + + - + tls.KubeControlPlaneSignerCertKey->tls.KubeControlPlaneCABundle - - + + - + tls.KubeControlPlaneKubeControllerManagerClientCertKey - -tls.KubeControlPlaneKubeControllerManagerClientCertKey + +tls.KubeControlPlaneKubeControllerManagerClientCertKey - + tls.KubeControlPlaneSignerCertKey->tls.KubeControlPlaneKubeControllerManagerClientCertKey - - + + - + tls.KubeControlPlaneKubeSchedulerClientCertKey - -tls.KubeControlPlaneKubeSchedulerClientCertKey + +tls.KubeControlPlaneKubeSchedulerClientCertKey - + tls.KubeControlPlaneSignerCertKey->tls.KubeControlPlaneKubeSchedulerClientCertKey - - + + - + tls.KubeAPIServerToKubeletCABundle - -tls.KubeAPIServerToKubeletCABundle + +tls.KubeAPIServerToKubeletCABundle - + tls.KubeAPIServerToKubeletCABundle->bootstrap.Bootstrap - - + + - + tls.KubeAPIServerToKubeletCABundle->tls.KubeAPIServerCompleteClientCABundle - - + + - + tls.KubeAPIServerToKubeletSignerCertKey - -tls.KubeAPIServerToKubeletSignerCertKey + +tls.KubeAPIServerToKubeletSignerCertKey - + tls.KubeAPIServerToKubeletSignerCertKey->bootstrap.Bootstrap - - + + - + tls.KubeAPIServerToKubeletSignerCertKey->tls.KubeAPIServerToKubeletCABundle - - + + - + tls.KubeAPIServerToKubeletClientCertKey - -tls.KubeAPIServerToKubeletClientCertKey + +tls.KubeAPIServerToKubeletClientCertKey - + tls.KubeAPIServerToKubeletSignerCertKey->tls.KubeAPIServerToKubeletClientCertKey - - + + - + tls.KubeletBootstrapCABundle->bootstrap.Bootstrap - - + + - + tls.KubeletBootstrapCABundle->tls.KubeAPIServerCompleteClientCABundle - - + + - + tls.KubeAPIServerToKubeletClientCertKey->bootstrap.Bootstrap - - + + - + tls.KubeControlPlaneKubeControllerManagerClientCertKey->bootstrap.Bootstrap - - + + - + tls.KubeControlPlaneKubeSchedulerClientCertKey->bootstrap.Bootstrap - - + + - + tls.KubeletServingCABundle->bootstrap.Bootstrap - - + + - + tls.ServiceAccountKeyPair - -tls.ServiceAccountKeyPair + +tls.ServiceAccountKeyPair - + tls.ServiceAccountKeyPair->bootstrap.Bootstrap - - + + + + + +releaseimage.Image + +releaseimage.Image + + + +releaseimage.Image->bootstrap.Bootstrap + + - + cluster.Metadata->Target Ignition Configs - - + + - + cluster.Metadata->Target Cluster - - + + - + cluster.TerraformVariables->Target Cluster - - + + - + cluster.TerraformVariables->cluster.Cluster - - + + + + + +rhcos.BootstrapImage->cluster.TerraformVariables + + - + cluster.Cluster->Target Cluster - - + + diff --git a/pkg/asset/cluster/tfvars.go b/pkg/asset/cluster/tfvars.go index cebf1774a57..9b2d2606d62 100644 --- a/pkg/asset/cluster/tfvars.go +++ b/pkg/asset/cluster/tfvars.go @@ -74,6 +74,7 @@ func (t *TerraformVariables) Dependencies() []asset.Asset { &installconfig.ClusterID{}, &installconfig.InstallConfig{}, new(rhcos.Image), + new(rhcos.BootstrapImage), &bootstrap.Bootstrap{}, &machine.Master{}, &machines.Master{}, @@ -90,7 +91,8 @@ func (t *TerraformVariables) Generate(parents asset.Parents) error { mastersAsset := &machines.Master{} workersAsset := &machines.Worker{} rhcosImage := new(rhcos.Image) - parents.Get(clusterID, installConfig, bootstrapIgnAsset, masterIgnAsset, mastersAsset, workersAsset, rhcosImage) + rhcosBootstrapImage := new(rhcos.BootstrapImage) + parents.Get(clusterID, installConfig, bootstrapIgnAsset, masterIgnAsset, mastersAsset, workersAsset, rhcosImage, rhcosBootstrapImage) platform := installConfig.Config.Platform.Name() switch platform { @@ -261,7 +263,7 @@ func (t *TerraformVariables) Generate(parents asset.Parents) error { data, err = baremetaltfvars.TFVars( installConfig.Config.Platform.BareMetal.LibvirtURI, installConfig.Config.Platform.BareMetal.IronicURI, - string(*rhcosImage), + string(*rhcosBootstrapImage), "baremetal", "provisioning", installConfig.Config.Platform.BareMetal.Hosts, diff --git a/pkg/asset/rhcos/bootstrap_image.go b/pkg/asset/rhcos/bootstrap_image.go new file mode 100644 index 00000000000..c1d48afbdd3 --- /dev/null +++ b/pkg/asset/rhcos/bootstrap_image.go @@ -0,0 +1,58 @@ +// Package rhcos contains assets for RHCOS. +package rhcos + +import ( + "context" + "time" + + "github.com/openshift/installer/pkg/asset" + "github.com/openshift/installer/pkg/asset/installconfig" + "github.com/openshift/installer/pkg/rhcos" + "github.com/openshift/installer/pkg/types/baremetal" +) + +// BootstrapImage is location of the RHCOS image for the Bootstrap node +// This stores the location of the image based on the platform. +// eg. on AWS this contains ami-id, on Livirt this can be the URI for QEMU image etc. +// Note that for most platforms this is the same as rhcos.Image +type BootstrapImage string + +var _ asset.Asset = (*BootstrapImage)(nil) + +// Name returns the human-friendly name of the asset. +func (i *BootstrapImage) Name() string { + return "BootstrapImage" +} + +// Dependencies returns no dependencies. +func (i *BootstrapImage) Dependencies() []asset.Asset { + return []asset.Asset{ + &installconfig.InstallConfig{}, + } +} + +// Generate the RHCOS Bootstrap image location. +func (i *BootstrapImage) Generate(p asset.Parents) error { + ic := &installconfig.InstallConfig{} + p.Get(ic) + config := ic.Config + + var osimage string + var err error + ctx, cancel := context.WithTimeout(context.TODO(), 30*time.Second) + defer cancel() + switch config.Platform.Name() { + case baremetal.Name: + // Baremetal IPI launches a local VM for the bootstrap node + // Hence requires the QEMU image to use the libvirt backend + osimage, err = rhcos.QEMU(ctx) + default: + // other platforms use the same image for all nodes + osimage, err = osImage(config) + } + if err != nil { + return err + } + *i = BootstrapImage(osimage) + return nil +} diff --git a/pkg/asset/rhcos/image.go b/pkg/asset/rhcos/image.go index 73cc6fb1d85..448c6e0d3c0 100644 --- a/pkg/asset/rhcos/image.go +++ b/pkg/asset/rhcos/image.go @@ -12,6 +12,7 @@ import ( "github.com/openshift/installer/pkg/asset" "github.com/openshift/installer/pkg/asset/installconfig" "github.com/openshift/installer/pkg/rhcos" + "github.com/openshift/installer/pkg/types" "github.com/openshift/installer/pkg/types/aws" "github.com/openshift/installer/pkg/types/azure" "github.com/openshift/installer/pkg/types/baremetal" @@ -52,7 +53,15 @@ func (i *Image) Generate(p asset.Parents) error { ic := &installconfig.InstallConfig{} p.Get(ic) config := ic.Config + osimage, err := osImage(config) + if err != nil { + return err + } + *i = Image(osimage) + return nil +} +func osImage(config *types.InstallConfig) (string, error) { var osimage string var err error ctx, cancel := context.WithTimeout(context.TODO(), 30*time.Second) @@ -73,14 +82,16 @@ func (i *Image) Generate(p asset.Parents) error { //TODO(serbrech): change to right image once available. osimage = "/resourceGroups/rhcos_images/providers/Microsoft.Compute/images/rhcostestimage" case baremetal.Name: - osimage, err = rhcos.QEMU(ctx) + // Note that baremetal IPI currently uses the OpenStack image + // because this contains the necessary ironic config drive + // ignition support, which isn't enabled in the UPI BM images + osimage, err = rhcos.OpenStack(ctx) case none.Name, vsphere.Name: default: - return errors.New("invalid Platform") + return "", errors.New("invalid Platform") } if err != nil { - return err + return "", err } - *i = Image(osimage) - return nil + return osimage, nil } diff --git a/pkg/rhcos/builds.go b/pkg/rhcos/builds.go index c0a75165e36..ba6b2a0c7e1 100644 --- a/pkg/rhcos/builds.go +++ b/pkg/rhcos/builds.go @@ -19,6 +19,10 @@ type metadata struct { Path string `json:"path"` SHA256 string `json:"sha256"` } `json:"qemu"` + OpenStack struct { + Path string `json:"path"` + SHA256 string `json:"sha256"` + } `json:"openstack"` } `json:"images"` OSTreeVersion string `json:"ostree-version"` } diff --git a/pkg/rhcos/openstack.go b/pkg/rhcos/openstack.go new file mode 100644 index 00000000000..bf24a302c65 --- /dev/null +++ b/pkg/rhcos/openstack.go @@ -0,0 +1,29 @@ +package rhcos + +import ( + "context" + "net/url" + + "github.com/pkg/errors" +) + +// OpenStack fetches the URL of the Red Hat Enterprise Linux CoreOS release, +// for the openstack platform +func OpenStack(ctx context.Context) (string, error) { + meta, err := fetchRHCOSBuild(ctx) + if err != nil { + return "", errors.Wrap(err, "failed to fetch RHCOS metadata") + } + + base, err := url.Parse(meta.BaseURI) + if err != nil { + return "", err + } + + relOpenStack, err := url.Parse(meta.Images.OpenStack.Path) + if err != nil { + return "", err + } + + return base.ResolveReference(relOpenStack).String(), nil +}