-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: laxmikantbpandhare <[email protected]> updated kb version to get ginkgo/v2 changes Signed-off-by: laxmikantbpandhare <[email protected]> added changelog Signed-off-by: laxmikantbpandhare <[email protected]> By() cleause used outside and it was throwing error updated go.mod depedencies too many arguments InstallCertManager and UnInstallCertManager update kb go.mod updated --leader-elec skip in the changes kb changes fort envtest updated testdata update go version 1.19 and component config added to moulecule test updated go version in github actions and docker sdk images updated io/ioutil updated all io/ioutil to io or os as it is deprecated modified code for component config check modified code for component config check resolve conflicts make generate updated Signed-off-by: laxmikantbpandhare <[email protected]> updated logic Signed-off-by: laxmikantbpandhare <[email protected]> updated milecule test Signed-off-by: laxmikantbpandhare <[email protected]> removed ginkgo old version and updated ansible molecule test Signed-off-by: laxmikantbpandhare <[email protected]> updated the changes with the help of Bryce and Jesus Signed-off-by: laxmikantbpandhare <[email protected]> updated manager.yaml removes space Signed-off-by: laxmikantbpandhare <[email protected]> removed --component-config=true from webhook testcase as well Signed-off-by: laxmikantbpandhare <[email protected]> updated testdata and added changelog with migration guide Signed-off-by: laxmikantbpandhare <[email protected]> lint error for header in migration guide Signed-off-by: laxmikantbpandhare <[email protected]> added pipe | in changelog
- Loading branch information
1 parent
ead5efa
commit 5d1e0cc
Showing
313 changed files
with
1,859 additions
and
1,755 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# entries is a list of entries to include in | ||
# release notes and/or the migration guide | ||
entries: | ||
- description: > | ||
Ansible scaffolding got modified in order to incorporate with Kubebuilder `--component-config` flag changes. Previously, it was scaffolding and doing some file changes without considering the `--component-config` flag. | ||
Now, this PR made changes that will consider the `--component-config` flag and modify the scaffolded file. | ||
1. If the `--component-config` flag is passed then look for `- /manager` in the file in order to add leader election id to the manager.yaml file. If flag is not passed then look for `--leader-elect`. | ||
2. Same logic for manager proxy patch file, look for `memory: 64Mi` if the flag is passed. If a flag is not passed then look for `--leader-elect` | ||
3. Repeat the same logic for replacing the port number from the file. | ||
4. At the end, update the `manager.yaml` file to avoid lint errors. | ||
kind: "change" | ||
breaking: false | ||
migration: | ||
header: this change also modified ansible molecule test that was looking for `--leader-elect` in the file. | ||
body: | | ||
In the advance molecule test, modified code to behave properly with new `--component-config` flag changes. | ||
``` | ||
err = kbutil.InsertCode( | ||
filepath.Join(ma.ctx.Dir, "config", "default", "manager_auth_proxy_patch.yaml"), | ||
"- \"--leader-election-id=advanced-molecule-operator\"", | ||
managerAuthArgs) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# entries is a list of entries to include in | ||
# release notes and/or the migration guide | ||
entries: | ||
- description: > | ||
This PR bumped Kubebuilder to a newer version and it got the recent PR changes for the `--component-config` flag. | ||
If this flag is passed through the command line as an argument then only the `controller_manager_config.yaml` file will be scaffolded in the manifest. | ||
If it is not passed then it will not scaffold out this file. But, in this case, it will add `--leader-elect` to the files to the `manager.yaml` file | ||
kind: "change" | ||
breaking: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# entries is a list of entries to include in | ||
# release notes and/or the migration guide | ||
entries: | ||
- description: > | ||
Modified go version to 1.19 in all the places and Kubebuilder to k8s 1.25 | ||
The `config-gen` is completely removed from Kubebuilder. As part of this bump, the website content of SDK was updated where the doc is referring to `config-gen`. | ||
kind: "change" | ||
breaking: false | ||
migration: | ||
header: Kubebuilder bump brought changes that modified the `Makefile` scaffolding and also `multiarch` chanegs are also included. | ||
body: | | ||
1. Updated the addTestE2eMaekefileTarget() target where Makefile content is used as below. | ||
```sh | ||
`KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" go test ./... -coverprofile cover.out`, | ||
``` | ||
2. Kubebuiler bump also added multiple architecture support changes to the Makefile whenre docker buildx is used. This change will support more than one platform. | ||
```sh | ||
PLATFORMS ?= linux/arm64,linux/amd64,linux/s390x,linux/ppc64le | ||
.PHONY: docker-buildx | ||
docker-buildx: test ## Build and push docker image for the manager for cross-platform support | ||
# copy existing Dockerfile and insert --platform=${BUILDPLATFORM} into Dockerfile.cross, and preserve the original Dockerfile | ||
sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' Dockerfile > Dockerfile.cross | ||
- docker buildx create --name project-v3-builder | ||
docker buildx use project-v3-builder | ||
- docker buildx build --push --platform=$(PLATFORMS) --tag ${IMG} -f Dockerfile.cross | ||
- docker buildx rm project-v3-builder | ||
rm Dockerfile.cross | ||
``` | ||
3. Updated testdata `go.mod` file with the k8s 1.25 depedencies. In the go.mod file, ensure the following depedencies versions and run `go mod tidy`: | ||
```go | ||
github.com/onsi/ginkgo/v2 v2.1.4 | ||
github.com/onsi/gomega v1.19.0 | ||
github.com/prometheus/client_golang v1.12.2 | ||
k8s.io/api v0.25.0 | ||
k8s.io/apimachinery v0.25.0 | ||
k8s.io/client-go v0.25.0 | ||
sigs.k8s.io/controller-runtime v0.13.0 | ||
``` | ||
- description: > | ||
Updated ginkgo to ginkgo/v2 in all of the files. The reason behind it is Kubebuilder updated to ginkgo/v2. | ||
These changes raised one issue where the Labels field is used by ginkgo/v2. Same field name is already defined in SDK that was causing the issue. I updated the SDK field Labels to LabelsMap to avoid the issue caused due to the same name. | ||
kind: "change" | ||
breaking: false | ||
- description: > | ||
Updated all the `io/ioutil` imported package to either `io` or `os`. `io/ioutil` got deprecated in 1.16 and no longer it is used. Updated all the files in SDK. | ||
kind: "change" | ||
breaking: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# entries is a list of entries to include in | ||
# release notes and/or the migration guide | ||
entries: | ||
- description: > | ||
Helm scaffolding got modified in order to incorporate with Kubebuilder `--component-config` flag changes. Previously, it was scaffolding and doing some file changes without considering component-config flag. | ||
Now, this PR made changes which will consider the `--component-config` flag and modify the scaffolded file. | ||
1. If the `--component-config` flag is passed then look for `- /manager` in the file in order to add leader election id to the manager.yaml file. If flag is not passed then look for `--leader-elect`. | ||
2. Same logic for manager proxy patch file, look for `memory: 64Mi` if the flag is passed. If a flag is not passed then look for `--leader-elect` | ||
3. Repeat the same logic for replacing the port number from the file. | ||
4. At the end, update the `manager.yaml` file to avoid lint errors. | ||
kind: "change" | ||
breaking: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.