-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: prevent CRDs from always applying during preview (#3096)
### Proposed changes This PR ensures the correct `metav1.UpdateOptions` are set for CRD resources. The FieldManager and DryRun options need to be propagated to ensure we are updating CRD resources correctly. This PR adds a regression test that fails without the added changes in this PR. ### Related issues (optional) Fixes: #3094
- Loading branch information
Showing
5 changed files
with
121 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: crd-previews | ||
runtime: yaml | ||
resources: | ||
provider: | ||
type: pulumi:providers:kubernetes | ||
crd: | ||
type: kubernetes:apiextensions.k8s.io/v1:CustomResourceDefinition | ||
properties: | ||
metadata: | ||
name: crontabs.previewtest.pulumi.com | ||
spec: | ||
conversion: | ||
strategy: None | ||
group: previewtest.pulumi.com | ||
names: | ||
kind: CronTab | ||
listKind: CronTabList | ||
plural: crontabs | ||
singular: crontab | ||
scope: Namespaced | ||
versions: | ||
- name: v1 | ||
schema: | ||
openAPIV3Schema: | ||
properties: | ||
spec: | ||
properties: | ||
cronSpec: | ||
type: string | ||
image: | ||
type: string | ||
type: object | ||
type: object | ||
served: true | ||
storage: true | ||
options: | ||
provider: ${provider} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: crd-previews | ||
runtime: yaml | ||
resources: | ||
provider: | ||
type: pulumi:providers:kubernetes | ||
crd: | ||
type: kubernetes:apiextensions.k8s.io/v1:CustomResourceDefinition | ||
properties: | ||
metadata: | ||
name: crontabs.previewtest.pulumi.com | ||
spec: | ||
conversion: | ||
strategy: None | ||
group: previewtest.pulumi.com | ||
names: | ||
kind: CronTab | ||
listKind: CronTabList | ||
plural: crontabs | ||
singular: crontab | ||
scope: Namespaced | ||
versions: | ||
- name: v1 | ||
schema: | ||
openAPIV3Schema: | ||
properties: | ||
spec: | ||
properties: | ||
cronSpec: | ||
type: string | ||
image: | ||
type: string | ||
testNewField: | ||
type: string | ||
type: object | ||
type: object | ||
served: true | ||
storage: true | ||
options: | ||
provider: ${provider} |