Skip to content

OCPBUGS-56268: pkg/types/azure: remove SystemAssignedID docs #9717

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

Merged

Conversation

patrickdillon
Copy link
Contributor

@patrickdillon patrickdillon commented May 15, 2025

For the Azure identity API, the installer makes use directly of the CAPZ API, but we do add validation to not support SystemAssigned identities.

SystemAssigned identities were removed in
11f006d
but I missed updating the godoc text which is pulled in from CAPZ.

This PR updates the godoc text so that the explain command will not show SystemAssigned identities as a valid choice.

Example output:

$ ./openshift-install explain installconfig.controlPlane.platform.azure.identity
KIND:     InstallConfig
VERSION:  v1

RESOURCE: <object>
  Default: "None"
  Identity is the type of identity used for the virtual machine.
The type 'UserAssigned' is a standalone Azure resource provided by the user
and assigned to the VM
Identity can only be set for control-plane nodes.

FIELDS:
    type <string> -required-
      Valid Values: "None","UserAssigned"
      Type specifies the type of identity to be used.

    userAssignedIdentities <[]object> -required-
      UserAssignedIdentities is a list of identities to be attached to a node.
Only one user-assigned identity may be supplied.
Supplying more than one user-assigned identity is an experimental feature
which may be enabled with the MachineAPIMigration feature gate.
      UserAssignedIdentity contains the fields that comprise a user-assigned identity.

@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels May 15, 2025
@openshift-ci-robot
Copy link
Contributor

@patrickdillon: This pull request references Jira Issue OCPBUGS-56268, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.20.0) matches configured target version for branch (4.20.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @gpei

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

In response to this:

For the Azure identity API, the installer makes use directly of the CAPZ API, but we do add validation to not support SystemAssigned identities.

SystemAssigned identities were removed in
11f006d
but I missed updating the godoc text which is pulled in from CAPZ.

This PR updates the godoc text so that the explain command will not show SystemAssigned identities as a valid choice. To do this, I added a kubebuilder enum validation directly in our pkg. That seemed to remove the valid values that came from CAPZ, but did not add in the new values. So I added in the new values manually, which required some whitespace formatting to make things align.

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.

@openshift-ci openshift-ci bot requested a review from gpei May 15, 2025 17:21
@openshift-ci-robot
Copy link
Contributor

@patrickdillon: This pull request references Jira Issue OCPBUGS-56268, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.20.0) matches configured target version for branch (4.20.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @gpei

In response to this:

For the Azure identity API, the installer makes use directly of the CAPZ API, but we do add validation to not support SystemAssigned identities.

SystemAssigned identities were removed in
11f006d
but I missed updating the godoc text which is pulled in from CAPZ.

This PR updates the godoc text so that the explain command will not show SystemAssigned identities as a valid choice. To do this, I added a kubebuilder enum validation directly in our pkg. That seemed to remove the valid values that came from CAPZ, but did not add in the new values. So I added in the new values manually, which required some whitespace formatting to make things align.

Example output:

[padillon@dhcp-10-20-1-45 bin]$ ./openshift-install explain installconfig.controlPlane.platform.azure.identity
KIND:     InstallConfig
VERSION:  v1

RESOURCE: <object>
 Default: "None"
 Identity is the type of identity used for the virtual machine.
The type 'UserAssigned' is a standalone Azure resource provided by the user
and assigned to the VM
Identity can only be set for control-plane nodes.

FIELDS:
   type <string> -required-
     Valid Values: "None", "UserAssigned"
     Type specifies the type of identity to be used.

   userAssignedIdentities <[]object> -required-
     UserAssignedIdentities is a list of identities to be attached to a node.
Only one user-assigned identity may be supplied.
Supplying more than one user-assigned identity is an experimental feature
which may be enabled with the MachineAPIMigration feature gate.
     UserAssignedIdentity contains the fields that comprise a user-assigned identity.

[padillon@dhcp-10-20-1-45 bin]$ ./openshift-install explain installconfig.controlPlane.platform.azure.identity.type
KIND:     InstallConfig
VERSION:  v1

RESOURCE: <string>
 Valid Values: "None", "UserAssigned"
     Type specifies the type of identity to be used.

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.

@patrickdillon patrickdillon force-pushed the cleanup-system-assigned-id branch 2 times, most recently from 6839456 to bc9c62d Compare May 20, 2025 18:37
@openshift-ci-robot
Copy link
Contributor

@patrickdillon: This pull request references Jira Issue OCPBUGS-56268, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.20.0) matches configured target version for branch (4.20.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @jinyunma

In response to this:

For the Azure identity API, the installer makes use directly of the CAPZ API, but we do add validation to not support SystemAssigned identities.

SystemAssigned identities were removed in
11f006d
but I missed updating the godoc text which is pulled in from CAPZ.

This PR updates the godoc text so that the explain command will not show SystemAssigned identities as a valid choice.

Example output:

$ ./openshift-install explain installconfig.controlPlane.platform.azure.identity
KIND:     InstallConfig
VERSION:  v1

RESOURCE: <object>
 Default: "None"
 Identity is the type of identity used for the virtual machine.
The type 'UserAssigned' is a standalone Azure resource provided by the user
and assigned to the VM
Identity can only be set for control-plane nodes.

FIELDS:
   type <string> -required-
     Valid Values: "None","UserAssigned"
     Type specifies the type of identity to be used.

   userAssignedIdentities <[]object> -required-
     UserAssignedIdentities is a list of identities to be attached to a node.
Only one user-assigned identity may be supplied.
Supplying more than one user-assigned identity is an experimental feature
which may be enabled with the MachineAPIMigration feature gate.
     UserAssignedIdentity contains the fields that comprise a user-assigned identity.

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.

@openshift-ci openshift-ci bot requested a review from jinyunma May 20, 2025 18:41
Copy link
Member

@tthvo tthvo left a comment

Choose a reason for hiding this comment

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

Nice and clean!

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label May 20, 2025
@patrickdillon patrickdillon force-pushed the cleanup-system-assigned-id branch from bc9c62d to 8f5a5ef Compare May 21, 2025 19:29
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label May 21, 2025
// The type 'UserAssigned' is a standalone Azure resource provided by the user
// and assigned to the VM
// Identity can only be set for control-plane nodes.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

force pushed to update (remove) this inaccurate line.

Copy link
Member

Choose a reason for hiding this comment

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

Need another rebase I think 😅

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 21, 2025
For the Azure identity API, the installer makes use directly of the
CAPZ API, but we do add validation to not support SystemAssigned
identities.

SystemAssigned identities were removed in
11f006d
but I missed updating the godoc text which is pulled in from CAPZ.

This PR updates the godoc text and kubebuilder annotations so that the
explain command will not show SystemAssigned identities as a valid choice.

Also the godoc text indicated identity was for control-plane only; fixed
to include compute.
@patrickdillon patrickdillon force-pushed the cleanup-system-assigned-id branch from 8f5a5ef to 935d8ed Compare May 21, 2025 19:48
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 21, 2025
Copy link
Member

@tthvo tthvo left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

We need to backport to 4.19 too? All in one for #9735 maybe?

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label May 21, 2025
Copy link
Contributor

openshift-ci bot commented May 21, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tthvo

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 May 21, 2025
@patrickdillon
Copy link
Contributor Author

/lgtm /approve

We need to backport to 4.19 too? All in one for #9735 maybe?

Yeah let's do it, all in one!

Copy link
Contributor

openshift-ci bot commented May 22, 2025

@patrickdillon: 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-azure-ovn-resourcegroup 935d8ed link false /test e2e-azure-ovn-resourcegroup
ci/prow/e2e-azure-ovn-shared-vpc 935d8ed link false /test e2e-azure-ovn-shared-vpc
ci/prow/azure-ovn-marketplace-images 935d8ed link false /test azure-ovn-marketplace-images
ci/prow/okd-scos-e2e-aws-ovn 935d8ed link false /test okd-scos-e2e-aws-ovn
ci/prow/e2e-vsphere-ovn-multi-network 935d8ed link false /test e2e-vsphere-ovn-multi-network
ci/prow/e2e-azure-default-config 935d8ed link false /test e2e-azure-default-config
ci/prow/e2e-azurestack 935d8ed link false /test e2e-azurestack

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.

@openshift-merge-bot openshift-merge-bot bot merged commit 17f4e35 into openshift:main May 22, 2025
16 of 23 checks passed
@openshift-ci-robot
Copy link
Contributor

@patrickdillon: Jira Issue OCPBUGS-56268: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-56268 has been moved to the MODIFIED state.

In response to this:

For the Azure identity API, the installer makes use directly of the CAPZ API, but we do add validation to not support SystemAssigned identities.

SystemAssigned identities were removed in
11f006d
but I missed updating the godoc text which is pulled in from CAPZ.

This PR updates the godoc text so that the explain command will not show SystemAssigned identities as a valid choice.

Example output:

$ ./openshift-install explain installconfig.controlPlane.platform.azure.identity
KIND:     InstallConfig
VERSION:  v1

RESOURCE: <object>
 Default: "None"
 Identity is the type of identity used for the virtual machine.
The type 'UserAssigned' is a standalone Azure resource provided by the user
and assigned to the VM
Identity can only be set for control-plane nodes.

FIELDS:
   type <string> -required-
     Valid Values: "None","UserAssigned"
     Type specifies the type of identity to be used.

   userAssignedIdentities <[]object> -required-
     UserAssignedIdentities is a list of identities to be attached to a node.
Only one user-assigned identity may be supplied.
Supplying more than one user-assigned identity is an experimental feature
which may be enabled with the MachineAPIMigration feature gate.
     UserAssignedIdentity contains the fields that comprise a user-assigned identity.

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.

@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

Distgit: ose-installer
This PR has been included in build ose-installer-container-v4.20.0-202505220514.p0.g17f4e35.assembly.stream.el9.
All builds following this will include this PR.

@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

Distgit: ose-baremetal-installer
This PR has been included in build ose-baremetal-installer-container-v4.20.0-202505220514.p0.g17f4e35.assembly.stream.el9.
All builds following this will include this PR.

@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

Distgit: ose-installer-artifacts
This PR has been included in build ose-installer-artifacts-container-v4.20.0-202505220514.p0.g17f4e35.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. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. 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.

5 participants