Skip to content

api: Add Conditions to ARM Resource Types#5445

Open
bennerv wants to merge 4 commits into
Azure:mainfrom
bennerv:bvesel/add-conditions-to-resource-types
Open

api: Add Conditions to ARM Resource Types#5445
bennerv wants to merge 4 commits into
Azure:mainfrom
bennerv:bvesel/add-conditions-to-resource-types

Conversation

@bennerv
Copy link
Copy Markdown
Member

@bennerv bennerv commented May 29, 2026

What

Adds a read-only conditions API field to our resource types to expose status information and the addition of a new api version 2026-05-31-preview.

Why

We can leverage this to expose read-only information similar to k8s conditions which tell the customer if the cluster is degraded. Because of the controller implementation of the backend, and the fact that customers can make changes to permissions, infra, etc. which can result in degradation of functionality on the cluster, this allows us to expose that information without requiring an ongoing customer operation to do so to move the resource type into a failed state.

Testing

The e2e test, integration test, and unit test additions should cover this use case.

Special notes for your reviewer

PR Checklist

  • PR is scoped to a single task (no mixed concerns)
  • Title follows Conventional Commits format
  • Summary explains the "Why" behind the change
  • Linked to relevant ticket/issue
  • Screenshots included (if graph/UI/metrics changes)
  • Self-reviewed the diff
  • CI/CD checks are passing (ignore Tide)
  • Draft PR used for WIP (if applicable)
  • Commit history is clean (rebased/squashed)
  • Tricky code blocks are commented
  • Specific reviewers tagged
  • All comment threads resolved before merge

Copilot AI review requested due to automatic review settings May 29, 2026 15:29
@openshift-ci openshift-ci Bot requested review from deads2k and janboll May 29, 2026 15:30
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 29, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bennerv

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

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot stopped reviewing on behalf of bennerv due to an error May 29, 2026 16:29
@bennerv bennerv force-pushed the bvesel/add-conditions-to-resource-types branch 3 times, most recently from 5efa3bf to 3331e29 Compare May 29, 2026 20:03
Copilot AI review requested due to automatic review settings May 29, 2026 20:03
@bennerv bennerv force-pushed the bvesel/add-conditions-to-resource-types branch from 3331e29 to 607bfff Compare May 29, 2026 20:03
raelga and others added 2 commits May 29, 2026 16:13
The PKO cleanup step is meant to be best-effort while ARO-23308 removes Package Operator from existing management clusters. A production run still failed after cleanup made resources disappear: later dynamic list calls returned "the server could not find the requested resource", incremented the error count, and caused a non-zero exit.

Treat missing PKO custom resources as already cleaned up in delete, count, and finalizer-removal paths. Also keep cleanup errors as warnings so the helper exits 0 after best-effort cleanup attempts; setup/client construction errors remain fatal.

Validation:
* go test ./dev-infrastructure/scripts/cleanup-pko-resources/...
* go vet ./dev-infrastructure/scripts/cleanup-pko-resources/...
The ExternalAuth Condition field is read-only (server-managed) and
should not be converted from client input. Remove the conversion from
ConvertToInternal in v20240610preview and v20251223preview, and zero
the field in fuzz tests since it no longer round-trips.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@bennerv bennerv force-pushed the bvesel/add-conditions-to-resource-types branch 2 times, most recently from bf38e89 to 99ed3e1 Compare May 29, 2026 20:16
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot stopped reviewing on behalf of bennerv due to an error May 29, 2026 21:03
@bennerv bennerv force-pushed the bvesel/add-conditions-to-resource-types branch 2 times, most recently from 0f16a15 to fef0d82 Compare May 29, 2026 21:21
Copilot AI review requested due to automatic review settings May 29, 2026 21:21
@bennerv bennerv force-pushed the bvesel/add-conditions-to-resource-types branch from fef0d82 to 724697c Compare May 29, 2026 21:32
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@bennerv bennerv force-pushed the bvesel/add-conditions-to-resource-types branch from 724697c to 6de6fae Compare May 29, 2026 21:55
Copilot stopped reviewing on behalf of bennerv due to an error May 29, 2026 22:21
Copilot AI review requested due to automatic review settings May 30, 2026 15:57
@bennerv bennerv force-pushed the bvesel/add-conditions-to-resource-types branch from 6de6fae to 078b4cd Compare May 30, 2026 15:57
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@bennerv bennerv force-pushed the bvesel/add-conditions-to-resource-types branch from 078b4cd to 1c21981 Compare May 30, 2026 17:35
bennerv and others added 2 commits May 30, 2026 13:52
Adds read-only conditions (following Kubernetes status.conditions
conventions) to HCPOpenShiftCluster, NodePool, and ExternalAuth
resource types under a new API version 2026-06-30-preview.

Conditions use a generic Condition model with ConditionType union
(Available, Degraded, Progressing) shared across all resource types.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@bennerv bennerv force-pushed the bvesel/add-conditions-to-resource-types branch from 1c21981 to e078719 Compare May 30, 2026 17:52
Copilot AI review requested due to automatic review settings May 30, 2026 17:52
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 30, 2026

@bennerv: 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/api-validation e078719 link true /test api-validation

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

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot stopped reviewing on behalf of bennerv due to an error May 30, 2026 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants