diff --git a/data/data/manifests/openshift/cloud-creds-secret.yaml.template b/data/data/manifests/openshift/cloud-creds-secret.yaml.template index 913947b9436..90b595eb02f 100644 --- a/data/data/manifests/openshift/cloud-creds-secret.yaml.template +++ b/data/data/manifests/openshift/cloud-creds-secret.yaml.template @@ -5,7 +5,7 @@ metadata: {{- if .CloudCreds.AWS}} name: aws-creds {{- else if .CloudCreds.OpenStack}} - name: openstack-creds + name: openstack-credentials {{- end}} data: {{- if .CloudCreds.AWS}} diff --git a/data/data/manifests/openshift/role-cloud-creds-secret-reader.yaml.template b/data/data/manifests/openshift/role-cloud-creds-secret-reader.yaml.template index 4c7a3be9259..d8f9710e6f3 100644 --- a/data/data/manifests/openshift/role-cloud-creds-secret-reader.yaml.template +++ b/data/data/manifests/openshift/role-cloud-creds-secret-reader.yaml.template @@ -13,6 +13,6 @@ rules: {{- if .CloudCreds.AWS}} resourceNames: ["aws-creds"] {{- else if .CloudCreds.OpenStack}} - resourceNames: ["openstack-creds"] + resourceNames: ["openstack-credentials"] {{- end}} verbs: ["get"] diff --git a/pkg/asset/machines/openstack/machines.go b/pkg/asset/machines/openstack/machines.go index 2a628f8e5c0..df70bfab991 100644 --- a/pkg/asset/machines/openstack/machines.go +++ b/pkg/asset/machines/openstack/machines.go @@ -15,7 +15,10 @@ import ( "github.com/openshift/installer/pkg/types/openstack" ) -const cloudsSecret = "openstack-credentials" +const ( + cloudsSecret = "openstack-credentials" + cloudsSecretNamespace = "kube-system" +) // Machines returns a list of machines for a machinepool. func Machines(clusterID string, config *types.InstallConfig, pool *types.MachinePool, osImage, role, userDataSecret string) ([]clusterapi.Machine, error) { @@ -81,7 +84,7 @@ func provider(clusterID, clusterName string, platform *openstack.Platform, mpool },*/ Image: osImage, CloudName: platform.Cloud, - CloudsSecret: &corev1.SecretReference{Name: cloudsSecret}, + CloudsSecret: &corev1.SecretReference{Name: cloudsSecret, Namespace: cloudsSecretNamespace}, UserDataSecret: &corev1.SecretReference{Name: userDataSecret}, Networks: []openstackprovider.NetworkParam{ {