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

Fix diff for CRD with status set on input #2512

Merged
merged 4 commits into from
Jul 21, 2023
Merged

Conversation

lblackstone
Copy link
Member

Proposed changes

The CRD status field is an output field, but the apiserver will ignore it if set. This is common with CRDs generated from helm charts. Preemptively remove the status field to avoid a continuous diff in this case.

Related issues (optional)

@lblackstone lblackstone requested review from rquitales and a team July 21, 2023 00:49
@lblackstone
Copy link
Member Author

This PR is stacked on #2511

Only 0f9d406 is relevant.

@github-actions
Copy link

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

If the `stringData` field is set on a Secret resource, then Kubernetes will automatically replace it with an equivalent `data` field. This is causing a continuous diff with the updated logic from 6e329f3. This change updates the input diff logic to include this rewrite.
The CRD status field is an output field, but the apiserver will ignore it if set. This is common with CRDs generated from helm charts. Preemptively remove the status field to avoid a continuous diff in this case.
@rquitales rquitales merged commit 26ddf79 into master Jul 21, 2023
18 checks passed
@rquitales rquitales deleted the lblackstone/crd-status branch July 21, 2023 05:44
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.

None yet

2 participants