Skip to content

Commit c95782c

Browse files
Merge pull request operator-framework#168 from fabianvf/v1.13.1-rebase-master
Merge upstream tag v1.13.1
2 parents 6466b01 + 3cf2a3d commit c95782c

File tree

1,274 files changed

+76626
-15271
lines changed

Some content is hidden

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

1,274 files changed

+76626
-15271
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ Welcome to the Operator SDK! Before contributing, make sure to:
55
- Read the contributing guidelines https://github.com/operator-framework/operator-sdk/blob/master/CONTRIBUTING.MD
66
- Rebase your branch on the latest upstream master
77
- Link any relevant issues, PR's, or documentation
8-
- When fixing an issue, add "Closes #<ISSUE_NUMBER>"
8+
- Check that the commit message is concice and helpful:
9+
- When fixing an issue, add "Closes #<ISSUE_NUMBER>"
10+
- Sign your commit https://github.com/apps/dco
911
- Follow the below checklist if making a user-facing change
1012
1113
-->

CONTRIBUTING.MD

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,13 @@ The first line is the subject and should be no longer than 70 characters, the se
6464

6565
Most contributions involve some sort of documentation. See our [doc contribution guidelines][doc-contrib] for details.
6666

67+
## Changelog
68+
69+
The operator-sdk maintains a changelog and most contributions should involve a changelog entry. See our [changelog contribution guidelines][changelog-contrib] for details.
70+
6771
[operator_framework]: https://groups.google.com/forum/#!forum/operator-framework
6872
[developer-guide]: https://sdk.operatorframework.io/docs/contribution-guidelines/developer-guide/
6973
[reporting-issues]: https://sdk.operatorframework.io/docs/contribution-guidelines/reporting-issues/
7074
[golang-style-doc]: https://github.com/golang/go/wiki/CodeReviewComments
71-
[doc-contrib]:https://sdk.operatorframework.io/docs/contribution-guidelines/documentation
75+
[doc-contrib]: https://sdk.operatorframework.io/docs/contribution-guidelines/documentation
76+
[changelog-contrib]:https://master.sdk.operatorframework.io/docs/contribution-guidelines/changelog

Makefile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@ SHELL = /bin/bash
44
# This value must be updated to the release tag of the most recent release, a change that must
55
# occur in the release commit. IMAGE_VERSION will be removed once each subproject that uses this
66
# version is moved to a separate repo and release process.
7-
export IMAGE_VERSION = v1.10.1
7+
export IMAGE_VERSION = v1.13.0
88
# Build-time variables to inject into binaries
99
export SIMPLE_VERSION = $(shell (test "$(shell git describe)" = "$(shell git describe --abbrev=0)" && echo $(shell git describe)) || echo $(shell git describe --abbrev=0)+git)
1010
export GIT_VERSION = $(shell git describe --dirty --tags --always)
1111
export GIT_COMMIT = $(shell git rev-parse HEAD)
12+
export K8S_VERSION = 1.21
1213
# TODO: bump this to 1.21, after kubectl `--generator` flag is removed from e2e tests.
13-
export K8S_VERSION = 1.20.2
14+
export ENVTEST_K8S_VERSION = 1.21.1
1415

1516
# Build settings
1617
export TOOLS_DIR = tools/bin
@@ -146,11 +147,11 @@ e2e_targets := test-e2e $(e2e_tests)
146147
.PHONY: test-e2e-setup
147148
export KIND_CLUSTER := operator-sdk-e2e
148149

149-
export KUBEBUILDER_ASSETS = $(PWD)/$(shell go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest && $(shell go env GOPATH)/bin/setup-envtest use $(K8S_VERSION) --bin-dir tools/bin/ -p path)
150+
export KUBEBUILDER_ASSETS = $(PWD)/$(shell go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest && $(shell go env GOPATH)/bin/setup-envtest use $(ENVTEST_K8S_VERSION) --bin-dir tools/bin/ -p path)
150151
test-e2e-setup: build
151152
$(SCRIPTS_DIR)/fetch kind 0.11.0
152-
$(SCRIPTS_DIR)/fetch kubectl $(K8S_VERSION) # Install kubectl AFTER envtest because envtest includes its own kubectl binary
153-
[[ "`$(TOOLS_DIR)/kind get clusters`" =~ "$(KIND_CLUSTER)" ]] || $(TOOLS_DIR)/kind create cluster --image="kindest/node:v$(K8S_VERSION)" --name $(KIND_CLUSTER)
153+
$(SCRIPTS_DIR)/fetch kubectl $(ENVTEST_K8S_VERSION) # Install kubectl AFTER envtest because envtest includes its own kubectl binary
154+
[[ "`$(TOOLS_DIR)/kind get clusters`" =~ "$(KIND_CLUSTER)" ]] || $(TOOLS_DIR)/kind create cluster --image="kindest/node:v$(ENVTEST_K8S_VERSION)" --name $(KIND_CLUSTER)
154155

155156
.PHONY: test-e2e-teardown
156157
test-e2e-teardown:

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,11 @@ Now make a pull request.
224224
Just like sync to master, verify things look okay. Ensure the patches apply,
225225
if they do not you will have to either recreate the patch to make it apply,
226226
or remove it entirely if it is no longer needed. This will require manual
227-
intervention and inspection.
227+
intervention and inspection. You can manually verify the patches apply by running:
228+
229+
```
230+
make -f ci/prow.Makefile patch build
231+
```
228232

229233
Once the patches have been verified, create a release PR downstream:
230234

UPSTREAM-MERGE.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,11 @@ git add README-sdk.md
119119
echo "$version" > UPSTREAM-VERSION
120120
git add UPSTREAM-VERSION
121121

122+
# Edit the version in the patch so that -ocp is properly appended
123+
sed -i.bak -e "s/+export SIMPLE_VERSION=.*/+export SIMPLE_VERSION = ${version}-ocp/" patches/03-setversion.patch
124+
rm -f patches/03-setversion.patch.bak
125+
git add patches/03-setversion.patch
126+
122127
# just to make sure an old version merge is not being made
123128
git diff --staged --quiet && { echo "No changed files in merge?! Aborting."; exit 1; }
124129

UPSTREAM-VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v1.10.1
1+
v1.13.1
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# entries is a list of entries to include in
2+
# release notes and/or the migration guide
3+
entries:
4+
- description: >
5+
scorecard will now print out the failed CR when the basic test fails.
6+
7+
# kind is one of:
8+
# - addition
9+
# - change
10+
# - deprecation
11+
# - removal
12+
# - bugfix
13+
kind: "bugfix"
14+
15+
# Is this a breaking change?
16+
breaking: false

changelog/fragments/5285_bugfix.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# entries is a list of entries to include in
2+
# release notes and/or the migration guide
3+
entries:
4+
- description: >
5+
Add new flag options `--storage-image` and `--untar-image` to the Scorecard command to allow overwrite its default values.
6+
These options are useful for disconnect environments and to prevent an impact of the external registry's pull limits.
7+
8+
# kind is one of:
9+
# - addition
10+
# - change
11+
# - deprecation
12+
# - removal
13+
# - bugfix
14+
kind: "addition"
15+
16+
# Is this a breaking change?
17+
breaking: false
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
entries:
2+
- description: >
3+
For Ansible-based Operators, adds documented `Successful` condition, and no longer
4+
removes conditions from the status in updates. Users can now wait for a successful
5+
reconciliation by waiting for the `Successful` type condition to be `True`.
6+
7+
kind: "bugfix"
8+
breaking: false
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
entries:
2+
- description: >
3+
Fixed an error where `bundle validate` would return a "duplicate service account" error when
4+
an object and service account have the same `.metadata.name` in a bundle.
5+
kind: bugfix

changelog/fragments/bump-1.22.yaml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# entries is a list of entries to include in
2+
# release notes and/or the migration guide
3+
entries:
4+
- description: >
5+
- Upgrade the Kubernetes dependencies from `1.21` to `1.22`.
6+
- Upgrade the controller-gen dependency from `v0.6.2` to `v0.7.0`. More info: https://github.com/kubernetes-sigs/controller-tools/releases
7+
- Upgrade the sigs.k8s.io/controller-runtime dependency from `v0.9.2` to `v0.10.0`. More info: https://github.com/kubernetes-sigs/controller-runtime/releases
8+
- Upgrade the Env Test used from `1.21` to `1.22`.
9+
10+
# kind is one of:
11+
# - addition
12+
# - change
13+
# - deprecation
14+
# - removal
15+
# - bugfix
16+
kind: "change"
17+
18+
# Is this a breaking change?
19+
breaking: false
20+
21+
# NOTE: ONLY USE `pull_request_override` WHEN ADDING THIS
22+
# FILE FOR A PREVIOUSLY MERGED PULL_REQUEST!
23+
#
24+
# The generator auto-detects the PR number from the commit
25+
# message in which this file was originally added.
26+
#
27+
# What is the pull request number (without the "#")?
28+
# pull_request_override: 0
29+
30+
31+
# Migration can be defined to automatically add a section to
32+
# the migration guide. This is required for breaking changes.
33+
migration:
34+
header: Upgrade K8s versions to use 1.22 (golang/v3)
35+
body: >
36+
Note that to ensure the backwards compatibility SDK tool will try to downgrade the versions used if you need to still scaffold the v1beta1 for CRDs and Webhooks to publish your solutions into older cluster versions.
37+
However, note that this version is no longer supported on Kubernetes 1.22+, and for sigs.k8s.io/controller-runtime v0.10.0 or controller-gen v0.7.0.
38+
39+
Following are the changes to be addressed in your `Makefile` and `go.mod` file if you are
40+
not using the `v1beta1` K8s APIs which are no longer supported from k8s `1.22` version.
41+
42+
1) Update your `go.mod` file to upgrade the dependencies and run `go mod tidy` to download then
43+
44+
```go
45+
k8s.io/api v0.22.1
46+
k8s.io/apimachinery v0.22.1
47+
k8s.io/client-go v0.22.1
48+
sigs.k8s.io/controller-runtime v0.10.0
49+
```
50+
51+
2) Update your Makefile by
52+
- Replacing `ENVTEST_K8S_VERSION = 1.21` with `ENVTEST_K8S_VERSION = 1.22`
53+
- Replacing `$(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases` with `$(CONTROLLER_GEN) rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases`
54+
- Now, you can also remove from the `Makefile` the `CRD_OPTIONS`, see below:
55+
56+
```
57+
# Produce CRDs that work back to Kubernetes 1.11 (no version conversion)
58+
CRD_OPTIONS ?= "crd:trivialVersions=true,preserveUnknownFields=false"
59+
```
60+
61+
3) Replace your `admissionReviewVersions={v1,v1beta1}` markers with `admissionReviewVersions=v1`
62+
4) Run `make manifest` to re-generate your manifests with latest versions.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# entries is a list of entries to include in
2+
# release notes and/or the migration guide
3+
entries:
4+
- description: >
5+
Bumped community.kubernetes to kubernetes.core >= 2.2.0. Added the kubernetes.core collection to requirements.
6+
7+
# kind is one of:
8+
# - addition
9+
# - change
10+
# - deprecation
11+
# - removal
12+
# - bugfix
13+
kind: "change"
14+
15+
# Is this a breaking change?
16+
breaking: false
17+
18+
# Migration can be defined to automatically add a section to
19+
# the migration guide. This is required for breaking changes.
20+
migration:
21+
header: Update ansible collection ``community.kubernetes`` to ``kubernetes.core``
22+
body: >
23+
Add the ``kubernetes.core`` collection (>= 2.2.0) to the requrements.yml file
24+
25+
- name: kubernetes.core
26+
version: "2.2.0"
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# entries is a list of entries to include in
2+
# release notes and/or the migration guide
3+
entries:
4+
- description: >
5+
The list of webhooks in `webhookdescription` was previously sorted based on `webhookType`. It is now being sorted
6+
based on webhook names.
7+
8+
# kind is one of:
9+
# - addition
10+
# - change
11+
# - deprecation
12+
# - removal
13+
# - bugfix
14+
kind: "bugfix"
15+
16+
# Is this a breaking change?
17+
breaking: false
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# entries is a list of entries to include in
2+
# release notes and/or the migration guide
3+
entries:
4+
- description: >
5+
Add information to the errors raised by scorecard basic tests to allow easily identify the scenarios
6+
7+
# kind is one of:
8+
# - addition
9+
# - change
10+
# - deprecation
11+
# - removal
12+
# - bugfix
13+
kind: "addition"

changelog/fragments/reformat-xml.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# entries is a list of entries to include in
2+
# release notes and/or the migration guide
3+
entries:
4+
- description: >
5+
Reformat xml output to support in-line attributes
6+
7+
# kind is one of:
8+
# - addition
9+
# - change
10+
# - deprecation
11+
# - removal
12+
# - bugfix
13+
kind: "change"
14+
15+
# Is this a breaking change?
16+
breaking: false
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# entries is a list of entries to include in
2+
# release notes and/or the migration guide
3+
entries:
4+
- description: >
5+
Helm operator reconciliation diffs are now logged only at the zap
6+
debug level.
7+
8+
# kind is one of:
9+
# - addition
10+
# - change
11+
# - deprecation
12+
# - removal
13+
# - bugfix
14+
kind: "removal"
15+
16+
# Is this a breaking change?
17+
breaking: false

changelog/generated/v1.11.0.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
## v1.11.0
2+
3+
### Additions
4+
5+
- (go/v3, ansible/v1, helm/v1) Added `containerPort` protocol field required for server-side apply in manifests. ([#4863](https://github.com/operator-framework/operator-sdk/pull/4863))
6+
- For helm based operators, added a predicate that filters resources based on selectors specified in `watches.yaml`. Only the resources that contain the labels specified by selectors will be reconciled. ([#4997](https://github.com/operator-framework/operator-sdk/pull/4997))
7+
- For helm-based operators, support go `text/template` expansion of override values. ([#5105](https://github.com/operator-framework/operator-sdk/pull/5105))
8+
9+
### Changes
10+
11+
- (go/v3) Fixed a bug in `make test` caused by incorrect envtest asset setup. ([#4863](https://github.com/operator-framework/operator-sdk/pull/4863))
12+
- (go/v3, ansible/v1, helm/v1) Increased resource limits for controller manager. ([#4863](https://github.com/operator-framework/operator-sdk/pull/4863))
13+
- Updated operator-framework dependency to 0.10.5. This specific update includes a fix for bundle validation when checking for invalid service accounts. ([#5119](https://github.com/operator-framework/operator-sdk/pull/5119))
14+
- For helm-based operators, reverted #5042 and #4937 which modified helm release equality comparison. ([#5097](https://github.com/operator-framework/operator-sdk/pull/5097))
15+
16+
### Bug Fixes
17+
18+
- (ansible/v1) Previously, when scaffolding an Ansible-based operator with both Roles and Playbooks, the roles imported by the playbook could not be found when running locally (`make run`). This change prepends the `ANSIBLE_ROLES_PATH` environment variable with the path to the local roles directory. ([#5118](https://github.com/operator-framework/operator-sdk/pull/5118))
19+
- For Ansible-based operators, if a request is sent without a body in the metadata it will now be extracted from the request URL and properly set owner references/dependent watches. ([#5064](https://github.com/operator-framework/operator-sdk/pull/5064))
20+
- In `generate bundle`, exclude ServiceAccounts already in a CSV from generated bundle. ([#5120](https://github.com/operator-framework/operator-sdk/pull/5120))

changelog/generated/v1.12.0.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
## v1.12.0
2+
3+
### Additions
4+
5+
- If an optional UniqueID is provided by a user in the scorecard config and the user generates XML output the UID will be appended to the test result output. ([#5092](https://github.com/operator-framework/operator-sdk/pull/5092))
6+
7+
### Bug Fixes
8+
9+
- Preserve the order of `webhookdefinitions` while generating bundles, by sorting `webhookDescriptions` in CSV generator. ([#5177](https://github.com/operator-framework/operator-sdk/pull/5177))

changelog/generated/v1.13.0.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## v1.13.0
2+
3+
### Additions
4+
5+
- Added new optional validator `alpha-deprecated-apis` for the command bundle validate to help you verify if your bundle uses Kubernetes deprecated APIs. ([#5216](https://github.com/operator-framework/operator-sdk/pull/5216))
6+
- Added support for configuring Scorecard Service Accounts using config files alongside the CLI. ([#5245](https://github.com/operator-framework/operator-sdk/pull/5245))
7+
8+
### Changes
9+
10+
- (quarkus/v1alpha) Bumped java-operator-plugins to v0.1.0. This is the first release of the java-operator-plugins repo. There are no other changes besides pointing to a specific tag. ([#5206](https://github.com/operator-framework/operator-sdk/pull/5206))
11+
- For ansible-based operators, we have bumped `ansible-runner` dependency to >= 2.0.2. ([#5205](https://github.com/operator-framework/operator-sdk/pull/5205))
12+
- Updated default base image used in `run bundle` and `run bundle-upgrade` to the multi-arch `quay.io/operator-framework/opm:latest` image to support non-amd64 clusters. ([#5171](https://github.com/operator-framework/operator-sdk/pull/5171))
13+
- Replaced busybox with UBI8.4 for Scorecard Un-Tar image. ([#5191](https://github.com/operator-framework/operator-sdk/pull/5191))

0 commit comments

Comments
 (0)