Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OpenStack credential propagation support #697

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

bnallapeta
Copy link
Member

@bnallapeta bnallapeta commented Nov 28, 2024

Local Run:

ka get machines
NAME                           CLUSTER         NODENAME                       PROVIDERID                                          PHASE     AGE     VERSION
openstack-dev-cp-0             openstack-dev   openstack-dev-cp-0             openstack:///b52ccc71-566b-4487-a0b8-64b2c08f0e5b   Running   8m29s   v1.30.5+k0s.0
openstack-dev-cp-1             openstack-dev   openstack-dev-cp-1             openstack:///4022efcb-da46-4a99-80f3-2eaf3681238e   Running   8m29s   v1.30.5+k0s.0
openstack-dev-cp-2             openstack-dev   openstack-dev-cp-2             openstack:///87ae87e0-2ac5-4f06-b7ba-970d6dbcab3f   Running   8m29s   v1.30.5+k0s.0
openstack-dev-md-p27j6-6wfn4   openstack-dev   openstack-dev-md-p27j6-6wfn4   openstack:///5c2c51c8-f2c0-48d3-9c8f-ed28db53112a   Running   8m30s   
openstack-dev-md-p27j6-w6qvx   openstack-dev   openstack-dev-md-p27j6-w6qvx   openstack:///2df39a6d-2507-452f-9a0a-fb3e6a5d2052   Running   8m30s   
clusterctl describe cluster openstack-dev -n hmc-system
NAME                                                      READY  SEVERITY  REASON  SINCE  MESSAGE                                                        
Cluster/openstack-dev                                     True                     5m26s                                                                  
├─ClusterInfrastructure - OpenStackCluster/openstack-dev                                                                                                  
├─ControlPlane - K0sControlPlane/openstack-dev-cp                                                                                                         
│ └─3 Machines...                                         True                     7m32s  See openstack-dev-cp-0, openstack-dev-cp-1, ...                 
└─Workers                                                                                                                                                 
  └─MachineDeployment/openstack-dev-md                    True                     110s                                                                   
    └─2 Machines...                                       True                     3m43s  See openstack-dev-md-p27j6-6wfn4, openstack-dev-md-p27j6-w6qvx  
k -n hmc-system get managedclusters.hmc.mirantis.com 
NAME            READY   STATUS
openstack-dev   True    ManagedCluster is ready

internal/credspropagation/openstack.go Outdated Show resolved Hide resolved
Copy link
Contributor

@a13x5 a13x5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Several issues with overall logic.
Also I believe the scope of this PR could be broaden a little bit by adding credential passing to the cluster (setIdentityHelmValues function). Currently we're expecting ClusterIdentity object only, this isn't the case with OpenStack provider, so logic should be adjusted/tested. If you prepared another PR with these changes it should be merged first.

internal/credspropagation/common.go Show resolved Hide resolved
internal/credspropagation/openstack.go Outdated Show resolved Hide resolved
internal/credspropagation/openstack.go Outdated Show resolved Hide resolved
internal/credspropagation/openstack.go Outdated Show resolved Hide resolved
internal/credspropagation/openstack.go Outdated Show resolved Hide resolved
@bnallapeta bnallapeta force-pushed the openstack-add-creds branch 6 times, most recently from 0a9c359 to 0555f37 Compare December 3, 2024 11:01
@bnallapeta bnallapeta requested review from a13x5 and eromanova December 4, 2024 04:13
@bnallapeta
Copy link
Member Author

@a13x5 @eromanova Would appreciate if you can take a look at the PR and merge it soon.

Copy link
Member

@eromanova eromanova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small comment from my side. The rest looks good.

username: ${OS_USERNAME}
password: ${OS_PASSWORD}
project_id: ${OS_PROJECT_ID}
project_name: ${OS_PROJECT_NAME}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIR, the project_name is optional. Will this config be properly rendered if the ${OS_PROJECT_NAME} is unset?

Copy link
Contributor

@a13x5 a13x5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved
Additional fixes will be made later

@eromanova eromanova self-requested a review December 19, 2024 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants