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

Hack to get deployment manager credentials #34

Merged

Conversation

jhernand
Copy link
Collaborator

@jhernand jhernand commented Dec 1, 2023

This patch implements a temporary solution to get deployment manager credentials. For each deployment manager returned it does the following:

  1. Determines which hub manages the cluster.
  2. Obtains from the global hub the credentials that were used to register that hub to the global hub.
  3. Uses those registration credentials to connect to the hub and fetch the admin kubeconfig.
  4. Uses the hub admin kubeconfig of the hub to fetch the credentials that were used to register the cluster.
  5. Uses the cluster registration credentials to connect to the cluster and fetch the admin kubeconfig.
  6. Populates the extensions.profileData field from that kubeconfig.

This patch implements a temporary solution to get deployment manager
credentials.  For each deployment manager returned it does the
following:

1. Determines which hub manages the cluster.
2. Obtains from the global hub the credentials that were used to
   register that hub to the global hub.
3. Uses those registration credentials to connect to the hub and fetch
   the admin kubeconfig.
4. Uses the hub admin kubeconfig of the hub to fetch the credentials that
   were used to register the cluster.
5. Uses the cluster registration credentials to connect to the cluster
   and fetch the admin kubeconfig.
6. Populates the `extensions.profileData` field from that kubeconfig.

Signed-off-by: Juan Hernandez <[email protected]>
Copy link

openshift-ci bot commented Dec 1, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from jhernand. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jhernand jhernand merged commit 4fc74bd into openshift-kni:main Dec 3, 2023
6 of 7 checks passed
@jhernand jhernand deleted the hack_to_get_cluster_credentials branch December 3, 2023 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant