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

🐛 remove metadata.creationTimestamp when generating CRDs, RBAC, and webhooks #800

Merged

Conversation

joelanford
Copy link
Member

@joelanford joelanford commented Apr 21, 2023

Closes #402

This issue has been open for awhile, but seemingly not that big of a deal until kustomize v5 was released with a bug that converts null to "null". And that causes manifests to fail to apply.

kubernetes-sigs/kustomize#5031

We can stem the tide in controller-tools by removing creationTimestamp: null just before writing the generated manifests. This was always unsightly/superfluous anyways.

…hooks

Signed-off-by: Joe Lanford <joe.lanford@gmail.com>
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Apr 21, 2023
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Apr 21, 2023
Copy link
Member

@camilamacedo86 camilamacedo86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: camilamacedo86, joelanford

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 lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 21, 2023
@k8s-ci-robot k8s-ci-robot merged commit f0ba62a into kubernetes-sigs:master Apr 21, 2023
@joelanford joelanford deleted the rm-creation-timestamp branch April 21, 2023 12:06
@joelanford
Copy link
Member Author

/cherry-pick release-0.11

@k8s-infra-cherrypick-robot

@joelanford: #800 failed to apply on top of branch "release-0.11":

Applying: remove metadata.creationTimestamp when generating CRDs, RBAC, and webhooks
Using index info to reconstruct a base tree...
M	pkg/crd/gen.go
M	pkg/genall/genall.go
M	pkg/rbac/parser.go
M	pkg/webhook/parser.go
A	pkg/webhook/testdata/valid-ordered/manifests.yaml
Falling back to patching base and 3-way merge...
CONFLICT (modify/delete): pkg/webhook/testdata/valid-ordered/manifests.yaml deleted in HEAD and modified in remove metadata.creationTimestamp when generating CRDs, RBAC, and webhooks. Version remove metadata.creationTimestamp when generating CRDs, RBAC, and webhooks of pkg/webhook/testdata/valid-ordered/manifests.yaml left in tree.
Auto-merging pkg/webhook/parser.go
CONFLICT (content): Merge conflict in pkg/webhook/parser.go
Auto-merging pkg/rbac/parser.go
CONFLICT (content): Merge conflict in pkg/rbac/parser.go
Auto-merging pkg/genall/genall.go
Auto-merging pkg/crd/gen.go
CONFLICT (content): Merge conflict in pkg/crd/gen.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 remove metadata.creationTimestamp when generating CRDs, RBAC, and webhooks
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-0.11

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.

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.

Remove creationTimestamp from generated CRD
4 participants