Skip to content

Commit 5e0861a

Browse files
author
Ish Shah
committed
merge conflicts
2 parents e66b57e + 6cda969 commit 5e0861a

File tree

67 files changed

+1633
-589
lines changed

Some content is hidden

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

67 files changed

+1633
-589
lines changed

CHANGELOG.md

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@
22

33
### Added
44

5+
### Changed
6+
- Upgrade minimal Ansible version in the init projects from `2.4` to `2.6`. ([#2107](https://github.com/operator-framework/operator-sdk/pull/2107))
7+
8+
### Deprecated
9+
10+
### Removed
11+
12+
### Bug Fixes
13+
14+
## v0.12.0
15+
16+
### Added
17+
518
- Added `Operator Version: X.Y.Z` information in the operator logs.([#1953](https://github.com/operator-framework/operator-sdk/pull/1953))
619
- Make Ansible verbosity configurable via the `ansible-verbosity` flag. ([#2087](https://github.com/operator-framework/operator-sdk/pull/2087))
720
- Autogenerate CLI documentation via `make doc` ([#2099](https://github.com/operator-framework/operator-sdk/pull/2099))
@@ -11,6 +24,10 @@
1124
- **Breaking change:** Changed required Go version from `1.12` to `1.13`. This change applies to the SDK project itself and Go projects scaffolded by the SDK. Projects that import this version of the SDK require Go 1.13 to compile. ([#1949](https://github.com/operator-framework/operator-sdk/pull/1949))
1225

1326
### Deprecated
27+
- Upgrade Kubernetes version from `kubernetes-1.14.1` to `kubernetes-1.15.4`. ([#2083](https://github.com/operator-framework/operator-sdk/pull/2083))
28+
- Upgrade Helm version from `v2.14.1` to `v2.15.0`. ([#2083](https://github.com/operator-framework/operator-sdk/pull/2083))
29+
- Upgrade [`controller-runtime`](https://github.com/kubernetes-sigs/controller-runtime) version from `v0.2.0` to [`v0.3.0`](https://github.com/kubernetes-sigs/controller-runtime/releases/tag/v0.3.0). ([#2083](https://github.com/operator-framework/operator-sdk/pull/2083))
30+
- Upgrade [`controller-tools`](https://github.com/kubernetes-sigs/controller-tools) version from `v0.2.1+git` to [`v0.2.2`](https://github.com/kubernetes-sigs/controller-tools/releases/tag/v0.2.2). ([#2083](https://github.com/operator-framework/operator-sdk/pull/2083))
1431

1532
### Removed
1633

@@ -19,18 +36,24 @@
1936
### Bug Fixes
2037

2138
- OLM internal manager is not returning errors in the initialization. ([#1976](https://github.com/operator-framework/operator-sdk/pull/1976))
39+
- Added missing default role permission for `deployments`, which is required to create the metrics service for the operator. ([#2090](https://github.com/operator-framework/operator-sdk/pull/2090))
40+
- Handle invalid maxArtifacts annotation on CRs for Ansible based operators. ([2093](https://github.com/operator-framework/operator-sdk/pull/2093))
41+
- When validating package manifests, only return an error if default channel is not set and more than one channel is available. ([#2116](https://github.com/operator-framework/operator-sdk/pull/2116))
2242

2343
## v0.11.0
2444

2545
### Added
2646

47+
- Added support for event filtering for ansible operator. ([#1968](https://github.com/operator-framework/operator-sdk/issues/1968))
2748
- Added new `--skip-generation` flag to the `operator-sdk add api` command to support skipping generation of deepcopy and OpenAPI code and OpenAPI CRD specs. ([#1890](https://github.com/operator-framework/operator-sdk/pull/1890))
2849
- The `operator-sdk olm-catalog gen-csv` command now produces indented JSON for the `alm-examples` annotation. ([#1793](https://github.com/operator-framework/operator-sdk/pull/1793))
2950
- Added flag `--dep-manager` to command [`operator-sdk print-deps`](https://github.com/operator-framework/operator-sdk/blob/master/doc/sdk-cli-reference.md#print-deps) to specify the type of dependency manager file to print. The choice of dependency manager is inferred from top-level dependency manager files present if `--dep-manager` is not set. ([#1819](https://github.com/operator-framework/operator-sdk/pull/1819))
3051
- Ansible based operators now gather and serve metrics about each custom resource on port 8686 of the metrics service. ([#1723](https://github.com/operator-framework/operator-sdk/pull/1723))
3152
- Added the Go version, OS, and architecture to the output of `operator-sdk version` ([#1863](https://github.com/operator-framework/operator-sdk/pull/1863))
3253
- Added support for `ppc64le-linux` for the `operator-sdk` binary and the Helm operator base image. ([#1533](https://github.com/operator-framework/operator-sdk/pull/1533))
3354
- Added new `--version` flag to the `operator-sdk scorecard` command to support a new output format for the scorecard. ([#1916](https://github.com/operator-framework/operator-sdk/pull/1916)
55+
- Added new `--selector` flag to the `operator-sdk scorecard` command to support filtering scorecard tests based on labels added to each test. ([#1916](https://github.com/operator-framework/operator-sdk/pull/1916)
56+
- Added new `--list` flag to the `operator-sdk scorecard` command to support listing scorecard tests that would be executed based on selector filters. ([#1916](https://github.com/operator-framework/operator-sdk/pull/1916)
3457

3558
### Changed
3659

@@ -67,13 +90,13 @@
6790
err = r.client.List(context.TODO(), listOps, podList)
6891
// New
6992
listOpts := []client.ListOption{
70-
client.InNamespace("namespace"),
93+
client.InNamespace("namespace"),
7194
}
7295
err = r.client.List(context.TODO(), podList, listOpts...)
7396
```
7497
- [`pkg/test.FrameworkClient`](https://github.com/operator-framework/operator-sdk/blob/master/pkg/test/client.go#L33) methods `List()` and `Delete()` have new signatures corresponding to the homonymous methods of `sigs.k8s.io/controller-runtime/pkg/client.Client`. ([#1876](https://github.com/operator-framework/operator-sdk/pull/1876))
7598
- CRD file names were previously of the form `<group>_<version>_<kind>_crd.yaml`. Now that CRD manifest `spec.version` is deprecated in favor of `spec.versions`, i.e. multiple versions can be specified in one CRD, CRD file names have the form `<full group>_<resource>_crd.yaml`. `<full group>` is the full group name of your CRD while `<group>` is the last subdomain of `<full group>`, ex. `foo.bar.com` vs `foo`. `<resource>` is the plural lower-case CRD Kind found at `spec.names.plural`. ([#1876](https://github.com/operator-framework/operator-sdk/pull/1876))
76-
- Upgrade Python version from `2.7` to `3.6`, Ansible version from `2.8.0` to `~=2.8` and ansible-runner from `1.2` to `1.3.4` in the Ansible based images. ([#1947](https://github.com/operator-framework/operator-sdk/pull/1947))
99+
- Upgrade Python version from `2.7` to `3.6`, Ansible version from `2.8.0` to `~=2.8` and ansible-runner from `1.2` to `1.3.4` in the Ansible based images. ([#1947](https://github.com/operator-framework/operator-sdk/pull/1947))
77100
- Made the default scorecard version `v1alpha2` which is new for this release and could break users that were parsing the older scorecard output (`v1alpha1`). Users can still specify version `v1alpha1` on the scorecard configuration to use the older style for some period of time until `v1alpha1` is removed.
78101
- Replaced `pkg/kube-metrics.NewCollectors()` with `pkg/kube-metrics.NewMetricsStores()` and changed exported function signature for `pkg/kube-metrics.ServeMetrics()` due to a [breaking change in kube-state-metrics](https://github.com/kubernetes/kube-state-metrics/pull/786). ([#1943](https://github.com/operator-framework/operator-sdk/pull/1943))
79102

@@ -103,7 +126,7 @@
103126

104127
### Changed
105128

106-
- **Breaking Change:** New configuration format for the `operator-sdk scorecard` using config files. See [`doc/test-framework/scorecard`](doc/test-framework/scorecard) for more info ([#1641](https://github.com/operator-framework/operator-sdk/pull/1641))
129+
- **Breaking Change:** New configuration format for the `operator-sdk scorecard` using config files. See [`doc/test-framework/scorecard`](doc/test-framework/scorecard.md) for more info ([#1641](https://github.com/operator-framework/operator-sdk/pull/1641))
107130
- **Breaking change:** CSV config field `role-path` is now `role-paths` and takes a list of strings. Users can now specify multiple `Role` and `ClusterRole` manifests using `role-paths`. ([#1704](https://github.com/operator-framework/operator-sdk/pull/1704))
108131
- Make `ready` package idempotent. Now, a user can call `Set()` or `Unset()` to set the operator's readiness without knowing the current state. ([#1761](https://github.com/operator-framework/operator-sdk/pull/1761))
109132
@@ -329,7 +352,7 @@
329352
### Changed
330353
331354
- The SDK now uses logr as the default logger to unify the logging output with the controller-runtime logs. Users can still use a logger of their own choice. See the [logging doc](https://github.com/operator-framework/operator-sdk/blob/master/doc/user/logging.md) on how the SDK initializes and uses logr.
332-
- Ansible Operator CR status better aligns with [conventions](https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#typical-status-properties). ([#639](https://github.com/operator-framework/operator-sdk/pull/639))
355+
- Ansible Operator CR status better aligns with [conventions](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties). ([#639](https://github.com/operator-framework/operator-sdk/pull/639))
333356
334357
### Added
335358

Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ SCORECARD_PROXY_IMAGE ?= $(SCORECARD_PROXY_BASE_IMAGE)
2727
HELM_ARCHES:="amd64" "ppc64le"
2828

2929
export CGO_ENABLED:=0
30-
export GO111MODULE:=on
31-
export GOPROXY?=https://proxy.golang.org/
3230
.DEFAULT_GOAL:=help
3331

3432
.PHONY: help
@@ -112,7 +110,7 @@ build/%.asc:
112110
test: test-unit ## Run the tests
113111

114112
test-markdown test/markdown:
115-
./hack/ci/marker --root=doc
113+
./hack/ci/marker
116114

117115
test-sanity test/sanity: tidy
118116
./hack/tests/sanity-check.sh

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ Follow the steps in the [installation guide][install_guide] to learn how to inst
6464
$ mkdir -p $HOME/projects/example-inc/
6565
# Create a new app-operator project
6666
$ cd $HOME/projects/example-inc/
67-
$ export GO111MODULE=on
6867
$ operator-sdk new app-operator --repo github.com/example-inc/app-operator
6968
$ cd app-operator
7069

ci/dockerfiles/builder.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM openshift/origin-release:golang-1.13
22

33
WORKDIR /go/src/github.com/operator-framework/operator-sdk
4-
ENV GOPATH=/go PATH=/go/src/github.com/operator-framework/operator-sdk/build:$PATH GOPROXY=https://proxy.golang.org/ GO111MODULE=on
4+
ENV GOPATH=/go PATH=/go/src/github.com/operator-framework/operator-sdk/build:$PATH
55

66
COPY . .
77

ci/prow.Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# Makefile specifically intended for use in prow/api-ci only.
22

33
export CGO_ENABLED := 0
4-
export GO111MODULE := on
5-
export GOPROXY ?= https://proxy.golang.org/
64

75
build:
86
$(MAKE) -f Makefile build/operator-sdk

ci/tests/e2e-ansible.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ mkdir -p $ROOTDIR/bin
1616
export PATH=$ROOTDIR/bin:$PATH
1717

1818
if ! [ -x "$(command -v kubectl)" ]; then
19-
curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.14.2/bin/linux/amd64/kubectl && chmod +x kubectl && mv kubectl bin/
19+
curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.15.4/bin/linux/amd64/kubectl && chmod +x kubectl && mv kubectl bin/
2020
fi
2121

2222
if ! [ -x "$(command -v oc)" ]; then

ci/tests/e2e-helm.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ mkdir -p $ROOTDIR/bin
1616
export PATH=$ROOTDIR/bin:$PATH
1717

1818
if ! [ -x "$(command -v kubectl)" ]; then
19-
curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.14.2/bin/linux/amd64/kubectl && chmod +x kubectl && mv kubectl bin/
19+
curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.15.4/bin/linux/amd64/kubectl && chmod +x kubectl && mv kubectl bin/
2020
fi
2121

2222
if ! [ -x "$(command -v oc)" ]; then

ci/tests/scaffolding/e2e-ansible-scaffold-hybrid.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ pushd memcached-operator
2323
# Add a second Kind to test watching multiple GVKs
2424
operator-sdk add crd --kind=Foo --api-version=ansible.example.com/v1alpha1
2525

26-
export GO111MODULE=on
27-
export GOPROXY=https://proxy.golang.org
2826
operator-sdk migrate
2927

3028
if [[ ! -e build/Dockerfile.sdkold ]];

ci/tests/scaffolding/e2e-helm-scaffold-hybrid.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ pushd "$HELMDIR"
1313
operator-sdk new nginx-operator --api-version=helm.example.com/v1alpha1 --kind=Nginx --type=helm
1414

1515
pushd nginx-operator
16-
export GO111MODULE=on
1716
operator-sdk migrate
1817

1918
if [[ ! -e build/Dockerfile.sdkold ]];

ci/tests/subcommand.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ mkdir -p $ROOTDIR/bin
88
export PATH=$ROOTDIR/bin:$PATH
99

1010
if ! [ -x "$(command -v kubectl)" ]; then
11-
curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.14.2/bin/linux/amd64/kubectl && chmod +x kubectl && mv kubectl bin/
11+
curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.15.4/bin/linux/amd64/kubectl && chmod +x kubectl && mv kubectl bin/
1212
fi
1313

1414
if ! [ -x "$(command -v oc)" ]; then

cmd/operator-sdk/scorecard/cmd.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,18 @@ func NewCmd() *cobra.Command {
3737
scorecardCmd.Flags().String(scorecard.ConfigOpt, "", fmt.Sprintf("config file (default is '<project_dir>/%s'; the config file's extension and format can be .yaml, .json, or .toml)", scorecard.DefaultConfigFile))
3838
scorecardCmd.Flags().String(scplugins.KubeconfigOpt, "", "Path to kubeconfig of custom resource created in cluster")
3939
scorecardCmd.Flags().StringP(scorecard.OutputFormatOpt, "o", scorecard.TextOutputFormat, fmt.Sprintf("Output format for results. Valid values: %s, %s", scorecard.TextOutputFormat, scorecard.JSONOutputFormat))
40-
scorecardCmd.Flags().String(schelpers.VersionOpt, schelpers.DefaultScorecardVersion, fmt.Sprintf("scorecard version (tech preview version is '%s'", schelpers.LatestScorecardVersion))
40+
scorecardCmd.Flags().String(schelpers.VersionOpt, schelpers.DefaultScorecardVersion, "scorecard version. Valid values: v1alpha1, v1alpha2")
41+
scorecardCmd.Flags().StringP(scorecard.SelectorOpt, "l", "", "selector (label query) to filter tests on (only valid when version is v1alpha2)")
42+
scorecardCmd.Flags().BoolP(scorecard.ListOpt, "L", false, "If true, only print the test names that would be run based on selector filtering (only valid when version is v1alpha2)")
4143

4244
// TODO: make config file global and make this a top level flag
4345
viper.BindPFlag(scorecard.ConfigOpt, scorecardCmd.Flags().Lookup(scorecard.ConfigOpt))
4446

4547
viper.BindPFlag("scorecard."+scplugins.KubeconfigOpt, scorecardCmd.Flags().Lookup(scplugins.KubeconfigOpt))
4648
viper.BindPFlag("scorecard."+scorecard.OutputFormatOpt, scorecardCmd.Flags().Lookup(scorecard.OutputFormatOpt))
4749
viper.BindPFlag("scorecard."+schelpers.VersionOpt, scorecardCmd.Flags().Lookup(schelpers.VersionOpt))
50+
viper.BindPFlag("scorecard."+scorecard.SelectorOpt, scorecardCmd.Flags().Lookup(scorecard.SelectorOpt))
51+
viper.BindPFlag("scorecard."+scorecard.ListOpt, scorecardCmd.Flags().Lookup(scorecard.ListOpt))
4852

4953
return scorecardCmd
5054
}

doc/ansible/dev/developer_guide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,10 +468,10 @@ The structure passed to Ansible as extra vars is:
468468
"message": "Hello world 2",
469469
"new_parameter": "newParam",
470470
"_app_example_com_database": {
471-
<Full CRD>
471+
<Full CR>
472472
},
473473
"_app_example_com_database_spec": {
474-
<Full CRD .spec>
474+
<Full CR .spec>
475475
},
476476
}
477477
```

doc/ansible/dev/retroactively-owned-resources.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ metadata:
2727
`kubectl edit` can be used to update the resources by hand. See below
2828
for example `ownerReference` and `annotations`.
2929

30-
## For objects in the same namespace as the Owner (CRD)
30+
## For objects in the same namespace as the Owner (CR)
3131

32-
Dependent resources `within the same namespace as the owning CR` are
32+
Dependent resources *within the same namespace as the owning CR* are
3333
tracked with the `ownerReference` field.
3434

3535
`ownerReference` structure:
@@ -50,7 +50,7 @@ metadata:
5050
uid: ad834522-d9a5-4841-beac-991ff3798c00
5151
```
5252

53-
## For objects which are NOT in the same namespace as the Owner (CRD)
53+
## For objects which are NOT in the same namespace as the Owner (CR)
5454

5555
An `annotation` is used instead of an `ownerReference` if the dependent
5656
resource is in a different namespace than the CR, or the dependent

doc/ansible/project_layout.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ After creating a new operator project using
77
| File/Folders | Purpose |
88
| :--- | :--- |
99
| deploy/ | Contains a generic set of Kubernetes manifests for deploying this operator on a Kubernetes cluster. |
10-
| roles/\<kind> | Contains an Ansible Role initialized using [Ansible Galaxy](https://docs.ansible.com/ansible/latest/reference_appendices/galaxy.html) |
10+
| roles/\<kind> | Contains an Ansible Role initialized using [Ansible Galaxy](https://docs.ansible.com/ansible/latest/galaxy/user_guide.html) |
1111
| build/ | Contains scripts that the `operator-sdk` uses for build and initialization. |
1212
| watches.yaml | Contains Group, Version, Kind, and the Ansible invocation method. |

doc/dev/release.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,8 @@ $ git checkout -b release-v1.3.0
196196
Commit the following changes:
197197
198198
- `version/version.go`: update `Version` to `v1.3.0`.
199-
- `internal/scaffold/go_mod.go`, in the `replace` block for `github.com/operator-framework/operator-sdk`:
200-
- Add the following `replace` line to the bottom of `go.mod`: `replace github.com/operator-framework/operator-sdk => github.com/operator-framework/operator-sdk v1.3.0`.
201-
- If a `replace` line already exists, change the version to `v1.3.0`.
199+
- `internal/scaffold/go_mod.go`, in the `require` block for `github.com/operator-framework/operator-sdk`:
200+
- Change the version for `github.com/operator-framework/operator-sdk` from `master` to `v1.3.0`.
202201
- `internal/scaffold/helm/go_mod.go`: same as for `internal/scaffold/go_mod.go`.
203202
- `internal/scaffold/ansible/go_mod.go`: same as for `internal/scaffold/go_mod.go`.
204203
- `CHANGELOG.md`: update the `## Unreleased` header to `## v1.3.0`.
@@ -237,8 +236,8 @@ Once this tag passes CI, go to step 3. For more info on tagging, see the [releas
237236
Check out a new branch from master (or use your `release-v1.3.0` branch) and commit the following changes:
238237
239238
- `version/version.go`: update `Version` to `v1.3.0+git`.
240-
- `internal/scaffold/go_mod.go`, in the `replace` block for `github.com/operator-framework/operator-sdk`:
241-
- Remove the `replace` line at the bottom of `go.mod`: `replace github.com/operator-framework/operator-sdk => github.com/operator-framework/operator-sdk v1.3.0`.
239+
- `internal/scaffold/go_mod.go`, in the `require` block for `github.com/operator-framework/operator-sdk`:
240+
- Change the version for `github.com/operator-framework/operator-sdk` from `v1.3.0` to `master`.
242241
- `internal/scaffold/helm/go_mod.go`: same as for `internal/scaffold/go_mod.go`.
243242
- `internal/scaffold/ansible/go_mod.go`: same as for `internal/scaffold/go_mod.go`.
244243
- `CHANGELOG.md`: add the following as a new set of headers above `## v1.3.0`:

0 commit comments

Comments
 (0)