-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
drop support for legacy patches #4911
drop support for legacy patches #4911
Conversation
@natasha41575: This PR has multiple commits, and the default merge method is: merge. 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/test-infra repository. |
766d23c
to
14c6d36
Compare
14c6d36
to
935d785
Compare
@@ -40,7 +40,7 @@ func TestLoad(t *testing.T) { | |||
}, | |||
}, | |||
"nonsenseLatin": { | |||
errContains: "error converting YAML to JSON", | |||
errContains: "found a tab character that violates indentation", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: this points out the test isn't testing what it claimed, i.e. it is testing tab indent vs space indent instead of random text vs yaml. The real error in a nonsense case is fine too (yaml: line 6: could not find expected ':'
) and also an improvement on the misleading error we gave before!
@@ -503,7 +503,7 @@ spec: | |||
`) | |||
|
|||
// component declared in overlay with custom schema and patch | |||
th.WriteC("components/dc-openapi", `patches: | |||
th.WriteC("components/dc-openapi", `patchesStrategicMerge: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😅
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: KnVerey, natasha41575 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 |
/lgtm |
* drop support for legacy patches * fix CI
* drop support for legacy patches * fix CI
Use resources rather than base. Insert path: before filenames referenced in patches. Reference: kubernetes-sigs/kustomize#4911 Supercedes: #329 Signed-off-by: Kurt Garloff <kurt@garloff.de>
Use resources rather than base. Insert path: before filenames referenced in patches. Reference: kubernetes-sigs/kustomize#4911 Supercedes: #329 Signed-off-by: Kurt Garloff <kurt@garloff.de>
Use resources rather than base. Insert path: before filenames referenced in patches. Reference: kubernetes-sigs/kustomize#4911 Supercedes: #329 Signed-off-by: Kurt Garloff <kurt@garloff.de>
Use resources rather than base. Insert path: before filenames referenced in patches. Reference: kubernetes-sigs/kustomize#4911 Supercedes: #329 Signed-off-by: Kurt Garloff <kurt@garloff.de>
Use resources rather than base. Insert path: before filenames referenced in patches. Reference: kubernetes-sigs/kustomize#4911 Supercedes: #329 Signed-off-by: Kurt Garloff <kurt@garloff.de>
Use resources rather than base. Insert path: before filenames referenced in patches. Reference: kubernetes-sigs/kustomize#4911 Supercedes: #329 Signed-off-by: Kurt Garloff <kurt@garloff.de>
v1.27.1 No CLI change. v1.27.0 API Change * Adds feature gate NodeLogQuery which provides cluster administrators with a streaming view of logs using kubectl without them having to implement a client side reader or logging into the node. Feature * Added "general", "baseline", and "restricted" debugging profiles for kubectl debug. * Added "netadmin" debugging profiles for kubectl debug. * Added --output plaintext-openapiv2 argument to kubectl explain to use old openapiv2 explain implementation. * Added e2e tests for kubectl --subresource for beta graduation * Changed kubectl --subresource flag to beta (#116595, @MadhavJivrajani) * Enable external plugins can be used as subcommands for kubectl create command if subcommand does not exist as builtin only when KUBECTL_ENABLE_CMD_SHADOW environment variable is exported. * Kubectl will now display SeccompProfile for pods, containers and ephemeral containers, if values were set. * Kubectl: added e2e test for default container annotation * Made kubectl-convert binary linking static (also affects the deb and rpm packages). * Promoted whoami kubectl command. * Since Kubernetes v1.5, kubectl apply has had an alpha-stage --prune flag to support deleting previously applied objects that have been removed from the input manifest. This feature has remained in alpha ever since due to performance and correctness issues inherent in its design. This PR exposes a second, independent pruning alpha powered by a new standard named ApplySets. An ApplySet is a server-side object (by default, a Secret; ConfigMaps are also allowed) that kubectl can use to accurately and efficiently track set membership across apply operations. The format used for ApplySet is set out in KEP 3659 as a low-level specification. Other tools in the ecosystem can also build on this specification for improved interoperability. To try the ApplySet-based pruning alpha, set KUBECTL_APPLYSET=true and use the flags --prune --applyset=secret-name with kubectl apply. * Switched kubectl explain to use OpenAPIV3 information published by the server. OpenAPIV2 backend can still be used with the --output plaintext-openapiv2 argument * Upgrades functionality of kubectl kustomize as described at https://github.com/kubernetes-sigs/kustomize/releases/tag/kustomize%2Fv5.0.0 and https://github.com/kubernetes-sigs/kustomize/releases/tag/kustomize%2Fv5.0.1. This is a new major release of kustomize, so there are a few backwards-incompatible changes, most of which are rare use cases, bug fixes with side effects, or things that have been deprecated for multiple releases already: - kubernetes-sigs/kustomize#4911: Drop support for a very old, legacy style of patches. patches used to be allowed to be used as an alias for patchesStrategicMerge in kustomize v3. You now have to use patchesStrategicMerge explicitly, or update to the new syntax supported by patches. See examples in the PR description of kubernetes-sigs/kustomize#4911. - kubernetes-sigs/kustomize#4731: Remove a potential build-time side-effect in ConfigMapGenerator and SecretGenerator, which loaded values from the local environment under some circumstances, breaking kustomize build's side-effect-free promise. While this behavior was never intended, we deprecated it and are announcing it as a breaking change since it existed for a long time. See also the Eschewed Features documentation. - kubernetes-sigs/kustomize#4985: If you previously included .git in an AWS or Azure URL, we will no longer automatically remove that suffix. You may need to add an extra / to replace the .git for the URL to properly resolve. - kubernetes-sigs/kustomize#4954: Drop support for using gh: as a host (e.g. gh:kubernetes-sigs/kustomize). We were unable to find any usage of or basis for this and believe it may have been targeting a custom gitconfig shorthand syntax. * [alpha: kubectl apply --prune --applyset] Enabled certain custom resources (CRs) to be used as ApplySet parent objects. To enable this for a given CR, apply the label applyset.kubernetes.io/is-parent-type: true to the CustomResourceDefinition (CRD) that defines it. * kubectl now uses HorizontalPodAutoscaler v2 by default. Documentation * kubectl create rolebinding -h Bug or Regression * Added (dry run) and (server dry run) suffixes to kubectl scale command when dry-run is passed * Changed the error message of kubectl rollout restart when subsequent kubectl rollout restart commands are executed within a second * Changed the error message to cannot exec into multiple objects at a time when file passed to kubectl exec contains multiple resources * Kubectl: enabled usage of label selector for filtering out resources when pruning for kubectl diff * kubectl port-forward now exits with exit code 1 when remote connection is lost
This change replaces the obsolete use of the Kustomize `patches` field in the Skaffold examples with `patchesStrategicMerge`. Context: Kustomize v5 removed support for `patches` being an array of strings. The `patchesStrategicMerge` field introduced in Kustomize v3 retains the previous behavior of the `patches`. The `patches` field can still be used in v5 with an array of `patch` objects. Additional information: - kubernetes-sigs/kustomize#4911 - https://github.com/kubernetes-sigs/kustomize/releases/tag/kustomize%2Fv5.0.0
This change replaces the obsolete use of the Kustomize `patches` field in the Skaffold examples with `patchesStrategicMerge`. Context: Kustomize v5 removed support for `patches` being an array of strings. The `patchesStrategicMerge` field introduced in Kustomize v3 retains the previous behavior of the `patches`. The `patches` field can still be used in v5 with an array of `patch` objects. Additional information: - kubernetes-sigs/kustomize#4911 - https://github.com/kubernetes-sigs/kustomize/releases/tag/kustomize%2Fv5.0.0
/cc @KnVerey
close #4910
This PR drops support for a very old style of patches. "Legacy patches" refers to being able to supply in the
patches
field whatpatchesStrategicMerge
does now. We are not dropping support for any of the documented fields.For example, you used to be able to do:
This is very very old syntax. We are dropping support for this legacy style which we haven't documented in a very long time.
Now, you have to use patches as documented, which means either:
or