Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
9347eae
:book: suplememting info about release process
camilamacedo86 Feb 18, 2021
5cc7d55
Add tests to the DNS validation package
Adirio Feb 18, 2021
7a7a66f
Remove old TODOs that are no longer valid
Adirio Feb 22, 2021
615f8c2
Merge pull request #2033 from Adirio/cleanup-todos
k8s-ci-robot Feb 22, 2021
33036c5
Merge pull request #2034 from Adirio/tests/dns-validation
k8s-ci-robot Feb 22, 2021
c45c5da
fix unit tests to work with later versions of ginkgo/gomega
joelanford Feb 25, 2021
ed6539a
Merge pull request #2039 from joelanford/fix/test-unit
k8s-ci-robot Feb 25, 2021
d121077
:seedling: fix CI to use the correct g version
camilamacedo86 Feb 25, 2021
d07dfcc
Merge pull request #2040 from camilamacedo86/fix-ci-go-version
k8s-ci-robot Feb 25, 2021
4bf571c
Explicitly define WithCompletion as an Option
Adirio Feb 26, 2021
cfbf62d
Merge pull request #2045 from Adirio/completion-option
k8s-ci-robot Feb 26, 2021
1586c2d
Generalize CRD and webhook version related methods in Config
Adirio Feb 26, 2021
0610cc8
Merge pull request #2047 from Adirio/config-interface
k8s-ci-robot Feb 26, 2021
64ad95f
:seedling: Update golangci-lint to latest version
Feb 25, 2021
a90cbd5
Merge pull request #2041 from goutamtadi1/update-golangci-lint
k8s-ci-robot Feb 27, 2021
75ac496
Add https to the webpage
mkumatag Mar 1, 2021
80177d3
Merge pull request #2050 from mkumatag/fix_link
k8s-ci-robot Mar 1, 2021
2ef938f
Add go mod tidy to be executed after the scaffolding api
dastergon Feb 24, 2021
2b46403
Merge pull request #2037 from dastergon/fix-api-generation
k8s-ci-robot Mar 1, 2021
1a74c97
docs: update CRD path for multi-group api
ahalimx86 Mar 2, 2021
bc7ce7d
netlify.toml: update redirects for v3.0.0
estroz Mar 4, 2021
d905233
(go/v3) bump controller-runtime to v0.7.2
estroz Mar 5, 2021
f81fb0d
feat: improve service monitor configuration
johanneswuerbach Mar 5, 2021
bdfa597
Use client.New instead of manager client in tests
leovct Mar 6, 2021
984816b
Merge pull request #2062 from estroz/docs/update-redirects
k8s-ci-robot Mar 8, 2021
6de8014
Merge pull request #2054 from ahalim-intel/update_migrations
k8s-ci-robot Mar 8, 2021
2018a4f
Merge pull request #2064 from estroz/deps/bump-c-r-0.7.2
k8s-ci-robot Mar 8, 2021
01293b2
Fix the config registry public API
Adirio Mar 9, 2021
9a121a1
test/e2e: export KIND_CLUSTER so local tests get correct cluster name
estroz Mar 9, 2021
b6e2ead
Merge pull request #2071 from estroz/chore/correct-test-cluster-name
k8s-ci-robot Mar 9, 2021
c748ebd
This commit adds a ServiceAccount (config/rbac/service_account.yaml)
estroz Mar 8, 2021
dd3942c
Merge pull request #2070 from estroz/feature/service-account
k8s-ci-robot Mar 9, 2021
4e6c400
Remove CLI interface and expose cli instead
Adirio Mar 10, 2021
2687774
Move the internal machinery utils to appropiate exported packages
Adirio Mar 9, 2021
8e0f0ab
Merge pull request #2074 from Adirio/export-machinery-utils
k8s-ci-robot Mar 10, 2021
f0ab179
Merge pull request #2072 from Adirio/fix-config-registry-api
k8s-ci-robot Mar 10, 2021
de84b80
Merge pull request #2079 from Adirio/cli-external-api
k8s-ci-robot Mar 10, 2021
0675cd5
Merge pull request #2030 from camilamacedo86/imp-release-docs
k8s-ci-robot Mar 10, 2021
fe73ff7
Add `kubebuilder alpha config-gen` subcommand
pwittrock Mar 7, 2021
9742a11
Merge pull request #1831 from pwittrock/main
k8s-ci-robot Mar 13, 2021
a2cc78c
Inject filesystem from cli instead of creating several per command
Adirio Mar 12, 2021
73cda2b
Merge pull request #2080 from Adirio/inject-filesystem
k8s-ci-robot Mar 13, 2021
61dcae6
Export scaffolding machinery
Adirio Mar 14, 2021
f7ad796
Store abstraction for persisting Config
Adirio Mar 14, 2021
23c49c2
Add fish completion
Adirio Mar 15, 2021
cd8812d
Merge pull request #2083 from Adirio/export-config-machinery
k8s-ci-robot Mar 15, 2021
bca394b
Provide third-party devs the option to provide their own alpha subcom…
Adirio Mar 15, 2021
e9caa6e
Merge pull request #2088 from Adirio/fish-code-completion
k8s-ci-robot Mar 15, 2021
fdb87df
Merge pull request #2089 from Adirio/extra-alpha-commands
k8s-ci-robot Mar 15, 2021
83230ae
Improve plugin phase 1.5 EP
Adirio Mar 9, 2021
6ca3450
Merge pull request #2082 from Adirio/export-scaffold-machinery
k8s-ci-robot Mar 15, 2021
fb4beed
Add coverage badge from Coveralls
Adirio Mar 15, 2021
388b36e
Remove kubebuilder hardcoded reference in alpha subcommand description
Adirio Mar 15, 2021
05be3c2
Fix alpha extra commands parent command
Adirio Mar 15, 2021
94b63e2
Merge pull request #2090 from Adirio/add-coverage-badge
k8s-ci-robot Mar 15, 2021
4b4d28a
Merge pull request #2091 from Adirio/alpha-description
k8s-ci-robot Mar 15, 2021
bebd89c
Merge pull request #2092 from Adirio/fix-alpha-subcommands
k8s-ci-robot Mar 15, 2021
9eb0747
Cleanup help messages
Adirio Mar 16, 2021
104672d
Merge pull request #2093 from Adirio/cleanup-help
k8s-ci-robot Mar 16, 2021
82c1b65
Fix coverage report on master
Adirio Mar 16, 2021
e806ba0
Merge pull request #2094 from Adirio/fix-ci
k8s-ci-robot Mar 16, 2021
e5b6435
Merge pull request #2066 from leovct/use-client-new-in-tests
k8s-ci-robot Mar 16, 2021
911f342
Merge pull request #2075 from Adirio/ep-plugin-phase-1.5
k8s-ci-robot Mar 16, 2021
668b999
Enable the storage of multiple plugins as layout
Adirio Mar 17, 2021
406d79d
Merge pull request #2096 from Adirio/config-chain
estroz Mar 17, 2021
faff148
Merge pull request #2065 from johanneswuerbach/improve-service-monitor
k8s-ci-robot Mar 17, 2021
f7b0ae3
pkg/cli/alpha/config-gen: command docs no longer depend on local envi…
estroz Mar 17, 2021
f2e1edb
Plugin phase 1.5 implementation
Adirio Mar 15, 2021
646f742
Merge pull request #2097 from estroz/docs/config-gen-static-cmd-docs
estroz Mar 18, 2021
2983c97
Merge pull request #2060 from Adirio/plugin-phase-1.5
k8s-ci-robot Mar 18, 2021
62e4812
Fix linting issues
Adirio Mar 22, 2021
b789900
Merge pull request #2102 from Adirio/fix-lint
k8s-ci-robot Mar 23, 2021
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
Prev Previous commit
Next Next commit
Cleanup help messages
Signed-off-by: Adrian Orive <[email protected]>
  • Loading branch information
Adirio committed Mar 16, 2021
commit 9eb0747c1f8c7d2b4f0bf5b887d7398ae7036bd6
2 changes: 1 addition & 1 deletion pkg/cli/alpha.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Alpha subcommands are for unstable features.

- Alpha subcommands are exploratory and may be removed without warning.
- No backwards compatibility is provided for any alpha subcommands.
`),
`),
}
for i := range alphaCommands {
alpha.AddCommand(alphaCommands[i])
Expand Down
72 changes: 36 additions & 36 deletions pkg/cli/alpha/config-gen/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ config-gen programatically generates configuration for a controller-runtime base
project using the project source code (golang) and a KubebuilderConfigGen resource file.

This is an alternative to expressing configuration as a static set of kustomize patches
in the "config" directory.
in the "config" directory.

config-gen may be used as a standalone command run against a file, as a kustomize
transformer plugin, or as a configuration function (e.g. kpt).
Expand Down Expand Up @@ -148,55 +148,55 @@ The KubebuilderConfigGen resource has the following fields:
crds:
# path to go module source directory provided to controller-gen libraries
# optional -- defaults to '.'
sourceDirectory: ./relative/path
sourceDirectory: ./relative/path

# configure how the controller-manager is generated
# configure how the controller-manager is generated
controllerManager:
# image to run
image: my-org/my-project:v0.1.0
# image to run
image: my-org/my-project:v0.1.0

# if set, use component config for the controller-manager
# optional
componentConfig:
# use component config
# if set, use component config for the controller-manager
# optional
componentConfig:
# use component config
enable: true

# path to component config to put into a ConfigMap
configFilepath: ./path/to/componentconfig.yaml
# path to component config to put into a ConfigMap
configFilepath: ./path/to/componentconfig.yaml

# configure how metrics are exposed
metrics:
# disable the auth proxy required for scraping metrics
# configure how metrics are exposed
metrics:
# disable the auth proxy required for scraping metrics
# disable: false

# generate prometheus ServiceMonitor resource
enableServiceMonitor: true
# generate prometheus ServiceMonitor resource
enableServiceMonitor: true

# configure how webhooks are generated
# optional -- defaults to not generating webhook configuration
# optional -- defaults to not generating webhook configuration
webhooks:
# enable will cause webhook config to be generated
enable: true
# enable will cause webhook config to be generated
enable: true

# configures crds which use conversion webhooks
# configures crds which use conversion webhooks
enableConversion:
# key is the name of the CRD
# key is the name of the CRD
"bars.example.my.domain": true

# configures where to get the certificate used for webhooks
# discriminated union
certificateSource:
# type of certificate source
# one of ["certManager", "dev", "manual"] -- defaults to "manual"
# certManager: certmanager is used to manage certificates -- requires CertManager to be installed
# dev: certificate is generated and wired into resources
# manual: no certificate is generated or wired into resources
# discriminated union
certificateSource:
# type of certificate source
# one of ["certManager", "dev", "manual"] -- defaults to "manual"
# certManager: certmanager is used to manage certificates -- requires CertManager to be installed
# dev: certificate is generated and wired into resources
# manual: no certificate is generated or wired into resources
type: "dev"

# options for a dev certificate -- requires "dev" as the type
devCertificate:
duration: 1h
`)
# options for a dev certificate -- requires "dev" as the type
devCertificate:
duration: 1h
`)
c.Example = strings.TrimSpace(`
#
# As command
Expand All @@ -209,7 +209,7 @@ apiVersion: kubebuilder.sigs.k8s.io/v1alpha1
name: project
spec:
controllerManager
image: org/project:v0.1.0
image: org/project:v0.1.0
EOF

# run the config generator
Expand Down Expand Up @@ -250,7 +250,7 @@ EOF

# generate configuration from kustomize
kustomize build --enable-alpha-plugins .
`)
`)

dir, dirErr := getPluginDir()
pluginFile := filepath.Join(dir, "KubebuilderConfigGen")
Expand All @@ -261,10 +261,10 @@ kustomize build --enable-alpha-plugins .
Short: "Install config-gen as a kustomize plugin",
Long: strings.TrimSpace(fmt.Sprintf(`
Write a script to %s for kustomize to locate as a plugin.
`, pluginFile)),
`, pluginFile)),
Example: strings.TrimSpace(`
kubebuilder alpha config-gen install-as-plugin
`),
`),
RunE: func(cmd *cobra.Command, args []string) error {
if dirErr != nil {
return dirErr
Expand Down
3 changes: 2 additions & 1 deletion pkg/cli/completion.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ func (c CLI) newFishCmd() *cobra.Command {
$ %[1]s completion fish | source

# To load completions for each session, execute once:
$ %[1]s completion fish > ~/.config/fish/completions/%[1]s.fish`, c.commandName),
$ %[1]s completion fish > ~/.config/fish/completions/%[1]s.fish
`, c.commandName),
RunE: func(cmd *cobra.Command, cmdArgs []string) error {
return cmd.Root().GenFishCompletion(os.Stdout, true)
},
Expand Down
3 changes: 1 addition & 2 deletions pkg/plugins/golang/v2/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ After the scaffold is written, api will run make on the project.

# Regenerate code and run against the Kubernetes cluster configured by ~/.kube/config
make run
`,
ctx.CommandName)
`, ctx.CommandName)
}

func (p *createAPISubcommand) BindFlags(fs *pflag.FlagSet) {
Expand Down
6 changes: 3 additions & 3 deletions pkg/plugins/golang/v2/edit.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ func (p *editSubcommand) UpdateContext(ctx *plugin.Context) {
ctx.Description = `This command will edit the project configuration. You can have single or multi group project.`

ctx.Examples = fmt.Sprintf(`# Enable the multigroup layout
%s edit --multigroup
%[1]s edit --multigroup

# Disable the multigroup layout
%s edit --multigroup=false
`, ctx.CommandName, ctx.CommandName)
%[1]s edit --multigroup=false
`, ctx.CommandName)
}

func (p *editSubcommand) BindFlags(fs *pflag.FlagSet) {
Expand Down
3 changes: 1 addition & 2 deletions pkg/plugins/golang/v2/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ Writes the following files:
`
ctx.Examples = fmt.Sprintf(` # Scaffold a project using the apache2 license with "The Kubernetes authors" as owners
%s init --project-version=2 --domain example.org --license apache2 --owner "The Kubernetes authors"
`,
ctx.CommandName)
`, ctx.CommandName)

p.commandName = ctx.CommandName
}
Expand Down
7 changes: 3 additions & 4 deletions pkg/plugins/golang/v2/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,11 @@ validating and (or) conversion webhooks.
`
ctx.Examples = fmt.Sprintf(` # Create defaulting and validating webhooks for CRD of group ship, version v1beta1
# and kind Frigate.
%s create webhook --group ship --version v1beta1 --kind Frigate --defaulting --programmatic-validation
%[1]s create webhook --group ship --version v1beta1 --kind Frigate --defaulting --programmatic-validation

# Create conversion webhook for CRD of group shio, version v1beta1 and kind Frigate.
%s create webhook --group ship --version v1beta1 --kind Frigate --conversion
`,
ctx.CommandName, ctx.CommandName)
%[1]s create webhook --group ship --version v1beta1 --kind Frigate --conversion
`, ctx.CommandName)

p.commandName = ctx.CommandName
}
Expand Down
3 changes: 1 addition & 2 deletions pkg/plugins/golang/v3/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@ After the scaffold is written, api will run make on the project.

# Regenerate code and run against the Kubernetes cluster configured by ~/.kube/config
make run
`,
ctx.CommandName)
`, ctx.CommandName)
}

func (p *createAPISubcommand) BindFlags(fs *pflag.FlagSet) {
Expand Down
6 changes: 3 additions & 3 deletions pkg/plugins/golang/v3/edit.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ func (p *editSubcommand) UpdateContext(ctx *plugin.Context) {
ctx.Description = `This command will edit the project configuration. You can have single or multi group project.`

ctx.Examples = fmt.Sprintf(`# Enable the multigroup layout
%s edit --multigroup
%[1]s edit --multigroup

# Disable the multigroup layout
%s edit --multigroup=false
`, ctx.CommandName, ctx.CommandName)
%[1]s edit --multigroup=false
`, ctx.CommandName)
}

func (p *editSubcommand) BindFlags(fs *pflag.FlagSet) {
Expand Down
3 changes: 1 addition & 2 deletions pkg/plugins/golang/v3/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ Writes the following files:
`
ctx.Examples = fmt.Sprintf(` # Scaffold a project using the apache2 license with "The Kubernetes authors" as owners
%s init --project-version=2 --domain example.org --license apache2 --owner "The Kubernetes authors"
`,
ctx.CommandName)
`, ctx.CommandName)

p.commandName = ctx.CommandName
}
Expand Down
7 changes: 3 additions & 4 deletions pkg/plugins/golang/v3/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,11 @@ validating and (or) conversion webhooks.
`
ctx.Examples = fmt.Sprintf(` # Create defaulting and validating webhooks for CRD of group ship, version v1beta1
# and kind Frigate.
%s create webhook --group ship --version v1beta1 --kind Frigate --defaulting --programmatic-validation
%[1]s create webhook --group ship --version v1beta1 --kind Frigate --defaulting --programmatic-validation

# Create conversion webhook for CRD of group ship, version v1beta1 and kind Frigate.
%s create webhook --group ship --version v1beta1 --kind Frigate --conversion
`,
ctx.CommandName, ctx.CommandName)
%[1]s create webhook --group ship --version v1beta1 --kind Frigate --conversion
`, ctx.CommandName)

p.commandName = ctx.CommandName
}
Expand Down