Test DaemonSetPatch with and without annotation conflicts #2630
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a test (
TestPatchForceWithDaemonSet
) in nodejs which tests out a DaemonSetPatch on akube-proxy
DaemonSet object with conflicting field managers. This PR also includes code to spin up a KinD cluster. The test runs against kind since we are interacting withkube-system
objects and this allows isolation from other tests.Steps the test does:
kube-proxy
manifest from the live cluster.spec.template.spec.containers[0].image
field and re-apply to cluster using kubectl client side apply to change field owners.spec.template.spec.containers[0].image
and.spec.template.spec.containers[0].command
WITHOUT thepulumi.com/patchForce=true
annotation..spec.template.spec.containers[0].image
and.spec.template.spec.containers[0].command
WITH thepulumi.com/patchForce=true
annotation.This test confirms that without setting the patchForce annotation, the
pulumi up
step fails since there is a field conflict error. It is only with the patchForce annotation thatpulumi up
succeeds.The field manager conflict error that occurs from step 2:
Related: #2629