Skip to content

Commit

Permalink
Merge branch 'kubernetes-sigs:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Sajiyah-Salat committed Feb 26, 2023
2 parents e89793c + 73e25fa commit 1d5c6c9
Show file tree
Hide file tree
Showing 185 changed files with 1,811 additions and 1,683 deletions.
2 changes: 1 addition & 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.50
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 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 }}
14 changes: 11 additions & 3 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,14 +63,22 @@ 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 yamllint ## Run golangci-lint linter & yamllint
$(GOLANGCI_LINT) run
Expand All @@ -87,7 +95,7 @@ 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.50.1 ;\
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 Down
1 change: 1 addition & 0 deletions OWNERS_ALIASES
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ aliases:
- joelanford
- rashmigottipati
- everettraven
- Kavinjsir

# folks who may have context on ancient history,
# but are no longer directly involved
Expand Down
1 change: 1 addition & 0 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
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
111 changes: 0 additions & 111 deletions build/build_kubebuilder.sh

This file was deleted.

47 changes: 0 additions & 47 deletions build/cloudbuild.yaml

This file was deleted.

25 changes: 0 additions & 25 deletions build/cloudbuild_local.yaml

This file was deleted.

48 changes: 0 additions & 48 deletions build/cloudbuild_snapshot.yaml

This file was deleted.

15 changes: 3 additions & 12 deletions designs/code-generate-image-plugin.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
---
title: Neat-Enhancement-Idea
authors:
- "@camilamacedo86"
reviewers:
- TBD
approvers:
- TBD
creation-date: 2020-11-09
last-updated: 2021-02-14
status: implementable
---
| Authors | Creation Date | Status | Extra |
|---------------|---------------|-------------|---|
| @camilamacedo86 | 2021-02-14 | Implemented | [deploy-image-plugin-v1-alpha](https://book.kubebuilder.io/plugins/deploy-image-plugin-v1-alpha.html) |

# New Plugin (`deploy-image.go.kubebuilder.io/v1beta1`) to generate code

Expand Down
Loading

0 comments on commit 1d5c6c9

Please sign in to comment.