Skip to content

Releases: operator-framework/operator-sdk

v0.18.0

28 May 22:21
v0.18.0
921c339
Compare
Choose a tag to compare

Additions

  • The Ansible operator now includes a healthz endpoint and liveness probe. All operators will now have a running healthz endpoint (not publicly exposed) without changes. (#2936)
  • Adds the ability for Helm operators to properly watch and reconcile when cluster-scoped release resources are changed. (#2987)
  • The CSV generator adds admission webhook config manifests present in --deploy-dir to new and existing CSV manifests. (#2729)
  • Add 'run packagemanifests' subcommand, which has the same functionality of the deprecated 'run --olm' mode. (#3016)
  • 'bundle generate' generates bundles for current project layouts; this has the same behavior as 'generate csv --make-manifests=true'. (#3088)
  • Set a default channel to the channel supplied to 'bundle create --channels=' if exactly one channel is set. (#3124)
  • Add '--kubeconfig' flag to '<run|cleanup> packagemanifests'. (#3067)
  • Add support for additional API creation for Anisble/Helm based operators. (#2703)
  • Add flag --interactive to the command operator-sdk generate csv in order to enable working with interactive prompts while generating CSV. (#2891)
  • Add new hidden alpha flag --output to print the result of operator-sdk bundle validate in JSON format to stdout. Logs are printed to stderr. (#3011)
  • Add 'run local' subcommand, which has the same functionality of the deprecated 'run --local' mode. (#3067)
  • Add scorecard-test image push targets into Makefile. (#3107)

Changes

  • In Helm-based operators, reconcile logic now uses three-way strategic merge patches for native kubernetes objects so that array patch strategies are correctly honored and applied. (#2869)
  • 'bundle validate' will print errors and warnings from validation. (#3083)
  • Breaking change: Set bundle dir permissions to 0755 so they can be read by in-cluster tooling. (#3129)
  • Breaking change: Changed the default CRD version from apiextensions.k8s.io/v1beta1 to apiextensions.k8s.io/v1 for commands that create or generate CRDs. (#2874)
  • Changed default API version for new Helm-based operators to helm.operator-sdk/v1alpha1. The k8s.io domain is reserved, so CRDs should not use it without explicit appproval. See the API Review Process for details. (#2859)
  • Breaking change: Updated Kubernetes dependencies to v1.18.2. (#2918)
  • Breaking change: Updated controller-runtime to v0.6.0. (#2918)
  • Updated controller-tools to v0.3.0. (#2918)
  • Updated helm to v3.2.0. (#2918)

Removals

  • Breaking change: The inotify-tools as a dependency of Ansible based-operator images which was deprecated and it will no longer scaffold the /bin/ao-logs which was using it to print the Ansible logs in the side-car since the side-car ansible container was removed in the previous versions. (#2852)
  • Breaking change: Removed automatic migration of helm releases from v2 to v3. (#2918)
  • Breaking change: Removed support for deprecated helm release naming scheme. (#2918)

Deprecations

  • Deprecate 'run --olm' mode. Use 'run packagemanifests' instead. (#3016)
  • Deprecate '--kubeconfig' flag on the 'cleanup' subcommand. Use 'run packagemanifests' instead. (#3067)
  • Deprecate 'run --local' mode. Use 'run local' instead. (#3067)

Bug Fixes

  • The Ansible Operator proxy will now return a 500 if it cannot determine whether a resource is virtual or not, instead of continuing on and skipping the cache. This will prevent resources that should have ownerReferences injected from being created without them, which would leave the user in a state that cannot be recovered without manual intervention. (#3112)
  • The Ansible Operator proxy no longer will attempt to cache non-status subresource requests. This will fix the issue where attempting to get Pod logs returns the API Pod resource instead of the log contents. (#3103)
  • Fix issue faced when the healthz endpoint is successfully called. (#3102)

v0.17.1

26 May 23:39
v0.17.1
6d10805
Compare
Choose a tag to compare

Note: using this release as a Go module will result in checksum errors. Use v0.17.2 or above instead.

Changes

  • Revert deprecation of the package manifests format. See #2755 for deprecation details. The package manifests format is still officially supported by the Operator Framework. (#2944, #3014, #3023)

Bug Fixes

  • Fixes issue where the helm.operator-sdk/upgrade-force annotation value for Helm based-operators is not parsed. (#2894)
  • In 'run --olm', package manifests format must be replicated in a pod's file system for consistent registry initialization. (#2964)
  • The internal OLM client retrieves existing OLM versions correctly now that the returned list of CSVs is indexed properly. (#2969)
  • Fixed issue to convert variables with numbers for Ansible based-operator. (#2842)
  • Added timeout to the Ansible based-operator proxy, which enables error reporting for requests that fail due to RBAC permissions issues to List and Watch the resources. (#2264)
  • CSV manifests read from disk are now properly marshaled into the CSV struct. (#3015)
  • Helm operator now applies its uninstall finalizer only when a release is deployed. This fixes a bug that caused the CR to be unable to be deleted without manually intervening to delete a prematurely added finalizer. (#3039)

v0.17.0

15 Apr 22:31
v0.17.0
2fd7019
Compare
Choose a tag to compare

v0.17.0

Added

  • Added support for generating kube-state-metrics metrics for cluster-scoped resources. Also added pkg/kubemetrics.NewNamespacedMetricsStores and pkg/kubemetrics.NewClusterScopedMetricsStores to support this new feature. (#2809)
  • Added the generate csv --deploy-dir --apis-dir --crd-dir flags to allow configuring input locations for operator manifests and API types directories to the CSV generator in lieu of a config. See the CLI reference doc or generate csv -h help text for more details. (#2511)
  • Added the generate csv --output-dir flag to allow configuring the output location for the catalog directory. (#2511)
  • The flag --watch-namespace and --operator-namespace was added to operator-sdk run --local, operator-sdk test --local and operator-sdk cleanup commands in order to replace the flag --namespace which was deprecated.(#2617)
  • The methods ctx.GetOperatorNamespace() and ctx.GetWatchNamespace() was added pkg/test in order to replace ctx.GetNamespace() which is deprecated. (#2617)
  • The --crd-version flag was added to the new, add api, add crd, and generate crds commands so that users can opt-in to v1 CRDs. (#2684)
  • The printout for the compatible Kubernetes Version #2446
  • The --output-dir flag instructs operator-sdk bundle create to write manifests and metadata to a non-default directory. (#2715)
  • The --overwrite flag instructs operator-sdk bundle create to overwrite metadata, manifests, and bundle.Dockerfile. (#2715)
  • operator-sdk bundle validate now accepts either an image tag or a directory arg. If the arg is a directory, its children must contain a manifests/ and a metadata/ directory. (#2737)
  • Add support to release SDK arm64 binaries and images. (#2742)
  • Add annotation helm.operator-sdk/upgrade-force: "True" to allow force resources replacement (helm upgrade --force) for Helm based-operators. (#2773)
  • The --make-manifests flag directs operator-sdk generate csv to create a manifests/ directory for the latest operator bundle, including CRDs. This flag is set by default. (#2776)
  • operator-sdk run --olm supports the new operator metadata format in metadata/annotations.yaml. (#2840)

Changed

  • The scorecard when creating a Custom Resource, will produce a message to the user if that CR already exists. (#2683)
  • Upgrade Kubernetes dependency versions from v1.16.2 to v1.17.4. (#2715)
  • Upgrade controller-runtime version from v0.4.0 to v0.5.2. (#2715)
  • Upgrade controller-tools version from v0.2.4 to v0.2.8. (#2715)
  • Upgrade helm version from v3.0.2 to v3.1.2. (#2715)
  • Upgrade prometheus-operator version from v0.34.0 to v0.38.0. (#2715)
  • Upgrade operator-registry version from v1.5.7to v1.6.2. (#2715)
  • Breaking Change: operator-sdk bundle create now creates a manifests/ directory under the parent directory of the argument passed to --directory, and setting --generate-only=true writes a Dockerfile to <project-root>/bundle.Dockerfile that copies bundle manifests from that manifests/ directory. (#2715)
  • Upgrade Kind used for tests for Ansible based-operators from 1.16 to 1.17. (#2753)
  • Breaking Change: Upgrade Molecule for Ansible-based operators from 2.22 to 3.0.2. For instructions on upgrading your project to use the V3 Molecule version see here. (#2749)
  • Breaking Change: Changed Conditions from map[ConditionType]Condition to []Condition. (#2739)
  • Setting operator-sdk generate csv --output-dir will search the output directory for bundles before searching the default location. (#2776)

Deprecated

  • Deprecated pkg/kubemetrics.NewMetricsStores. Use pkg/kubemetrics.NewNamespacedMetricsStores instead. (#2809)
  • Breaking Change: The --namespace flag from operator-sdk run --local, operator-sdk test --local and operator-sdk cleanup command was deprecated and will be removed in the future versions. Use --watch-namespace and --operator-namespace instead of. (#2617)
  • Breaking Change: The method ctx.GetNamespace() from the pkg/test is deprecated and will be removed in future versions. Use ctx.GetOperatorNamespace() and ctx.GetWatchNamespace() instead of. (#2617)
  • Breaking Change: package manifests are deprecated and new manifests are no longer generated; existing manifests are still updated by operator-sdk generate csv, but updates will not occur in future versions. Use operator-sdk bundle create to manage operator bundle metadata. (#2755)

Removed

  • Breaking Change: remove pkg/restmapper which was deprecated in v0.14.0. Projects that use this package must switch to the DynamicRESTMapper implementation in controller-runtime. (#2544)
  • Breaking Change: remove deprecated operator-sdk generate openapi subcommand. (#2740)
  • Breaking Change: Removed CSV configuration file support (defaulting to deploy/olm-catalog/csv-config.yaml) in favor of specifying inputs to the generator via generate csv --deploy-dir --apis-dir --crd-dir, and configuring output locations via generate csv --output-dir. (#2511)

Bug Fixes

  • The Ansible Operator proxy server now properly supports the Pod exec API (#2716)
  • Resources that use '-' in the APIGroup name can now be directly accessed by Ansible. (#2712)
  • Fixed issue in CSV generation that caused an incorrect path to be generated for descriptors on types that are fields in array elements. (#2721)
  • The test framework pkg/test no longer double-registers the --kubeconfig flag. Related bug: kubernetes-sigs/controller-runtime#878. (#2731)
  • The command operator-sdk generate k8s no longer requires users to explicitly set GOROOT in their environment. Now, GOROOT is detected using go env GOROOT and set automatically. (#2754)
  • operator-sdk generate csv and operator-sdk test local now parse multi-manifest files correctly. (#2758)
  • Fixed CRD validation generation issue with status.Conditions. (#2739)
  • Fix issue faced in the reconciliation when arrays are used in the config YAML files for Helm based-operators. (#2777)
  • Fixed issue in helm-operator where empty resource in release manifest caused failures while setting up watches for dependent resources. (#2831)

Note:

  • See how to ...
Read more

v0.16.0

17 Mar 20:22
55f1446
Compare
Choose a tag to compare

Added

  • Add a new option to set the minimum log level that triggers stack trace generation in logs (--zap-stacktrace-level) (#2319)
  • Added pkg/status with several new types and interfaces that can be used in Status structs to simplify handling of status conditions. (#1143)
  • Added support for relative Ansible roles and playbooks paths in the Ansible-based operator watches files. (#2273)
  • Added watches file support for roles that were installed as Ansible collections. (#2587)
  • Add Prometheus metrics support to Ansible-based operators. (#2179)
  • On generate csv, populate a CSV manifest’s spec.icon, spec.keywords, and spec.mantainers fields with empty values to better inform users how to add data. (#2521)
  • Scaffold code in cmd/manager/main.go for Go operators and add logic to Ansible/Helm operators to handle multinamespace caching if WATCH_NAMESPACE contains multiple namespaces. (#2522)
  • Add a new flag option (--skip-cleanup-error) to the test framework to allow skip the function which will remove all artefacts when an error be faced to perform this operation. (#2512)
  • Add event stats output to the operator logs for Ansible based-operators. (2580)
  • Improve Ansible logs by allowing output the full Ansible result for Ansible based-operators configurable by environment variable. (2589)
  • Add the --max-workers flag to the commands operator-sdk exec-entrypoint and operator-sdk run --local for Helm based-operators with the purpose of controling the number of concurrent reconcile workers. (2607)
  • Add the --proxy-port flag to the operator-sdk scorecard command allowing users to override the default proxy port value (8889). (2634)
  • Add support for Metrics with MultiNamespace scenario. (#2603)
  • Add Prometheus metrics support to Helm-based operators. (#2603)

Changed

  • The base image now includes version 0.10.3 of the OpenShift Python client. This should fix hanging in Python3
  • The Kubernetes modules have migrated to the Kubernetes Ansible collection. All scaffolded code now references modules from this collection instead of Ansible Core. No immediate action is required for existing users of the modules from core, though it is recommended they switch to using the collection to continue to get non-critical bugfixes and features. To install the collection, users will need to add the install step to their build/Dockerfile. New projects will have a requirements.yml scaffolded that includes the community.kubernetes collection, as well as the corresponding install step in the build/Dockerfile. (#2646)
  • Breaking change The operator_sdk.util collection is no longer installed by default in the base image. Existing projects will need to install it in the build/Dockerfile. New projects will have a requirements.yml scaffolded that includes the operator_sdk.util collection, as well as the corresponding install step in the build/Dockerfile. (#2652)
  • Ansible scaffolding has been rewritten to be simpler and make use of newer features of Ansible and Molecule. (#2425)
    • No longer generates the build/test-framework directory or molecule/test-cluster scenario
    • Adds new cluster scenario that can be used to test against an existing cluster
    • There is no longer any Ansible templating done in the deploy/ directory, any templates used for testing will be located in molecule/templates/ instead.
    • The scaffolded molecule.yml files now use the Ansible verifier. All asserts.yml files were renamed to verify.yml to reflect this.
    • The prepare/converge/verify tasks now make use of the new k8s wait option to simplify the deployment logic.
  • Operator user setup and entrypoint scripts no longer insert dynamic runtime user entries into /etc/passwd. To use dynamic runtime users, use a container runtime that supports it (e.g. CRI-O). (#2469)
  • Changed the scorecard basic test, Writing into CRs has an effect, to include the http.MethodPatch as part of its test criteria alongside http.MethodPut and http.MethodPost. (#2509)
  • Changed the scorecard to use the init-timeout configuration setting as a wait time when performing cleanup instead of a hard-coded time. (#2597)
  • Upgrade the Helm dependency version from v3.0.1 to v3.0.2. (#2621)
  • Changed the scaffolded serveCRMetrics to use the namespaces informed in the environment variable WATCH_NAMESPACE in the MultiNamespace scenario. (#2603)
  • Improve skip metrics logs when running the operator locally in order to make clear the information for Helm based operators. (#2603)

Deprecated

  • The type name TestCtx in pkg/test has been deprecated and renamed to Context. It now exists only as a type alias to maintain backwards compatibility. Users of the e2e framework should migrate to use the new name, Context. The TestCtx alias will be removed in a future version. (2549)

  • The additional of the dependency inotify-tools on Ansible based-operator images. (#2586)

  • Breaking Change: The scorecard feature now only supports YAML config files. So, any config file with other extension is deprecated and should be changed for the YAML format. For further information see scorecard config file (#2591)

Removed

  • Breaking Change: The additional Ansible sidecar container. (#2586)

Bug Fixes

  • Fixed issue with Go dependencies caused by removed tag in openshift/api repository (#2466)
  • Fixed a regression in the operator-sdk run command that caused --local flags to be ignored (#2478)
  • Fix command operator-sdk run --local which was not working on Windows. (#2481)
  • Fix ServiceMonitor creation when the operator is cluster-scoped and the environment variable WATCH_NAMESPACE has a different value than the namespace where the operator is deployed. (#2601)
  • Fix error faced when the ansible.operator-sdk/verbosity annotation for Ansible based-operators is 0 or less. (#2651)
  • Fix missing error status when the error faced in the Ansible do not return an event status. (#2661)

Note:

  • See how to upgrade your project to the version v0.16.0 by checking the Version Upgrade Guide
  • The release binaries have been updated to print the correct version. See #2724

v0.15.2

13 Feb 23:02
ffaf278
Compare
Choose a tag to compare

Changed

  • Operator user setup and entrypoint scripts no longer insert dynamic runtime user entries into /etc/passwd. To use dynamic runtime users, use a container runtime that supports it (e.g. CRI-O). (#2469)

Bug Fixes

  • Fixed a regression in the operator-sdk run command that caused --local flags to be ignored (#2478)

v0.15.1

28 Jan 00:20
v0.15.1
e35ec7b
Compare
Choose a tag to compare

Bug Fixes

  • Fixed issue with Go dependencies caused by removed tag in openshift/api repository (#2466)

v0.15.0

22 Jan 23:38
21a93ca
Compare
Choose a tag to compare

Added

Changed

  • Changed error wrapping according to Go version 1.13+ error handling. (#2355)
  • Added retry logic to the cleanup function from the e2e test framework in order to allow it to be achieved in the scenarios where temporary network issues are faced. (#2277)
  • Breaking Change: Moved olm-catalog gen-csv to the generate csv subcommand. (#2439)
  • Breaking Change: run ansible/helm are now the hidden commands exec-entrypoint ansible/helm. All functionality of each subcommand is the same. (#2441)
  • Breaking Change: up local is now run --local. All functionality of this command is the same. (#2441)
  • Breaking Change: Moved the olm subcommand from alpha to its own subcommand. All functionality of this command is the same. (#2447)

Bug Fixes

  • Fixed a regression in the helm-operator that caused all releases to be deployed in the same namespace that the operator was deployed in, regardless of which namespace the CR was created in. Now release resources are created in the same namespace as the CR. (#2414)
  • Fix issue when the test-framework would attempt to create a namespace exceeding 63 characters. pkg/test/NewCtx() now creates a unique id instead of using the test name. TestCtx.GetNamespace() uses this unique id to create a namespace that avoids this scenario. (#2335)

Note: See how to upgrade your project to the version v0.15.0 by checking the Version Upgrade Guide

v0.14.1

20 Jan 17:37
v0.14.1
1c3106a
Compare
Choose a tag to compare

Bug Fixes

  • Fixed a regression in the helm-operator that caused all releases to be deployed in the same namespace that the operator was deployed in, regardless of which namespace the CR was created in. Now release resources are created in the same namespace as the CR. (#2414)

Note: See how to upgrade your project to the version v0.14.1 by checking the Version Upgrade Guide

v0.14.0

10 Jan 23:26
v0.14.0
4fb185b
Compare
Choose a tag to compare

Added

  • Added new --bundle flag to the operator-sdk scorecard command to support bundle validation testing using the validation API (https://github.com/operator-framework/api). (#1916
  • Added new log field to the operator-sdk scorecard v1alpha2 output to support tests that produce logging. (#1916
  • Added new bundle validation test to the operator-sdk scorecard OLM tests. (#1916
  • Added scorecard test short names to each scorecard test to allow users to run a specific scorecard test using the selector flag. (#1916
  • Improve Ansible logs in the Operator container for Ansible-based Operators. (#2321)
  • Added support for override values with environment variable expansion in the watches.yaml file for Helm-based operators. (#2325)

Changed

  • Replace usage of github.com/operator-framework/operator-sdk/pkg/restmapper.DynamicRESTMapper with sigs.k8s.io/controller-runtime/pkg/client/apiutil.DynamicRESTMapper. (#2309)
  • Upgraded Helm operator packages and base image from Helm v2 to Helm v3. Cluster state for pre-existing CRs using Helm v2-based operators will be automatically migrated to Helm v3's new release storage format, and existing releases may be upgraded due to changes in Helm v3's label injection. (#2080)
  • Fail operator-sdk olm-catalog gen-csv if it is not run from a project's root, which the command already assumes is the case. (#2322)
  • Breaking Change: Extract custom Ansible module k8s_status, which is now provided by the operator_sdk.util Ansible collection. See developer_guide for new usage. (#2310)
  • Upgrade minimal Ansible version in the init projects from 2.6 to 2.9 for collections support. (#2310)
  • Improve skip metrics logs when running the operator locally in order to make clear the information. (#2190)
  • Upgrade controller-tools version from v0.2.2 to v0.2.4. (#2368)

Deprecated

  • Deprecated github.com/operator-framework/operator-sdk/pkg/restmapper in favor of the DynamicRESTMapper implementation in controller-runtime. (#2309)

Bug Fixes

  • Fix operator-sdk build's --image-build-args to support spaces within quotes like --label some.name="First Last". (#2312)
  • Fix misleading Helm operator "release not found" errors during CR deletion. (#2359)

Note: See how to upgrade your project to the version v0.14.0 by checking the Version Upgrade Guide

v0.13.0

10 Dec 21:47
v0.13.0
1af9c95
Compare
Choose a tag to compare

v0.13.0

Added

  • Support for vars in top level ansible watches. (#2147)
  • Support for "ansible.operator-sdk/verbosity" annotation on Custom Resources watched by Ansible based operators to override verbosity on an individual resource. (#2102)
  • Support for relative helm chart paths in the Helm operator's watches.yaml file. (#2287)
  • New operator-sdk generate crds subcommand, which generates CRDs from Go types. (#2276)
  • Go API code can now be annotated to populate a CSV's spec.customresourcedefinitions.owned field on invoking olm-catalog gen-csv. (#1162)

Changed

  • Upgrade minimal Ansible version in the init projects from 2.4 to 2.6. (#2107)
  • Upgrade Kubernetes version from kubernetes-1.15.4 to kubernetes-1.16.2. (#2145)
  • Upgrade Helm version from v2.15.0 to v2.16.1. (#2145)
  • Upgrade controller-runtime version from v0.3.0 to v0.4.0. (#2145)
  • Updated pkg/test/e2eutil.WaitForDeployment() and pkg/test/e2eutil.WaitForOperatorDeployment() to successfully complete waiting when the available replica count is at least (rather than exactly) the minimum replica count required. (#2248)
  • Replace in the Ansible based operators module tests k8s_info for k8s_facts which is deprecated. (#2168)
  • Upgrade the Ansible version from 2.8 to 2.9 on the Ansible based operators image. (#2168)
  • Updated CRD generation for non-Go operators to use valid structural schema. (#2275)
  • Replace Role verb "*" with list of verb strings in generated files so the Role is compatible with OpenShift and Kubernetes. (#2175)
  • Breaking change: An existing CSV's spec.customresourcedefinitions.owned is now always overwritten except for each name, version, and kind on invoking olm-catalog gen-csv when Go API code annotations are present. (#1162)

Deprecated

  • Deprecated the operator-sdk generate openapi command. CRD generation is still supported with operator-sdk generate crds. It is now recommended to use openapi-gen directly for OpenAPI code generation. The generate openapi subcommand will be removed in a future release. (#2276)

Bug Fixes

  • Fixed log formatting issue that occurred while loading the configuration for Ansible-based operators. (#2246)
  • Fix issue faced in the Ansible based operators when jmespath queries are used because it was not installed. (#2252)
  • Updates operator-sdk build for go operators to compile the operator binary based on Go's built-in GOARCH detection. This fixes an issue that caused an amd64 binary to be built into non-amd64 base images when using operator-sdk on non-amd64 architectures. (#2268)
  • Fix scorecard behavior such that a CSV file is read correctly when olm-deployed is set to true. (#2274)
  • A CSV config's operator-name field will be used if --operator-name is not set. (#2297)
  • Populates a CSV's spec.install strategy if either name or strategy body are missing with a deployment-type strategy. (#2298)
  • When the current leader pod has been hard evicted but not deleted, another pod is able to delete the evicted pod, triggering garbage collection and allowing leader election to continue. (#2210)

Note: See how to upgrade your project to the version v0.13.0 by checking the Version Upgrade Guide