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

📖 Add Good Practices documentation #3267

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
150 commits
Select commit Hold shift + click to select a range
bda676f
update simple-external-plugin-tutorial
camilamacedo86 Oct 5, 2022
fc8d677
update mdbook
camilamacedo86 Oct 5, 2022
1ee68a5
:book: clarifies plugins available and its usage
camilamacedo86 Oct 2, 2022
18247e9
:book: update doc samples
camilamacedo86 Oct 2, 2022
532490c
:sparkles: (go/v4-alpha) : update kustomize version from 4.5.5 to 4.5.7
camilamacedo86 Oct 5, 2022
9076e09
:sparkles: (grafana/v1-alpha) : add custom units for custom grafana d…
jkremser Oct 6, 2022
edf2ccc
cleanup: cert-manager and prometheus installs into e2e tests
camilamacedo86 Oct 6, 2022
476cf1a
Apply suggestions from code review
camilamacedo86 Oct 7, 2022
f120295
fixed bug for component-config flag
laxmikantbpandhare Oct 9, 2022
08a2044
Make jmrodri and varsha admins
jmrodri Oct 10, 2022
c90cf25
:warning: remove config-gen alpha option
camilamacedo86 Oct 5, 2022
d4e9d81
:book: Updating doc with Installation steps of cert-manager and prome…
yashsingh74 Oct 11, 2022
8999ca2
🐛 : leader-elect arg scaffolded should be scaffolded when component c…
laxmikantbpandhare Oct 11, 2022
347165f
Bump github.com/onsi/gomega from 1.20.2 to 1.21.1
dependabot[bot] Oct 11, 2022
b382e54
Bump github.com/spf13/cobra from 1.5.0 to 1.6.0
dependabot[bot] Oct 17, 2022
7af8311
Bump golang.org/x/text from 0.3.7 to 0.4.0
dependabot[bot] Oct 18, 2022
69e310b
:seeding: update CLI deps
camilamacedo86 Oct 21, 2022
6e679ee
Update make build cmd with manifests
astraw99 Oct 16, 2022
e2e48b4
Improve rendering of the documentation
multani Oct 23, 2022
49ed4c4
update cronjob to use batchv1 api
krishnaindani Oct 24, 2022
25a87b4
golangci-lint: add recommended revive checks to linter-settings but d…
oscr Oct 22, 2022
2e286b5
Bump github.com/spf13/cobra from 1.6.0 to 1.6.1
dependabot[bot] Oct 24, 2022
7447b8c
Enable revive unused-parameter check and fix findings
oscr Oct 24, 2022
1056290
Bump github.com/onsi/ginkgo/v2 from 2.3.1 to 2.4.0
dependabot[bot] Oct 24, 2022
b726dfe
Fix grammar in comment
seemiller Oct 24, 2022
c30135b
Update github workflow to use same golangci-lint minor version as Mak…
oscr Oct 25, 2022
436a995
fix docker buildx args
mikelsid Oct 26, 2022
75ccfe2
🐛 (kustomize/v2-alpha): Fix typo issue in the labels added to the man…
h0tbird Oct 26, 2022
d8cfcd9
Add KB project git-repo and edit icons
astraw99 Oct 27, 2022
b3b6e0a
Add doc FAQ section
astraw99 Oct 25, 2022
a38dba3
Update joelanford/go-apidiff (v0.4.0 -> v0.5.0)
oscr Oct 29, 2022
be1766f
docs: supplement plugin creation
Kavinjsir Oct 7, 2022
32b7639
Bump github.com/onsi/gomega from 1.22.1 to 1.23.0
dependabot[bot] Oct 31, 2022
ab1942d
Bump github.com/onsi/gomega from 1.23.0 to 1.24.0
dependabot[bot] Nov 7, 2022
740ec32
Bump github.com/onsi/ginkgo/v2 from 2.4.0 to 2.5.0
dependabot[bot] Nov 10, 2022
ad76f3f
Bump github.com/spf13/afero from 1.9.2 to 1.9.3
dependabot[bot] Nov 14, 2022
7a63756
Bump golang.org/x/tools from 0.2.0 to 0.3.0
dependabot[bot] Nov 14, 2022
3a8af14
Bump github.com/onsi/gomega from 1.24.0 to 1.24.1
dependabot[bot] Nov 14, 2022
528806b
fix typo in Makefile
ebiiim Nov 15, 2022
927247b
:sparkles: add version check for makefile template tools (#3077)
coriaedu Nov 16, 2022
3a8e87d
fix unexpected end of file error in makefiles
Nov 16, 2022
e084b6f
:sparkles: Add go/v4 base and migration guide
camilamacedo86 Oct 22, 2022
4383e30
Update docs/book/src/plugins/go-v4-plugin.md
camilamacedo86 Nov 18, 2022
1d47164
Update docs/book/src/migration/legacy.md
camilamacedo86 Nov 18, 2022
0a5cf4d
Update docs/book/src/migration/manually_migration_guide_gov3_to_gov4.md
camilamacedo86 Nov 18, 2022
b08e1ae
Update docs/book/src/migration/manually_migration_guide_gov3_to_gov4.md
camilamacedo86 Nov 18, 2022
995153d
Update docs/book/src/migration/manually_migration_guide_gov3_to_gov4.md
camilamacedo86 Nov 18, 2022
968d182
(go/v3,go/v4-alpha): Upgrade controller-runtime version from 1.13.0 t…
camilamacedo86 Nov 18, 2022
e0ffee2
📖 : suggest specify plugin for pr
Kavinjsir Nov 21, 2022
d01773f
docs: fix typo in the component config tutorial
andreasgerstmayr Nov 22, 2022
57b6fc2
🌱: refact testdata
Kavinjsir Nov 19, 2022
161514a
Bump github.com/onsi/ginkgo/v2 from 2.5.0 to 2.5.1
dependabot[bot] Nov 22, 2022
26b171a
✨ (kustomize/v2-alpha): add kustomize file to track crd sample info
Kavinjsir Nov 17, 2022
541982b
bump proxy image
camilamacedo86 Nov 23, 2022
ec62bb2
fix: Remove trailing space making yamllint fail on new project
erikgb Nov 26, 2022
7af971b
(kustomize/v2-alpha): change kustomization file to track samples to u…
camilamacedo86 Nov 26, 2022
b454503
add action to lint yaml
everettraven Nov 14, 2022
0d3ca45
update yamllint to now be run via Makefile
everettraven Nov 23, 2022
03f04cb
run yamllint target as part of lint target
everettraven Nov 23, 2022
816d6c2
add yamllint job back as the lint job only runs golangci-lint
everettraven Nov 23, 2022
cb95be8
(deployimage/v1-alpha): fix error to scaffold go/v4-alpha projects
camilamacedo86 Nov 29, 2022
fd230a0
Replace restricted-access ComponentConfig design doc link with the pu…
mresvanis Dec 2, 2022
64a58fb
Bump golang.org/x/text from 0.4.0 to 0.5.0
dependabot[bot] Dec 5, 2022
5b77b29
fix lint issue
camilamacedo86 Dec 6, 2022
cda6171
🌱 Change testdata suffix and regenerate samples (#3111)
jason1028kr Dec 8, 2022
5fb4345
book: add details rbac doc in tutorial
qingwave Dec 9, 2022
cd45250
Bump github.com/onsi/ginkgo/v2 from 2.5.1 to 2.6.0
dependabot[bot] Dec 12, 2022
1de60c6
improve golang/v3/v4 README template
mdb Dec 12, 2022
3ad7a93
run 'make generate'
mdb Dec 12, 2022
4eb0fe7
Bump golang.org/x/tools from 0.3.0 to 0.4.0
dependabot[bot] Dec 12, 2022
5bbc4d4
Update envtest.md
neufeldtech Dec 14, 2022
36c4e3a
Update SUMMARY.md
chinu-anand Dec 18, 2022
86db09f
📖 Making section on envtest limitations visible in Master (#3123)
ShivamTyagi12345 Dec 18, 2022
f2e3bd7
:seedling: Bump goreleaser/goreleaser-action from 3 to 4
dependabot[bot] Dec 19, 2022
219b338
Bump github.com/onsi/ginkgo/v2 from 2.6.0 to 2.6.1
dependabot[bot] Dec 19, 2022
d0a6092
fix: Fix "Available Plugins" link
tan-i-ham Dec 30, 2022
81a724c
✨ warning comment on PROJECT file (#3137)
jason1028kr Dec 31, 2022
6399a89
Bump github.com/onsi/gomega from 1.24.1 to 1.24.2
dependabot[bot] Dec 31, 2022
4eafe6b
docs: added missing shell argument to autocompletion snippet
GabriFedi97 Jan 3, 2023
d0830ab
:seedling: update license date
camilamacedo86 Jan 8, 2023
2cddaa0
⚠️ go/v4-alpha: change the layout to follow Golang Standards (#2985)
camilamacedo86 Jan 9, 2023
400da8b
Update cronjob_types.go
Sajiyah-Salat Jan 18, 2023
6930c42
:sparkles: upgrade k8s from 1.25 to 1.26 (#3147)
camilamacedo86 Jan 14, 2023
9f0d079
Bump golang.org/x/text from 0.5.0 to 0.6.0
dependabot[bot] Jan 14, 2023
53a50b6
:book: fix typo in curl command (#3156)
guettli Jan 14, 2023
1cdb3e8
Bump github.com/onsi/ginkgo/v2 from 2.6.1 to 2.7.0
dependabot[bot] Jan 14, 2023
fbb6b8d
fix-missing dashes infront of plugins
Sijoma Jan 10, 2023
62a61e8
Bump github.com/gobuffalo/flect from 0.3.0 to 1.0.0
dependabot[bot] Jan 14, 2023
cb3821c
Bump golang.org/x/tools from 0.4.0 to 0.5.0
dependabot[bot] Jan 14, 2023
b52c7b2
:doc: cleanup info and code regards legacy actions using GCP to build…
camilamacedo86 Jan 13, 2023
0af401f
:seedling: Bump kubernetes-sigs/kubebuilder-release-tools
dependabot[bot] Jan 16, 2023
2c28db9
📖 fix untile typo in readmes (#3135)
klucsik Jan 18, 2023
394c55d
:book: remove the workaround steps from the release doc
camilamacedo86 Jan 16, 2023
9bea7d6
corrected layout
swastik959 Jan 20, 2023
b1c6613
co_doc
swastik959 Jan 20, 2023
f51973d
📖 : update ComponentConfig tutorial (#3181)
Eileen-Yu Jan 26, 2023
141f4fb
Bump github.com/onsi/gomega from 1.24.2 to 1.26.0
dependabot[bot] Jan 26, 2023
dc191c4
Bump github.com/onsi/ginkgo/v2 from 2.7.0 to 2.8.0
dependabot[bot] Jan 30, 2023
33021b5
feat: automatically update componentconfig tutorial
Eileen-Yu Jan 27, 2023
4722fe0
⚠️ (kustomize/v2-alpha, go/v4-alpha): Upgrade kustomize from 4.5.7 to…
Eileen-Yu Feb 4, 2023
e0fe1fd
Upgrade the k8s version from 1.26.0 to 1.26.1 and controller-runtime …
Feb 3, 2023
02ea726
[Fix] Generate docs
varshaprasad96 Feb 6, 2023
95bfe65
change kustomize install templating to avoid tripping security alerts
jberkhahn Jan 27, 2023
ba0ed51
📖 fix: sync docs tutorial with latest kb (#3209)
Kavinjsir Feb 8, 2023
abe6ee8
📖 Update cronjob-tutorial (#3213)
Eileen-Yu Feb 10, 2023
0dd47a4
Bump golang.org/x/text from 0.6.0 to 0.7.0
dependabot[bot] Feb 14, 2023
8fb30f7
Bump golang.org/x/tools from 0.5.0 to 0.6.0
dependabot[bot] Feb 14, 2023
7fd89ba
Bump github.com/onsi/ginkgo/v2 from 2.8.0 to 2.8.1
dependabot[bot] Feb 14, 2023
316e222
:sparkles: (go/v3,go/v4-alpha) :Update controller-runtime and control…
camilamacedo86 Feb 14, 2023
09a91b6
:book: update the template for proposals (#3219)
camilamacedo86 Feb 16, 2023
4816e68
:book: update the status of the proposals in the repo
camilamacedo86 Feb 11, 2023
5a8a4bb
🐛 (Kubebuilder External Plugins API): fix populate PluginRequest.Univ…
em-r Feb 19, 2023
f33afbe
docs(README): add latest release badge
Feb 20, 2023
dc1601a
🌱 Bump golang.org/x/net from 0.6.0 to 0.7.0 (#3232)
dependabot[bot] Feb 20, 2023
eb7c310
:book: design doc with proposal to re-scaffold projects from scratch…
camilamacedo86 Feb 20, 2023
bd49931
Bump github.com/onsi/gomega from 1.26.0 to 1.27.1
dependabot[bot] Feb 21, 2023
d42373c
Bump github.com/onsi/ginkgo/v2 from 2.8.1 to 2.8.3
dependabot[bot] Feb 21, 2023
c97a0c3
:warning: (kustomize/v1) deprecated v1 version in favor of v2 (#3235)
camilamacedo86 Feb 21, 2023
f0398dc
🌱 Update golangci-lint to latest version
tharun634 Feb 21, 2023
9835c44
👻 : add tony as reviewer
Kavinjsir Feb 23, 2023
edf3f11
Create doc page for good practices, link it to summary.md
Sajiyah-Salat Mar 7, 2023
67e0124
Update api-changes.md
shubhamrajvanshi Mar 6, 2023
c89b716
🌱 Bump github.com/spf13/afero from 1.9.3 to 1.9.4 (#3254)
dependabot[bot] Mar 6, 2023
b57c3d9
🌱 Bump github.com/onsi/ginkgo/v2 from 2.8.3 to 2.8.4 (#3253)
dependabot[bot] Mar 6, 2023
9bce210
Bump github.com/onsi/ginkgo/v2 from 2.8.4 to 2.9.0
dependabot[bot] Mar 6, 2023
4076045
🌱 Bump github.com/gobuffalo/flect from 1.0.0 to 1.0.2 (#3252)
dependabot[bot] Mar 6, 2023
69c28c3
:warning: (go/v3) deprecate go/v3 in favor of go/v4 (#3238)
camilamacedo86 Mar 6, 2023
ce29481
Update helper_to_upgrade_projects_by_rescaffolding.md
Sajiyah-Salat Mar 1, 2023
805e76e
:warning: (kustomize/v2) Stabilize plugin. kustomize/v2-alpha was rep…
camilamacedo86 Mar 6, 2023
adf43b5
fix: XDG_CONFIG_HOME external plugin discovery
em-r Feb 22, 2023
33e3d62
test: increase coverage
em-r Feb 25, 2023
2320284
Bump golang.org/x/text from 0.7.0 to 0.8.0
dependabot[bot] Mar 7, 2023
dec3815
Bump github.com/spf13/afero from 1.9.4 to 1.9.5
dependabot[bot] Mar 7, 2023
0d36c13
:seedling: Bump joelanford/go-apidiff from 0.5.0 to 0.6.0 (#3265)
dependabot[bot] Mar 7, 2023
40bc06c
Bump github.com/onsi/gomega from 1.27.1 to 1.27.2
dependabot[bot] Mar 7, 2023
2e6a307
📖 : delete cronjob tutorial Incorrect kustomization.yaml (#3256)
xiao-jay Mar 7, 2023
2b4fae4
:warning: (go/v4-alpha) stabilize go/v4 plugin. Plugin go/v4-alpha re…
camilamacedo86 Mar 7, 2023
95edd56
[fix: go/v3, go/v4] Remove stale imports
varshaprasad96 Mar 8, 2023
a5116c1
fix nit lint issue
camilamacedo86 Mar 11, 2023
b8f6d40
🐛 fix: deprecate message should be in go/v3 (#3277)
camilamacedo86 Mar 11, 2023
a3823a4
🌱 : fix sample project-v4-grafana (#3279)
camilamacedo86 Mar 11, 2023
c0bd280
:book: update cronjob tutorial sample to use go/v4
camilamacedo86 Mar 11, 2023
0da1046
:book: update multiversion tutorial to use go/v4 (#3282)
camilamacedo86 Mar 13, 2023
063939c
:sparkles: make go/v4 default scaffold
camilamacedo86 Mar 11, 2023
5e51728
:book: remove warning from quick start
camilamacedo86 Mar 11, 2023
24f78c3
:sparkles: deprecate kustomize/v1 and go/v3 packages
camilamacedo86 Mar 11, 2023
e9e057d
Bump github.com/onsi/ginkgo/v2 from 2.9.0 to 2.9.1
dependabot[bot] Mar 14, 2023
dfccc82
:book: make component-config tuturial sample be based on go/v4 plugin
camilamacedo86 Mar 11, 2023
1fb85e8
:book: updating the component config tutorial to use go/v4
camilamacedo86 Mar 11, 2023
1762c92
doc: add fish and powershell of autocompletion command
jenting Mar 14, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/apidiff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
with:
go-version: "1.19"
- name: Execute go-apidiff
uses: joelanford/go-apidiff@v0.4.0
uses: joelanford/go-apidiff@v0.6.0
with:
compare-imports: true
print-compatible: true
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Run linter
uses: golangci/golangci-lint-action@v3
with:
version: v1.49 # Always uses the latest patch version.
version: v1.51
only-new-issues: true # Show only new issues if it's a pull request
- name: Report failure
uses: nashmaniac/create-issue-action@v1.1
Expand All @@ -50,3 +50,10 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
labels: kind/bug
body: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}

yamllint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run yamllint make target
run: make yamllint
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
with:
go-version: '~1.19'
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v3
uses: goreleaser/goreleaser-action@v4
with:
version: v1.11.2
args: release -f ./build/.goreleaser.yml --rm-dist
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/testdata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
run: sudo rm -f /usr/local/bin/kustomize
- name: Verify testdata directory
run: make check-testdata
- name: Verify docs update
run: make check-docs
- name: Report failure
uses: nashmaniac/create-issue-action@v1.1
# Only report failures of pushes (PRs have are visible through the Checks section) to the default branch
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ jobs:
steps:
- name: Verifier action
id: verifier
uses: kubernetes-sigs/kubebuilder-release-tools@v0.2.0
uses: kubernetes-sigs/kubebuilder-release-tools@v0.3.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ WORKSPACE
# don't check in the build output of the book
docs/book/book/

# ignore auto-generated dir by `mdbook serve`
docs/book/src/docs

# Editor temp files
*~
\#*#
Expand All @@ -22,3 +25,4 @@ docs/book/book/
# skip testdata go.sum, since it may have
# different result depending on go version
/testdata/**/go.sum
/docs/book/src/simple-external-plugin-tutorial/testdata/sampleexternalplugin/v1/bin
44 changes: 39 additions & 5 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
run:
deadline: 5m
allow-parallel-runners: true

issues:
# don't skip warning about doc comments
# don't exclude the default set of lint
Expand All @@ -13,8 +17,41 @@ linters-settings:
enable=fieldalignment: true
revive:
rules:
- name: if-return
disabled: true
# The following rules are recommended https://github.com/mgechev/revive#recommended-configuration
- name: blank-imports
- name: context-as-argument
- name: context-keys-type
- name: dot-imports
- name: error-return
- name: error-strings
- name: error-naming
- name: exported
disabled: true # TODO: Investigate if it should be enabled. Disabled for now due to many findings.
- name: if-return
disabled: true # TODO: Investigate if it should be enabled. Disabled for now due to many findings.
- name: increment-decrement
- name: var-naming
disabled: true # TODO: Investigate if it should be enabled. Disabled for now due to many findings.
- name: var-declaration
- name: package-comments
disabled: true # TODO: Investigate if it should be enabled. Disabled for now due to many findings.
- name: range
- name: receiver-naming
- name: time-naming
- name: unexported-return
- name: indent-error-flow
- name: errorf
- name: empty-block
disabled: true # TODO: Investigate if it should be enabled. Disabled for now due to many findings.
- name: superfluous-else
- name: unused-parameter
- name: unreachable-code
- name: redefines-builtin-id
#
# Rules in addition to the recommended configuration above.
#
- name: bool-literal-in-expr
- name: constant-logical-expr

linters:
disable-all: true
Expand All @@ -40,6 +77,3 @@ linters:
- unconvert
- unparam
- unused

run:
deadline: 5m
7 changes: 7 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,13 @@ changes, which don't deserve a release note. Please don't abuse it.
You can also use the equivalent emoji directly, since GitHub doesn't
render the `:xyz:` aliases in PR titles.

If the PR is "plugin" scoped, you may also append the responding plugin names in the prefix.
[For instance](https://github.com/kubernetes-sigs/kubebuilder/commit/0b36d0c4021bbf52f29d5a990157466761ec180c):

```
🐛 (kustomize/v2-alpha): Fix typo issue in the labels added to the manifests
```

Individual commits should not be tagged separately, but will generally be
assumed to match the PR. For instance, if you have a bugfix in with
a breaking change, it's generally encouraged to submit the bugfix
Expand Down
24 changes: 19 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

# Copyright 2019 The Kubernetes Authors.
# Copyright 2023 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -63,27 +63,39 @@ install: build ## Build and install the binary with the current source code. Use
##@ Development

.PHONY: generate
generate: generate-testdata ## Update/generate all mock data. You should run this commands to update the mock data after your changes.
generate: generate-testdata generate-docs ## Update/generate all mock data. You should run this commands to update the mock data after your changes.
go mod tidy

.PHONY: generate-testdata
generate-testdata: ## Update/generate the testdata in $GOPATH/src/sigs.k8s.io/kubebuilder
rm -rf testdata/
./test/testdata/generate.sh

.PHONY: generate-docs
generate-docs: ## Update/generate the docs in $GOPATH/src/sigs.k8s.io/kubebuilder
go run hack/docs/generate_samples.go

.PHONY: check-docs
check-docs: ## Run the script to ensure that the docs are updated
./hack/docs/check.sh

.PHONY: lint
lint: golangci-lint ## Run golangci-lint linter
lint: golangci-lint yamllint ## Run golangci-lint linter & yamllint
$(GOLANGCI_LINT) run

.PHONY: lint-fix
lint-fix: golangci-lint ## Run golangci-lint linter and perform fixes
$(GOLANGCI_LINT) run --fix

.PHONY: yamllint
yamllint:
@docker run --rm $$(tty -s && echo "-it" || echo) -v $(PWD):/data cytopia/yamllint:latest testdata -d "{extends: relaxed, rules: {line-length: {max: 120}}}" --no-warnings

GOLANGCI_LINT = $(shell pwd)/bin/golangci-lint
golangci-lint:
@[ -f $(GOLANGCI_LINT) ] || { \
set -e ;\
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell dirname $(GOLANGCI_LINT)) v1.49.0 ;\
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell dirname $(GOLANGCI_LINT)) v1.51.2 ;\
}

.PHONY: apidiff
Expand All @@ -92,7 +104,7 @@ apidiff: go-apidiff ## Run the go-apidiff to verify any API differences compared

.PHONY: go-apidiff
go-apidiff:
go install github.com/joelanford/go-apidiff@v0.4.0
go install github.com/joelanford/go-apidiff@v0.5.0

##@ Tests

Expand Down Expand Up @@ -139,6 +151,8 @@ test-e2e-ci: ## Run the end-to-end tests (used in the CI)`
.PHONY: test-book
test-book: ## Run the cronjob tutorial's unit tests to make sure we don't break it
cd ./docs/book/src/cronjob-tutorial/testdata/project && make test
cd ./docs/book/src/component-config-tutorial/testdata/project && make test
cd ./docs/book/src/multiversion-tutorial/testdata/project && make test

.PHONY: test-license
test-license: ## Run the license check
Expand Down
5 changes: 3 additions & 2 deletions OWNERS_ALIASES
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,19 @@ aliases:
kubebuilder-admins:
- pwittrock
- camilamacedo86
- jmrodri
- varshaprasad96

# non-admin folks who can approve any PRs in the repo
kubebuilder-approvers:
- jmrodri
- varshaprasad96

# folks who can review and LGTM any PRs in the repo (doesn't include
# approvers & admins -- those count too via the OWNERS file)
kubebuilder-reviewers:
- joelanford
- rashmigottipati
- everettraven
- Kavinjsir

# folks who may have context on ancient history,
# but are no longer directly involved
Expand Down
12 changes: 2 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
[![Unit tests](https://github.com/kubernetes-sigs/kubebuilder/actions/workflows/unit-tests.yml/badge.svg)](https://github.com/kubernetes-sigs/kubebuilder/actions/workflows/unit-tests.yml)
[![Go Report Card](https://goreportcard.com/badge/sigs.k8s.io/kubebuilder)](https://goreportcard.com/report/sigs.k8s.io/kubebuilder)
[![Coverage Status](https://coveralls.io/repos/github/kubernetes-sigs/kubebuilder/badge.svg?branch=master)](https://coveralls.io/github/kubernetes-sigs/kubebuilder?branch=master)
[![Latest release](https://badgen.net/github/release/kubernetes-sigs/kubebuilder)](https://github.com/kubernetes-sigs/kubebuilder/lreleases)

## Kubebuilder

Expand Down Expand Up @@ -126,16 +127,7 @@ supporting Windows are welcome.

### Apple Silicon

Apple Silicon (`darwin/arm64`) is supported using the `go/v4-alpha` plugin which provides support for this platform.

```bash
kubebuilder init --domain my.domain --repo my.domain/guestbook --plugins=go/v4-alpha
```

**Note**: The `go/v4-alpha` plugin is an unstable version and can have breaking changes in future releases. The previous kustomize
version (`v3.Y.Z`) used in the `go/v3` has no available binaries for this
platform [kubernetes-sigs/kustomize/issues/4612](https://github.com/kubernetes-sigs/kustomize/issues/4612)
Because of this, we cannot support this `darwin/arm64` on the stable scaffold done by default with the Kubebuilder with the `go/v3` plugin.
Apple Silicon (`darwin/arm64`) support begins with the `go/v4` plugin.

## Community Meetings

Expand Down
33 changes: 3 additions & 30 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,28 +50,6 @@ For more info, see the release page: https://github.com/kubernetes-sigs/kubebuil

2. Announce the new release via email is sent to `kubebuilder@googlegroups.com` with the subject `[ANNOUNCE] Kubebuilder $VERSION is released`

## What to do if things goes wrong? How to release from my local env as a workaround?

As a workaround we can release from locally by:

PS.: _This workaround uses the google cloud. Note that we move the binary CLI release from google cloud to use Github Actions instead_

1. Download google container builder: https://github.com/GoogleCloudPlatform/cloud-build-local
2. Verify that you can use the cloud-build-local CLI tool
3. Ensure that you are locally in the branch created for the release (`release-<MAJOR.MINOR>`)
4. Ensure that it has no changes in the code source ( `git status`)
5. Create the directory `cloudbuild` (`mkdir cloudbuild`)
6. Then, update the file `build/cloudbuild_local.yaml` with:

The following change is required for Goreleaser be able to add the binaries in the release page.

```sh
env: ["SNAPSHOT=1","GITHUB_TOKEN=your github token with access in the repo"]
```
**NOTE** You can create a token [here](https://github.com/settings/tokens/new).

7. Then, update the file `build/build_kubebuilder.sh` to remove the flag `--snapshot` (Otherwise, the binaries will be built with snapshot git commit hash instead of the tag version)
8. Run the command to trigger the release `$ cloud-build-local --config=build/cloudbuild_local.yaml --dryrun=false --write-workspace=./cloudbuild .`

## HEAD releases

Expand All @@ -86,13 +64,8 @@ The releases occur in an account in the Google Cloud (See [here](https://console

### To build the Kubebuilder CLI binaries:

A trigger `build-kb-release` is configured to call [build/cloudbuild.yaml](build/cloudbuild.yaml).
This trigger will be executed when any new tag be published.
The tags must be built from the release branch (Currently, `release-3`).

Also, we have a trigger to generate snapshots builds from the master branch.
This trigger will call [build/cloudbuild_snapshot.yaml](build/cloudbuild_snapshot.yaml)
when any change needs to be performed on master.
A trigger GitHub action [release](.github/workflows/release.yml) is trigged when a new tag is pushed.
This action will caall the job [./build/.goreleaser.yml](./build/.goreleaser.yml).

### To build the Kubebuilder-tools: (Artifacts required to use ENV TEST)

Expand Down Expand Up @@ -146,4 +119,4 @@ However, the image should still be built and maintained since other projects und

[kubebuilder-release-tools]: https://github.com/kubernetes-sigs/kubebuilder-release-tools
[release-notes-generation]: https://github.com/kubernetes-sigs/kubebuilder-release-tools/blob/master/README.md#release-notes-generation
[release-process]: https://github.com/kubernetes-sigs/kubebuilder/blob/master/VERSIONING.md#releasing
[release-process]: https://github.com/kubernetes-sigs/kubebuilder/blob/master/VERSIONING.md#releasing
2 changes: 1 addition & 1 deletion build/.goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ builds:
- darwin_amd64
- darwin_arm64
env:
- KUBERNETES_VERSION=1.25.0
- KUBERNETES_VERSION=1.26.1
- CGO_ENABLED=0

# Only binaries of the form "kubebuilder_${goos}_${goarch}" will be released.
Expand Down
Loading