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

🌱 add merge strategy markers #1325

Merged
merged 1 commit into from
Aug 17, 2022
Merged

🌱 add merge strategy markers #1325

merged 1 commit into from
Aug 17, 2022

Conversation

apricote
Copy link
Member

What this PR does / why we need it:

This commit adds merge strategy markers to our v1alpha6 API. This is required for Server-Side Apply (SSA) to work correctly. SSA is used in Cluster API v1.2, and not having these markers might cause issues when using ClusterClass patches.

This only adds a subset of markers, where it was possible. I skipped adding markers for two cases:

  • We have many slices that do not have any proper map keys, as all fields are optional. This includes mostly "filter" structs, for example NetworkParam and SecurityGroupParam.
  • The selected map key may not be optional (omitempty). If it is, it can not be used as the map key. This applied to structs AddressPair and ExternalRouterIPParam.

Further documentation:

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Related to #1282

Special notes for your reviewer:

/hold

This commit adds merge strategy markers to our v1alpha6 API. This is
required for Server-Side Apply (SSA) to work correctly. SSA is used in
Cluster API v1.2, and not having these markers might cause issues when
using ClusterClass patches.

This only adds a subset of markers, where it was possible. I skipped adding
markers for two cases:

- We have many slices that do not have any proper map keys, as all fields
  are optional. This includes mostly "filter" structs, for example
  `NetworkParam` and `SecurityGroupParam`.
- The selected map key may not be optional (`omitempty`). If it is, it can
  not be used as the map key. This applied to structs `AddressPair` and
  `ExternalRouterIPParam`.

Further documentation:

- CAPI v1.2 provider migration: https://cluster-api.sigs.k8s.io/developer/providers/v1.1-to-v1.2.html#required-api-changes-for-providers
- SSA Markers: https://kubernetes.io/docs/reference/using-api/server-side-apply/#merge-strategy
@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Aug 16, 2022
@apricote apricote mentioned this pull request Aug 16, 2022
5 tasks
@netlify
Copy link

netlify bot commented Aug 16, 2022

Deploy Preview for kubernetes-sigs-cluster-api-openstack ready!

Name Link
🔨 Latest commit 8144c39
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-cluster-api-openstack/deploys/62fb933facf69b00094e5743
😎 Deploy Preview https://deploy-preview-1325--kubernetes-sigs-cluster-api-openstack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Aug 16, 2022
@tobiasgiese
Copy link
Member

tobiasgiese commented Aug 16, 2022

/approve
/lgtm

Thanks for implementing the merge strategy markers 👍🏻 one step further towards CAPI v1.2

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 16, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: apricote, tobiasgiese

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 16, 2022
@jichenjc
Copy link
Contributor

/lgtm
/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 17, 2022
@k8s-ci-robot k8s-ci-robot merged commit 4975828 into kubernetes-sigs:main Aug 17, 2022
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants