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

HOSTEDCP-2193: documenting --managed-identities-file flag #5199

Conversation

Patryk-Stefanski
Copy link
Contributor

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, use fixes #<issue_number>(, fixes #<issue_number>, ...) format, where issue_number might be a GitHub issue, or a Jira story:
Fixes #

Checklist

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

@openshift-ci openshift-ci bot requested review from hasueki and sjenning November 28, 2024 14:06
@openshift-ci openshift-ci bot added area/cli Indicates the PR includes changes for CLI area/documentation Indicates the PR includes changes for documentation area/testing Indicates the PR includes changes for e2e testing and removed do-not-merge/needs-area labels Nov 28, 2024
@Patryk-Stefanski Patryk-Stefanski changed the title Hostedcp 2193 documentation HOSTEDCP-2193: documenting --managed-identities-file flag Nov 28, 2024
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Nov 28, 2024
@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 28, 2024

@Patryk-Stefanski: This pull request references HOSTEDCP-2193 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.19.0" version, but no target version was set.

In response to this:

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, use fixes #<issue_number>(, fixes #<issue_number>, ...) format, where issue_number might be a GitHub issue, or a Jira story:
Fixes #

Checklist

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@Patryk-Stefanski Patryk-Stefanski force-pushed the HOSTEDCP-2193-documentation branch from 1839f15 to 14424d3 Compare November 28, 2024 14:12
@enxebre
Copy link
Member

enxebre commented Nov 28, 2024

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 28, 2024
@enxebre
Copy link
Member

enxebre commented Nov 28, 2024

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 28, 2024
@Patryk-Stefanski
Copy link
Contributor Author

Waiting to merge this once the old SP logic is cleaned up and the new one is fully implemented and live in our e2es

OUTPUT_FILE="service-principals.json"

cat <<EOF > SP_FILE
{
Copy link
Member

Choose a reason for hiding this comment

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

Should this have the control plane vs data plane distinction? Are you planning to reuse this file for workload identity for the managed identities on the data plane side?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep we will use one file for all the managed-identities we will have to pass in

},
"managedIdentitiesKeyVault": {
"name": "${KV_NAME}",
"tenantID": "$(az account show --query tenantId -o tsv)"
Copy link
Member

Choose a reason for hiding this comment

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

Maybe this should just be predefined above. Maybe the MI KV can be in a different tenant than the use running this.

@Patryk-Stefanski Patryk-Stefanski force-pushed the HOSTEDCP-2193-documentation branch from 14424d3 to aa302b9 Compare December 5, 2024 12:02
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Dec 5, 2024
@Patryk-Stefanski Patryk-Stefanski force-pushed the HOSTEDCP-2193-documentation branch from aa302b9 to 2c5e6d3 Compare December 5, 2024 13:01

## Steps
Note: Steps 1-7 set up the environment so that if created in a persistent group they can be
reused for creation of clusters in the future.
Copy link
Member

Choose a reason for hiding this comment

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

Maybe the why should be added here, i.e. quota issues.

Copy link
Contributor

openshift-ci bot commented Dec 5, 2024

@Patryk-Stefanski: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aks 14424d3 link true /test e2e-aks

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@@ -4,6 +4,10 @@ set -x
# This creates an Azure HostedCluster with the VNET in its own RG and the NSG in its own NSG.
# The MANAGED_RG_NAME contains all the cloud resources created by the HC creation.

# Prerequisites:
# 1. File with control plane managed identities in json format, see steps 5 & 6 in setup_dev_environment.md
Copy link
Member

Choose a reason for hiding this comment

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

nit

Suggested change
# 1. File with control plane managed identities in json format, see steps 5 & 6 in setup_dev_environment.md
# 1. JSON file containing control plane service principals, see steps 5 & 6 in setup_dev_environment.md

DNS_RECORD_NAME=<DNS_RECORD_NAME>
EXTERNAL_DNS_SP_NAME=<EXTERNAL_DNS_SP_NAME>
EXTERNAL_DNS_CREDS=<PATH_TO_FILE_WITH_DNS_CREDS>
DNS_ZONE_NAME="<DNS_RECORD_NAME>.hypershift.azure.devcluster.openshift.com"
Copy link
Member

Choose a reason for hiding this comment

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

Should this block and the two below be generic and not point to our actual resources?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

adding note to that these are meant for hypershift engineers and that attention should be paid when using these

### 5. Create Service Principals

```sh
cloudProvider=$(az ad sp create-for-rbac --name "${CLOUD_PROVIDER_SP_NAME}" --create-cert --cert "${CLOUD_PROVIDER_SP_NAME}" --keyvault "${KV_NAME}" --query "{clientID: appId, certificateName: '${CLOUD_PROVIDER_SP_NAME}'}" -o json)
Copy link
Member

Choose a reason for hiding this comment

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

Just double checking, this automatically gets filled out correctly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep

@Patryk-Stefanski Patryk-Stefanski force-pushed the HOSTEDCP-2193-documentation branch from 2c5e6d3 to 14c88b7 Compare December 5, 2024 16:28
@bryan-cox
Copy link
Member

/hold cancel
/approve

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 9, 2024
Copy link
Contributor

openshift-ci bot commented Dec 9, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bryan-cox, Patryk-Stefanski

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

The pull request process is described 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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 9, 2024
@sjenning
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 10, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 0102cde into openshift:main Dec 10, 2024
4 checks passed
@openshift-bot
Copy link

[ART PR BUILD NOTIFIER]

Distgit: hypershift
This PR has been included in build ose-hypershift-container-v4.19.0-202412102006.p0.g0102cde.assembly.stream.el9.
All builds following this will include this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/cli Indicates the PR includes changes for CLI area/documentation Indicates the PR includes changes for documentation area/testing Indicates the PR includes changes for e2e testing jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants