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

Fleet member labels #32539

Open
wants to merge 26 commits into
base: release-aks-fleet-2025-03-01
Choose a base branch
from

Conversation

audrastump
Copy link
Member

@audrastump audrastump commented Feb 10, 2025

ARM (Control Plane) API Specification Update Pull Request

Tip

Overwhelmed by all this guidance? See the Getting help section at the bottom of this PR description.

PR review workflow diagram

Please understand this diagram before proceeding. It explains how to get your PR approved & merged.

spec_pr_review_workflow_diagram

Purpose of this PR

What's the purpose of this PR? Check the specific option that applies. This is mandatory!

  • New resource provider.
  • New API version for an existing resource provider. (If API spec is not defined in TypeSpec, the PR should have been created in adherence to OpenAPI specs PR creation guidance).
  • Update existing version for a new feature. (This is applicable only when you are revising a private preview API version.)
  • Update existing version to fix OpenAPI spec quality issues in S360.
  • Convert existing OpenAPI spec to TypeSpec spec (do not combine this with implementing changes for a new API version).
  • Other, please clarify: Adding new property into release branch for new API version (not the PR for the API version itself)
    • edit this with your clarification

Due diligence checklist

To merge this PR, you must go through the following checklist and confirm you understood
and followed the instructions by checking all the boxes:

  • I confirm this PR is modifying Azure Resource Manager (ARM) related specifications, and not data plane related specifications.
  • I have reviewed following Resource Provider guidelines, including
    ARM resource provider contract and
    REST guidelines (estimated time: 4 hours).
    I understand this is required before I can proceed to the diagram Step 2, "ARM API changes review", for this PR.

Additional information

Viewing API changes

For convenient view of the API changes made by this PR, refer to the URLs provided in the table
in the Generated ApiView comment added to this PR. You can use ApiView to show API versions diff.

Suppressing failures

If one or multiple validation error/warning suppression(s) is detected in your PR, please follow the
suppressions guide to get approval.

Getting help

  • First, please carefully read through this PR description, from top to bottom. Please fill out the Purpose of this PR and Due diligence checklist.
  • If you don't have permissions to remove or add labels to the PR, request write access per aka.ms/azsdk/access#request-access-to-rest-api-or-sdk-repositories
  • To understand what you must do next to merge this PR, see the Next Steps to Merge comment. It will appear within few minutes of submitting this PR and will continue to be up-to-date with current PR state.
  • For guidance on fixing this PR CI check failures, see the hyperlinks provided in given failure
    and https://aka.ms/ci-fix.
  • For help with ARM review (PR workflow diagram Step 2), see https://aka.ms/azsdk/pr-arm-review.
  • If the PR CI checks appear to be stuck in queued state, please add a comment with contents /azp run.
    This should result in a new comment denoting a PR validation pipeline has started and the checks should be updated after few minutes.
  • If the help provided by the previous points is not enough, post to https://aka.ms/azsdk/support/specreview-channel and link to this PR.

frantran added 5 commits February 7, 2025 11:06
Copied the files in a separate commit.
This allows reviewers to easily diff subsequent changes against the previous spec.
Updated the API version from preview/2024-05-02-preview to stable/2025-03-01.
Copy link

PR validation pipeline can not start as the pull request is not merged or mergeable - most likely it has merge conflicts.

Copy link

PR validation pipeline can not start as the pull request is not merged or mergeable - most likely it has merge conflicts.

@audrastump audrastump force-pushed the stumpaudra/fleetMemberLabel branch from cd770c1 to e51a2c7 Compare February 10, 2025 18:25
Copy link

openapi-pipeline-app bot commented Feb 10, 2025

Next Steps to Merge

Next steps that must be taken to merge this PR:
  • ❌ The required check named Swagger LintDiff has failed. Refer to the check in the PR's 'Checks' tab for details on how to fix it and consult the aka.ms/ci-fix guide

Copy link

openapi-pipeline-app bot commented Feb 10, 2025

Generated ApiView

Language Package Name ApiView Link
Go sdk/resourcemanager/containerservicefleet/armcontainerservicefleet There is no API change compared with the previous version
Python azure-mgmt-containerservicefleet https://apiview.dev/Assemblies/Review/e0444ab348814233b7add2d104e5bcaa?revisionId=2fb65a17d4b04ce0822f1e14ee58bb84
JavaScript @azure/arm-containerservicefleet https://apiview.dev/Assemblies/Review/65c668ceaa2346708bf1e479b7f6b79b?revisionId=8a337cd856dc4ddba3b133275a4d10f1
Java azure-resourcemanager-containerservicefleet https://apiview.dev/Assemblies/Review/8422e73bfd5d45efb77d0cf066bec1a0?revisionId=5b71e85679cc48bdaba5c2557dfa3316

@azure-sdk
Copy link
Collaborator

API change check

APIView has identified API level changes in this PR and created following API reviews.

Microsoft.ContainerService

@audrastump audrastump force-pushed the stumpaudra/fleetMemberLabel branch from e51a2c7 to aa84099 Compare February 10, 2025 19:03
Copy link

PR validation pipeline can not start as the pull request is not merged or mergeable - most likely it has merge conflicts.

@jim-minter jim-minter removed the ARMChangesRequested <valid label in PR review process>add this label when require changes after ARM review label Feb 14, 2025
@openapi-pipeline-app openapi-pipeline-app bot added the WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required label Feb 14, 2025
@jim-minter
Copy link
Member

I think this is ready to merge.

ARM reviewer, I believe the LintDiff errors introduced cannot/should not be actioned because the new structure being added is basically like tags (see #32539 (review) for context).

"labels": {
"type": "object",
"description": "The labels for the fleet member.",
"additionalProperties": {
Copy link
Contributor

@ramoka178 ramoka178 Feb 14, 2025

Choose a reason for hiding this comment

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

additionalProperties

Use of additionalProperties is not allowed for properties owned by the service. The only time its ok to use it is when the properties are pass thru (user defined) and not subject to any validations. Please make this an array or provide an explanation for why you need this. #Resolved

Copy link
Member

Choose a reason for hiding this comment

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

@ramoka178 as mentioned above, the intention here is to provide something functionally equivalent to tracked resource tags.

We inquired about adding a tags property on the Member proxy resource and were advised to use another name. We were advised that Labels is acceptable, and that's a good option for us since they will be replicated onto Kubernetes object as Labels in the customer-visible dataplane.

Based on the following facts, I believe that what we are proposing is the best option:

  1. Migrating to a "tracked" child resource would be a very large endeavour requiring breaking changes, and major re-designs/re-writes.
  2. Both existing ARM tags, and Kubernetes model labels as a JSON object with string values. This is relevant as we will be passing through these labels into an underlying Kubernetes model.
  3. We are specifically looking for a K/V map; an array of [K/V pairs] where the keys could be duplicated doesn't work fo rus.
  4. As mentioned above, we are using the name "labels" following ARM guidance.

On this basis please will you approve?

cc @serbrech

Copy link
Contributor

Choose a reason for hiding this comment

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

Use of additionalProperties is an anti pattern that is not approved by ARM. Only cases where this is allowed is that

  1. This is for tags.
  2. These are pass through from your service, and some other team is the one who is actually consuming it.

If not, please schematize it.
Else, please book an office hours slot to discuss more on why this is needed for your case.

Copy link
Member

@serbrech serbrech Feb 20, 2025

Choose a reason for hiding this comment

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

We do in fact, pass this through to the Kubernetes Labels property on the Kubernetes dataplane.
when User creates a Member resource in ARM, we create a Member resource in Kubernetes. that's why it's a proxy resource in nature. The Kubernetes resource has labels, which are used as selectors in the Kubernetes world

This is for tags.

Are you suggesting we should use actual tags, outside of the envelope? I thought this wasn't allowed on proxy resources?

Copy link
Member Author

Choose a reason for hiding this comment

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

@ramoka178 amplifying the comment above

Copy link
Contributor

Choose a reason for hiding this comment

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

Signed off this pr based on this points about label being passed through to Kubernetes

"labels": {
"type": "object",
"description": "The labels for the fleet member.",
"additionalProperties": {
Copy link
Contributor

@ramoka178 ramoka178 Feb 14, 2025

Choose a reason for hiding this comment

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

additionalProperties

Use of additionalProperties is not allowed for properties owned by the service. The only time its ok to use it is when the properties are pass thru (user defined) and not subject to any validations. Please make this an array or provide an explanation for why you need this. #Resolved

Copy link
Member

Choose a reason for hiding this comment

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

duplicate, see response above

@ramoka178 ramoka178 added the ARMChangesRequested <valid label in PR review process>add this label when require changes after ARM review label Feb 14, 2025
@openapi-pipeline-app openapi-pipeline-app bot removed the WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required label Feb 14, 2025
@jim-minter jim-minter removed the ARMChangesRequested <valid label in PR review process>add this label when require changes after ARM review label Feb 14, 2025
@openapi-pipeline-app openapi-pipeline-app bot added the WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required label Feb 14, 2025
@jim-minter jim-minter changed the title Stumpaudra/fleet member label Fleet member labels Feb 14, 2025
@ramoka178 ramoka178 added the ARMChangesRequested <valid label in PR review process>add this label when require changes after ARM review label Feb 14, 2025
@openapi-pipeline-app openapi-pipeline-app bot removed the WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required label Feb 14, 2025
@audrastump audrastump requested a review from ramoka178 February 21, 2025 21:29
@jim-minter jim-minter removed the ARMChangesRequested <valid label in PR review process>add this label when require changes after ARM review label Feb 24, 2025
@openapi-pipeline-app openapi-pipeline-app bot added the WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required label Feb 24, 2025
@razvanbadea-msft razvanbadea-msft added the ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review label Feb 25, 2025
@openapi-pipeline-app openapi-pipeline-app bot removed the WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required label Feb 25, 2025
@audrastump audrastump enabled auto-merge (squash) February 25, 2025 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ARMReview ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review Container Service resource-manager TypeSpec Authored with TypeSpec
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants