Skip to content

Conversation

@r4f4
Copy link
Contributor

@r4f4 r4f4 commented Oct 21, 2022

Similar work to what I've been doing for the openshift-installer openshift/installer#6003

Marking as WIP while I figure out why it's not working with AzureStack.

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 21, 2022
@openshift-ci openshift-ci bot requested review from frobware and rfredette October 21, 2022 13:02
@r4f4 r4f4 force-pushed the azure-adal-deprecation branch from 14e683d to 8e2fe2e Compare November 22, 2022 15:42
@r4f4
Copy link
Contributor Author

r4f4 commented Nov 22, 2022

/retitle dns: azure: use azidentity with an adapter

@openshift-ci openshift-ci bot changed the title WIP: Azure adal deprecation dns: azure: use azidentity with an adapter Nov 22, 2022
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 22, 2022
@r4f4
Copy link
Contributor Author

r4f4 commented Dec 3, 2022

Fixed a typo s/HasPrefix/HasSuffix/

@r4f4
Copy link
Contributor Author

r4f4 commented Jan 11, 2023

Context for this change: https://issues.redhat.com/browse/CORS-2467
@frobware @rfredette What is missing to get this reviewed and merged?

@candita
Copy link
Contributor

candita commented Jan 11, 2023

/retitle CORS-2467: dns: azure: use azidentity with an adapter

@openshift-ci openshift-ci bot changed the title dns: azure: use azidentity with an adapter CORS-2467: dns: azure: use azidentity with an adapter Jan 11, 2023
@rfredette
Copy link
Contributor

Thanks @r4f4, I'll give this a review soon.

/assign
/assign @gcs278

switch config.Environment {
case azure.ChinaCloud:
cloudConfig = cloud.AzureChina
// GermanCloud was closed on Oct 29, 2021
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we have any CI jobs that still expect the GermanCloud region/zone to be present?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't find anything in openshift/release.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But I can un-comment it if you think it's safer.


scope := config.Environment.TokenAudience
if !strings.HasPrefix(scope, "/.default") {
if !strings.HasSuffix(scope, "/.default") {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we create a unit test case at all -- something that would have caught this change up front?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

A unit test for getAuthorizerForResource or do you mean to extract this part out into a function and write some unit tests for that?

Copy link
Contributor

Choose a reason for hiding this comment

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

A bit of both; if we had a test (or had written a test) would we have discovered the need to use HasSuffix (over HasPrefix) because the test would have failed upfront.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

config.Environment.ActiveDirectoryEndpoint, config.TenantID)
var cloudConfig cloud.Configuration
switch config.Environment {
case azure.ChinaCloud:
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason this logic flow differs from https://github.com/r4f4/installer/blob/897b6226e87ec5c9e25c0c952b7f6a301204fe67/pkg/asset/installconfig/azure/session.go#L73-L89? The default here is AzureStackCloud, but the default in openshift/installer is AzurePublic.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No particular reason other than I was changing the Installer code a lot during my testing of AzureStack and figuring out how to get it to work. I can change this to make it like the Installer's if you prefer.

Copy link
Contributor

Choose a reason for hiding this comment

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

I have no preference, just wanted to make sure there it isn't supposed to be exactly the same. As long as it works as expected.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, sorry. I've done quite a few of these so I'm getting them mixed up. In this case there was a simple reason for the swap of Public <-> Stack: autorest doesn't define azure.StackCloud [1]. In the installer, we have our own definition for the cloud environments [2]. So to get around that, I've left StackCloud as the last branch.

[1] https://github.com/Azure/go-autorest/blob/main/autorest/azure/environments.go#L34-L41
[2] https://github.com/openshift/installer/blob/master/pkg/types/azure/platform.go#L95-L110

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay seems reasonable, thanks.

@r4f4
Copy link
Contributor Author

r4f4 commented Jan 24, 2023

/hold
while I get some feedback and then squash the commits.

@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 Jan 24, 2023
@gcs278
Copy link
Contributor

gcs278 commented Jan 25, 2023

/lgtm
We can wait for @frobware to review recent changes before approval.

@gcs278
Copy link
Contributor

gcs278 commented Jan 31, 2023

my lgtm didn't get applied
/lgtm

@gcs278
Copy link
Contributor

gcs278 commented Jan 31, 2023

@r4f4 I think we need a bug like https://issues.redhat.com/browse/OCPBUGS-4541 for this. Would you mind making it?

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 31, 2023
@r4f4
Copy link
Contributor Author

r4f4 commented Jan 31, 2023

/retitle OCPBUGS-6863: dns: azure: use azidentity with an adapter

@openshift-ci openshift-ci bot changed the title CORS-2467: dns: azure: use azidentity with an adapter OCPBUGS-6863: dns: azure: use azidentity with an adapter Jan 31, 2023
@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Jan 31, 2023
@openshift-ci-robot
Copy link
Contributor

@r4f4: This pull request references Jira Issue OCPBUGS-6863, which is invalid:

  • expected the bug to target the "4.13.0" version, but it targets "4.13" instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Similar work to what I've been doing for the openshift-installer openshift/installer#6003

Marking as WIP while I figure out why it's not working with AzureStack.

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/test-infra repository.

@r4f4
Copy link
Contributor Author

r4f4 commented Jan 31, 2023

/jira refresh

@Miciah
Copy link
Contributor

Miciah commented Feb 20, 2023

@r4f4, can you rebase this PR again?

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 20, 2023
@r4f4 r4f4 force-pushed the azure-adal-deprecation branch from 70089bd to ad45e7d Compare February 20, 2023 20:02
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Feb 20, 2023
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 20, 2023
@r4f4
Copy link
Contributor Author

r4f4 commented Feb 20, 2023

Rebased to fix merge conflicts.

@CFields651
Copy link

/label px-approved

@openshift-ci openshift-ci bot added the px-approved Signifies that Product Support has signed off on this PR label Feb 21, 2023
@lihongan
Copy link
Contributor

lihongan commented Feb 22, 2023

/label qe-approved
launch cluster with the PR and do some regression test, no issue found

$ oc -n openshift-ingress get svc
NAME                      TYPE           CLUSTER-IP       EXTERNAL-IP     PORT(S)                      AGE
router-default            LoadBalancer   172.30.89.178    20.96.134.116   80:31311/TCP,443:32033/TCP   102m
router-extlb              LoadBalancer   172.30.254.31    20.75.60.76     80:32131/TCP,443:32581/TCP   4m19s

$ dig any.extlb.ci-ln-hif9n2k-1d09d.ci.azure.devcluster.openshift.com +short
20.75.60.76

$ oc get co/ingress
NAME      VERSION                                                   AVAILABLE   PROGRESSING   DEGRADED   SINCE   MESSAGE
ingress   4.13.0-0.ci.test-2023-02-22-074341-ci-ln-hif9n2k-latest   True        False         False      97m     

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 22, 2023

@lihongan: The label(s) /label qe-aaproved cannot be applied. These labels are supported: platform/aws, platform/azure, platform/baremetal, platform/google, platform/libvirt, platform/openstack, ga, tide/merge-method-merge, tide/merge-method-rebase, tide/merge-method-squash, px-approved, docs-approved, qe-approved, downstream-change-needed, approved, backport-risk-assessed, bugzilla/valid-bug, cherry-pick-approved, jira/valid-bug, staff-eng-approved. Is this label configured under labels -> additional_labels or labels -> restricted_labels in plugin.yaml?

Details

In response to this:

/label qe-aaproved
launch cluster with the PR and do some regression test, no issue found

$ oc -n openshift-ingress get svc
NAME                      TYPE           CLUSTER-IP       EXTERNAL-IP     PORT(S)                      AGE
router-default            LoadBalancer   172.30.89.178    20.96.134.116   80:31311/TCP,443:32033/TCP   102m
router-extlb              LoadBalancer   172.30.254.31    20.75.60.76     80:32131/TCP,443:32581/TCP   4m19s

$ dig any.extlb.ci-ln-hif9n2k-1d09d.ci.azure.devcluster.openshift.com +short
20.75.60.76

$ oc get co/ingress
NAME      VERSION                                                   AVAILABLE   PROGRESSING   DEGRADED   SINCE   MESSAGE
ingress   4.13.0-0.ci.test-2023-02-22-074341-ci-ln-hif9n2k-latest   True        False         False      97m     

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/test-infra repository.

@lihongan
Copy link
Contributor

/label qe-approved

@openshift-ci openshift-ci bot added the qe-approved Signifies that QE has signed off on this PR label Feb 22, 2023
@Miciah
Copy link
Contributor

Miciah commented Feb 22, 2023

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 22, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Miciah

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

The pull request process is described here

Details 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 Feb 22, 2023
@gcs278
Copy link
Contributor

gcs278 commented Feb 22, 2023

Looks good to me, but we are going to wait on #890 to get merged, which will most likely cause a rebase, and we can proceed from there.

@DCChadwick
Copy link

/label docs-approved

@openshift-ci openshift-ci bot added the docs-approved Signifies that Docs has signed off on this PR label Feb 23, 2023
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 23, 2023
r4f4 added 3 commits February 23, 2023 15:29
ADAL will be deprecated in Dec 2022. Let's move to azidentity with an
adapter so the new authentication can work the V1 clients.
@Miciah Miciah force-pushed the azure-adal-deprecation branch from ad45e7d to 82c6757 Compare February 23, 2023 20:38
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 23, 2023
@r4f4
Copy link
Contributor Author

r4f4 commented Feb 23, 2023

/retest-required

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 24, 2023

@r4f4: The following tests 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-gcp-ovn-serial 843892e link true /test e2e-gcp-ovn-serial
ci/prow/e2e-azure-ovn 82c6757 link false /test e2e-azure-ovn

Full PR test history. Your PR dashboard.

Details

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/test-infra repository. I understand the commands that are listed here.

@Miciah
Copy link
Contributor

Miciah commented Feb 25, 2023

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 25, 2023
@openshift-merge-robot openshift-merge-robot merged commit 8eb2c66 into openshift:master Feb 25, 2023
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. docs-approved Signifies that Docs has signed off on this PR 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. px-approved Signifies that Product Support has signed off on this PR qe-approved Signifies that QE has signed off on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.