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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃摉 Fixed manager_webhook_patch not uncommented #3427

Merged
merged 1 commit into from
May 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ patchesStrategicMerge:

# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in
# crd/kustomization.yaml
#- manager_webhook_patch.yaml
- manager_webhook_patch.yaml
lauchokyip marked this conversation as resolved.
Show resolved Hide resolved

Choose a reason for hiding this comment

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

Since you've already made the changes in the file hack/docs/internal/cronjob-tutorial/generate_cronjob.go, do we really need the change here in this file? Asking because this will by overwritten by make generate (and hence make generate-docs) as mentioned by @camilamacedo86 .

Copy link
Contributor Author

@lauchokyip lauchokyip May 23, 2023

Choose a reason for hiding this comment

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

The CI will run make generate that's why this file is included as part of the changes.

Choose a reason for hiding this comment

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

As I understand, make generate will overwrite the file docs/book/src/cronjob-tutorial/testdata/project/config/default/kustomization.yaml, right?

If so, then do we explicitly need to make this change here? Else, this can be skipped. Thanks!

Copy link
Contributor Author

@lauchokyip lauchokyip May 23, 2023

Choose a reason for hiding this comment

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

make generate will generate the file, that's why changes need to be done in hack/docs/internal/cronjob-tutorial/generate_cronjob.go.

Once changes are made over there, I just run make generate and docs/book/src/cronjob-tutorial/testdata/project/config/default/kustomization.yaml was automatically been changed.

The CI will run make generate and compare with the PR, and therefore it will fail if I didn't run make generate before submitting the PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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


# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER'.
# Uncomment 'CERTMANAGER' sections in crd/kustomization.yaml to enable the CA injection in the admission webhooks.
Expand Down
5 changes: 5 additions & 0 deletions hack/docs/internal/cronjob-tutorial/generate_cronjob.go
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,11 @@ func updateKustomization(sp *Sample) {
`#- ../certmanager`, `#`)
CheckError("fixing default/kustomization", err)

err = pluginutil.UncommentCode(
filepath.Join(sp.ctx.Dir, "config/default/kustomization.yaml"),
`#- manager_webhook_patch.yaml`, `#`)
CheckError("fixing default/kustomization", err)

err = pluginutil.UncommentCode(
filepath.Join(sp.ctx.Dir, "config/default/kustomization.yaml"),
`#- webhookcainjection`, `#`)
Expand Down
Loading