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

feat: Add delete override option in the API #972

Merged
merged 2 commits into from
Nov 27, 2024

Conversation

ryanzhang-oss
Copy link
Contributor

@ryanzhang-oss ryanzhang-oss commented Nov 24, 2024

Description of your changes

Fixes #

I have:

  • Run make reviewable to ensure this PR is ready for review.

How has this code been tested

Special notes for your reviewer

@ryanzhang-oss ryanzhang-oss changed the title api: Add delete override option feat: Add delete override option in the API Nov 24, 2024
// +kubebuilder:validation:Enum=JSONPatch;Delete
// +kubebuilder:default:JSONPatch
// +optional
OverrideType OverrideType `json:"overrideType,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Better to move this to be after ClusterSelector.

Why?

  • Specify the target and then specify the desired action upon the target.
  • OverrideType and JSONPatchOverrrides are used to describe the action. They should be together.

apis/placement/v1alpha1/override_types.go Show resolved Hide resolved
// +kubebuilder:validation:Enum=JSONPatch;Delete
// +kubebuilder:default:JSONPatch
// +optional
OverrideType OverrideType `json:"overrideType,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
OverrideType OverrideType `json:"overrideType,omitempty"`
Type OverrideType `json:"type,omitempty"`

}

// OverrideType defines the type of Override
Copy link
Contributor

Choose a reason for hiding this comment

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

missing period

@ryanzhang-oss ryanzhang-oss merged commit 85a7531 into Azure:main Nov 27, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants