v0.11.0
v0.11.0
Added
- Added new
--skip-generationflag to theoperator-sdk add apicommand to support skipping generation of deepcopy and OpenAPI code and OpenAPI CRD specs. (#1890) - The
operator-sdk olm-catalog gen-csvcommand now produces indented JSON for thealm-examplesannotation. (#1793) - Added flag
--dep-managerto commandoperator-sdk print-depsto 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-manageris not set. (#1819) - Ansible based operators now gather and serve metrics about each custom resource on port 8686 of the metrics service. (#1723)
- Added the Go version, OS, and architecture to the output of
operator-sdk version(#1863) - Added support for
ppc64le-linuxfor theoperator-sdkbinary and the Helm operator base image. (#1533)
Changed
- The Helm operator now uses the CR name for the release name for newly created CRs. Existing CRs will continue to use their existing UID-based release name. When a release name collision occurs (when CRs of different types share the same name), the second CR will fail to install with an error about a duplicate name. (#1818)
- Commands
olm uninstallandolm statusno longer use a--versionflag to specify OLM version. This information is now retrieved from the running cluster. (#1634) - The Helm operator no longer prints manifest diffs in the operator log at verbosity levels lower than INFO (#1857)
- CRD manifest
spec.versionis still supported, but users will see a warning message ifspec.versionsis not present and an error ifspec.versionsis populated but the version inspec.versionis not inspec.versions. (#1876) - Upgrade base image for Go, Helm, and scorecard proxy from
registry.access.redhat.com/ubi7/ubi-minimal:latesttoregistry.access.redhat.com/ubi8/ubi-minimal:latest. (#1952) - Upgrade base image for Ansible from
registry.access.redhat.com/ubi7/ubi:latesttoregistry.access.redhat.com/ubi8/ubi:latest. (#1990 and #2004) - Updated kube-state-metrics dependency from
v1.6.0tov1.7.2. (#1943)
Breaking changes
See the v0.11.x version upgrade guide for more details on how to adjust for these breaking changes.
- Upgrade Kubernetes version from
kubernetes-1.13.4tokubernetes-1.14.1(#1876) - Upgrade
github.com/operator-framework/operator-lifecycle-managerversion fromb8a4faf68e36feb6d99a6aec623b405e587b17b1to0.10.1(#1876) - Upgrade
controller-runtimeversion fromv0.1.12tov0.2.0(#1876)- The package
sigs.k8s.io/controller-runtime/pkg/runtime/schemeis deprecated, and contains no code. Replace this import withsigs.k8s.io/controller-runtime/pkg/schemewhere relevant. - The package
sigs.k8s.io/controller-runtime/pkg/runtime/logis deprecated. Replace this import withsigs.k8s.io/controller-runtime/pkg/logwhere relevant. - The package
sigs.k8s.io/controller-runtime/pkg/runtime/signalsis deprecated. Replace this import withsigs.k8s.io/controller-runtime/pkg/manager/signalswhere relevant. - All methods on
sigs.k8s.io/controller-runtime/pkg/client.Client(except forGet()) have been updated. Instead of each using astruct-typed or variadic functional option parameter, or having no option parameter, each now uses a variadic interface option parameter typed for each method. SeeList()below for an example. sigs.k8s.io/controller-runtime/pkg/client.Client'sList()method signature has been updated:List(ctx context.Context, opts *client.ListOptions, list runtime.Object) erroris nowList(ctx context.Context, list runtime.Object, opts ...client.ListOption) error. To migrate:import ( "context" "sigs.k8s.io/controller-runtime/pkg/client" ) ... // Old listOpts := &client.ListOptions{} listOpts.InNamespace("namespace") err = r.client.List(context.TODO(), listOps, podList) // New listOpts := []client.ListOption{ client.InNamespace("namespace"), } err = r.client.List(context.TODO(), podList, listOpts...)
- The package
pkg/test.FrameworkClientmethodsList()andDelete()have new signatures corresponding to the homonymous methods ofsigs.k8s.io/controller-runtime/pkg/client.Client. (#1876)- CRD file names were previously of the form
<group>_<version>_<kind>_crd.yaml. Now that CRD manifestspec.versionis deprecated in favor ofspec.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.comvsfoo.<resource>is the plural lower-case CRD Kind found atspec.names.plural. (#1876) - Upgrade Python version from
2.7to3.6, Ansible version from2.8.0to~=2.8and ansible-runner from1.2to1.3.4in the Ansible based images. (#1947) - Replaced
pkg/kube-metrics.NewCollectors()withpkg/kube-metrics.NewMetricsStores()and changed exported function signature forpkg/kube-metrics.ServeMetrics()due to a breaking change in kube-state-metrics. (#1943)
Removed
- Removed flag
--as-filefrom commandoperator-sdk print-deps, which now only prints packages and versions in dependency manager file format. The choice of dependency manager type is set by--dep-manageror inferred from top-level dependency manager files present if--dep-manageris not set. (#1819)
Bug Fixes
- Configure the repo path correctly in
operator-sdk add crdand prevent the command from running outside of an operator project. (#1660) - In the Helm operator, skip owner reference injection for cluster-scoped resources in release manifests. The Helm operator only supports namespace-scoped CRs, and namespaced resources cannot own cluster-scoped resources. (#1817)
- Package manifests generated with
gen-csvrespect the--operator-nameflag, channel names are checked for duplicates before (re-)generation. (#1693) - Generated inventory for Ansible-based Operators now sets the localhost's
ansible_python_interpreterto{{ ansible_playbook_python }}, to properly match the implicit localhost. (#1952) - Fixed an issue in
operator-sdk olm-catalog gen-csvwhere the generated CSV is missing the expected set of owned CRDs. (#2017) - The command
operator-sdk olm-catalog gen-csv --csv-version=<version> --update-crdswould fail to copy over CRD manifests intodeploy/olm-catalogfor manifests whose name didn't end with a_crd.yamlsuffix. This has been fixed sogen-csvnow copies all CRD manifests specified bydeploy/olm-catalog/csv_config.yamlby checking the type of the manifest rather than the filename suffix. (#2015) - Added missing
jmespathdependency to Ansible-based Operator .travis.yml file template. (#2027) - Fixed invalid usage of
logr.Logger.Info()in the Ansible-based operator implementation, which caused unnecessary operator panics. (#2031)
Note: See how to upgrade your project to the version v0.11.0 by checking the Version Upgrade Guide