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

WIP: docs: update book mocks #1492

Conversation

camilamacedo86
Copy link
Member

@camilamacedo86 camilamacedo86 commented May 4, 2020

Description

  • Update the mock examples for the docs based in the latest version scaffold files
  • Perform a few fixes as well.

Motivation

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 4, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: camilamacedo86

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 requested review from droot and mengqiy May 4, 2020 14:30
@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels May 4, 2020
@camilamacedo86
Copy link
Member Author

/test pull-kubebuilder-e2e-k8s-1-16-2

@camilamacedo86
Copy link
Member Author

@mengqiy could you please help by dong a review on this one?

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels May 4, 2020
@camilamacedo86
Copy link
Member Author

/test pull-kubebuilder-e2e-k8s-1-15-3

WORKDIR /
COPY --from=builder /workspace/manager .
USER nonroot:nonroot

Copy link
Member Author

Choose a reason for hiding this comment

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

These changes were made too long ago and were not reflected here.

@@ -91,7 +96,7 @@ func main() {
Our existing call to SetupWebhookWithManager registers our conversion webhooks with the manager, too.
*/
if err = (&batchv1.CronJob{}).SetupWebhookWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create webhook", "webhook", "Captain")
setupLog.Error(err, "unable to create webhook", "webhook", "CronJob")
Copy link
Member Author

Choose a reason for hiding this comment

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

the kind is CronJob and not Captain. it is a small fix.

LeaderElection: enableLeaderElection,
LeaderElectionID: "a33bd623.tutorial.kubebuilder.io",
Copy link
Member Author

Choose a reason for hiding this comment

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

these lines scaffolded by default was missing here.

kind: CronJob
version: v1
version: 3-alpha
Copy link
Member Author

Choose a reason for hiding this comment

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

Upgrade with V3 format

@@ -29,7 +29,7 @@ import (
)

// +kubebuilder:docs-gen:collapse=Go imports

// log is for logging in this package.
Copy link
Member Author

Choose a reason for hiding this comment

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

missing scaffolded line by default.

_ = batchv2.AddToScheme(scheme)
utilruntime.Must(kbatchv1.AddToScheme(scheme)) // we've added this ourselves
utilruntime.Must(batchv1.AddToScheme(scheme))
utilruntime.Must(batchv2.AddToScheme(scheme))
// +kubebuilder:scaffold:scheme
Copy link
Member Author

Choose a reason for hiding this comment

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

done here: #1462

@@ -62,15 +64,18 @@ func main() {
var enableLeaderElection bool
flag.StringVar(&metricsAddr, "metrics-addr", ":8080", "The address the metric endpoint binds to.")
flag.BoolVar(&enableLeaderElection, "enable-leader-election", false,
"Enable leader election for controller manager. Enabling this will ensure there is only one active controller manager.")
"Enable leader election for controller manager. "+
"Enabling this will ensure there is only one active controller manager.")
Copy link
Member Author

Choose a reason for hiding this comment

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

Updated with the current scaffolded format.

group: apiextensions.k8s.io
path: spec/conversion/webhookClientConfig/service/namespace
create: false

Copy link
Member Author

Choose a reason for hiding this comment

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

Missing default namespace scaffold for it.

@@ -2,34 +2,45 @@
# Image URL to use all building/pushing image targets
Copy link
Member Author

Choose a reason for hiding this comment

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

update makefile with the current version.

@camilamacedo86
Copy link
Member Author

/test pull-kubebuilder-e2e-k8s-1-17-0

@camilamacedo86 camilamacedo86 changed the title docs: update book mocks for v3 docs: update book mocks May 29, 2020
@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 29, 2020
@camilamacedo86
Copy link
Member Author

/hold

We might need to split to make easier the review.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 30, 2020
@camilamacedo86 camilamacedo86 changed the title docs: update book mocks WIP: docs: update book mocks Jun 19, 2020
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 19, 2020
@camilamacedo86
Copy link
Member Author

Close in prol of #1632

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 10, 2020
@k8s-ci-robot
Copy link
Contributor

@camilamacedo86: PR needs rebase.

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.

@camilamacedo86 camilamacedo86 deleted the update-examples-book branch August 10, 2020 15:45
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. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The CustomResourceDefinition "cronjobs.batch.tutorial.kubebuilder.io" is invalid
2 participants