Skip to content

Commit 1d5c6c9

Browse files
Merge branch 'kubernetes-sigs:master' into master
2 parents e89793c + 73e25fa commit 1d5c6c9

File tree

185 files changed

+1811
-1683
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

185 files changed

+1811
-1683
lines changed

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
- name: Run linter
4040
uses: golangci/golangci-lint-action@v3
4141
with:
42-
version: v1.50
42+
version: v1.51
4343
only-new-issues: true # Show only new issues if it's a pull request
4444
- name: Report failure
4545
uses: nashmaniac/[email protected]

.github/workflows/testdata.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ jobs:
2525
run: sudo rm -f /usr/local/bin/kustomize
2626
- name: Verify testdata directory
2727
run: make check-testdata
28+
- name: Verify docs update
29+
run: make check-docs
2830
- name: Report failure
2931
uses: nashmaniac/[email protected]
3032
# Only report failures of pushes (PRs have are visible through the Checks section) to the default branch

.github/workflows/verify.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ jobs:
1313
steps:
1414
- name: Verifier action
1515
id: verifier
16-
uses: kubernetes-sigs/kubebuilder-release-tools@v0.2.0
16+
uses: kubernetes-sigs/kubebuilder-release-tools@v0.3.0
1717
with:
1818
github_token: ${{ secrets.GITHUB_TOKEN }}

Makefile

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
# Copyright 2019 The Kubernetes Authors.
3+
# Copyright 2023 The Kubernetes Authors.
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -63,14 +63,22 @@ install: build ## Build and install the binary with the current source code. Use
6363
##@ Development
6464

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

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

74+
.PHONY: generate-docs
75+
generate-docs: ## Update/generate the docs in $GOPATH/src/sigs.k8s.io/kubebuilder
76+
go run hack/docs/generate_samples.go
77+
78+
.PHONY: check-docs
79+
check-docs: ## Run the script to ensure that the docs are updated
80+
./hack/docs/check.sh
81+
7482
.PHONY: lint
7583
lint: golangci-lint yamllint ## Run golangci-lint linter & yamllint
7684
$(GOLANGCI_LINT) run
@@ -87,7 +95,7 @@ GOLANGCI_LINT = $(shell pwd)/bin/golangci-lint
8795
golangci-lint:
8896
@[ -f $(GOLANGCI_LINT) ] || { \
8997
set -e ;\
90-
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell dirname $(GOLANGCI_LINT)) v1.50.1 ;\
98+
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell dirname $(GOLANGCI_LINT)) v1.51.2 ;\
9199
}
92100

93101
.PHONY: apidiff

OWNERS_ALIASES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ aliases:
1818
- joelanford
1919
- rashmigottipati
2020
- everettraven
21+
- Kavinjsir
2122

2223
# folks who may have context on ancient history,
2324
# but are no longer directly involved

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
[![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)
33
[![Go Report Card](https://goreportcard.com/badge/sigs.k8s.io/kubebuilder)](https://goreportcard.com/report/sigs.k8s.io/kubebuilder)
44
[![Coverage Status](https://coveralls.io/repos/github/kubernetes-sigs/kubebuilder/badge.svg?branch=master)](https://coveralls.io/github/kubernetes-sigs/kubebuilder?branch=master)
5+
[![Latest release](https://badgen.net/github/release/kubernetes-sigs/kubebuilder)](https://github.com/kubernetes-sigs/kubebuilder/lreleases)
56

67
## Kubebuilder
78

RELEASE.md

Lines changed: 3 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -50,28 +50,6 @@ For more info, see the release page: https://github.com/kubernetes-sigs/kubebuil
5050

5151
2. Announce the new release via email is sent to `[email protected]` with the subject `[ANNOUNCE] Kubebuilder $VERSION is released`
5252

53-
## What to do if things goes wrong? How to release from my local env as a workaround?
54-
55-
As a workaround we can release from locally by:
56-
57-
PS.: _This workaround uses the google cloud. Note that we move the binary CLI release from google cloud to use Github Actions instead_
58-
59-
1. Download google container builder: https://github.com/GoogleCloudPlatform/cloud-build-local
60-
2. Verify that you can use the cloud-build-local CLI tool
61-
3. Ensure that you are locally in the branch created for the release (`release-<MAJOR.MINOR>`)
62-
4. Ensure that it has no changes in the code source ( `git status`)
63-
5. Create the directory `cloudbuild` (`mkdir cloudbuild`)
64-
6. Then, update the file `build/cloudbuild_local.yaml` with:
65-
66-
The following change is required for Goreleaser be able to add the binaries in the release page.
67-
68-
```sh
69-
env: ["SNAPSHOT=1","GITHUB_TOKEN=your github token with access in the repo"]
70-
```
71-
**NOTE** You can create a token [here](https://github.com/settings/tokens/new).
72-
73-
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)
74-
8. Run the command to trigger the release `$ cloud-build-local --config=build/cloudbuild_local.yaml --dryrun=false --write-workspace=./cloudbuild .`
7553

7654
## HEAD releases
7755

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

8765
### To build the Kubebuilder CLI binaries:
8866

89-
A trigger `build-kb-release` is configured to call [build/cloudbuild.yaml](build/cloudbuild.yaml).
90-
This trigger will be executed when any new tag be published.
91-
The tags must be built from the release branch (Currently, `release-3`).
92-
93-
Also, we have a trigger to generate snapshots builds from the master branch.
94-
This trigger will call [build/cloudbuild_snapshot.yaml](build/cloudbuild_snapshot.yaml)
95-
when any change needs to be performed on master.
67+
A trigger GitHub action [release](.github/workflows/release.yml) is trigged when a new tag is pushed.
68+
This action will caall the job [./build/.goreleaser.yml](./build/.goreleaser.yml).
9669

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

@@ -146,4 +119,4 @@ However, the image should still be built and maintained since other projects und
146119
147120
[kubebuilder-release-tools]: https://github.com/kubernetes-sigs/kubebuilder-release-tools
148121
[release-notes-generation]: https://github.com/kubernetes-sigs/kubebuilder-release-tools/blob/master/README.md#release-notes-generation
149-
[release-process]: https://github.com/kubernetes-sigs/kubebuilder/blob/master/VERSIONING.md#releasing
122+
[release-process]: https://github.com/kubernetes-sigs/kubebuilder/blob/master/VERSIONING.md#releasing

build/.goreleaser.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ builds:
4444
- darwin_amd64
4545
- darwin_arm64
4646
env:
47-
- KUBERNETES_VERSION=1.25.0
47+
- KUBERNETES_VERSION=1.26.1
4848
- CGO_ENABLED=0
4949

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

build/build_kubebuilder.sh

Lines changed: 0 additions & 111 deletions
This file was deleted.

build/cloudbuild.yaml

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)