Releases: operator-framework/operator-sdk
Releases · operator-framework/operator-sdk
v0.19.2
v1.0.0-alpha.1
v1.0.0-alpha.1
For documentation on this release, please visit https://master.sdk.operatorframework.io.
This site tracks the master branch, so documentation updates based on feedback from this alpha release will automatically be reflected until v1.0.0 is released.
Additions
- The
snakeCaseParametersoption has been added to thewatches.yamlfor Ansible-based Operators. This allows the user to configure whether parameters in the resource spec are automatically converted fromcamelCasetosnake_case. The default istrue, so there is no behavior change for existing operators, but it can now be disabled. (#3245) - Added
projectNamekey to the PROJECT config file (v3-alpha+). (#3438) - Added the
--from-versionflag togenerate packagemanifests. (#3509) - The
generate bundlecommand now adds scorecard bundle metadata tobundle.Dockerfileandannotations.yamlif--overwriteis set (the default in a project'sMakefile) or both files do not exist. (#3474) - Added
config/scorecardkustomize scaffolds toinit. (#3490)
Changes
- Use structured logging in Ansible and Helm operator base images when printing version information. (#3564)
- The Ansible and Helm-based operators now use the controller-runtime's lease-based leader election instead of SDK's leader-for-life mechanism. (#3457) & (#3446)
- Breaking change: Added
--metrics-addrflag to the Ansible and Helm-based operators to make it configurable, and changed the default port from:8383to:8080. (#3489) & (#3440) - Breaking change: Changed domain suffix used for plugins and CR annotations to consistently use
.sdk.operatorframework.io. (#3527) - Breaking change: Removed the implementation for
EnqueueRequestForAnnotationhandler from the SDK repository and referenced it from operator-lib instead. (#3506) - Breaking change: The Ansible operator implementation in
pkg/ansiblewas moved tointernal/ansible. (#3560) - Breaking change: The Helm operator implementation in
pkg/helmwas moved tointernal/helm. (#3537) - Breaking change: The Ansible operator's
--max-workersflag andWORKERS_<Kind>_<Group>environment variable have been renamed to--max-concurrent-reconcilesandMAX_CONCURRENT_RECONCILES_<Kind>_<Group>respectively. (#3452) - Breaking change: The
metavariable passed to Ansible playbooks and roles has been renamed toansible_operator_meta. (#3562) - Breaking change: The scorecard configuration is now implemented as a componentconfig object and now includes a new top-level
stagesfield, which allows users to define stages of tests and to enable parallelism within each stage. (#3490) & (#3434) - When a namespace is not provided on the command line, the scorecard command now looks for a namespace in the kubeconfig. If a namespace can not be found in the kubeconfig file, then 'default' is used. (#3478)
- Use on-disk bundle metadata in scorecard (either unpacked from an image or directly if a directory is passed) as the source of truth for bundle metadata, and not image labels which are informative only. (#3450)
- Breaking change: The
alpha scorecardcommand has been promoted to the standard scorecard command. (#3444) - Breaking change: Changed scorecard text and json output to use a
v1alpha3.TestListinstead of aggregating all test results under a singlev1alpha3.Testand set exit status to 1 when a test fails. (#3427) - Ansible & Helm-based Operators switched to using the
InstrumentedEnqueueRequestForObjectfrom operator-lib instead of controller-runtime'sEnqueueRequestForObject. (#3523)
Removals
- Breaking change: Removed support for the legacy layout. Operator SDK has a new CLI and project layout that is aligned with Kubebuilder. (#3327) (#3343) (#3547) (#3566) (#3343) (#3466) (#3531) (#3451) (#3414) (#3414) (#3414) (#3414) (#3385) (#3406)
- Breaking change: Moved
pkg/log/zaptointernal/log/zap, therefore it is no longer a public API. (#3525) - Breaking change: Removed
pkg/predicate:ResourceFilterPredicate. (#3532) - Breaking change: Refactored and moved
pkg/predicate.GenerationChangedPredicate(see this operator-lib PR for details). (#3532) - Breaking change: Removed
testsubcommand and the test frameworkpkg/test. (#3409) - Breaking change: Removed
pkg/k8sutilsand its helpers methodsGetWatchNamespace(),GetOperatorNamespace(),GetOperatorName(),ResourceExists(),GetPod(),GetGVKsFromAddToScheme()andSupportsOwnerReference(). (#3475) - Breaking change: Removed
pkg/kube-metricsand its associated helpersNewNamespacedMetricsStores(),NewClusterScopedMetricsStores(),ServeMetrics(), andGenerateAndServeCRMetrics(). (#3484) - Breaking change: Removed
pkg/leaderandpkg/status. These are now part of operator-lib. (#3503) - Breaking change: Removed
pkg/metricsand its helpersGenerateAndServeCRMetrics()andGetNamespacesForMetrics(). (#3484) - Breaking change: Removed
pkg/readyand its helper utilsReady,Set(),Unset(). (#3476) - Breaking change: Removed
pkg/tlssince that pkg is a leftover from an earlier effort to make certificate management easier, but was abandoned in favor of alternatives like cert-manager. (#3468)
Bug Fixes
- Fixed a bug that caused the Ansible operator not to set the environment variables
ANSIBLE_ROLES_PATHandANSIBLE_COLLECTIONS_PATHbased on the flags--ansible-roles-pathand--ansible-collections-path. (#3549) - Use group and kind instead of only kind when parsing manifests in the CSV generator to avoid marshaling them into the wrong Go types. (#3334)
- Fixed issue that caused scorecard to fail loading local bundle due to a bug search method for the bundle metadata directory. (#3408)
- Fixed CVE-2020-14040 by updating to
golang.org/x/text/0.3.3. (#3458) - The
scorecardsubcommand now removes existing pods if the--wait-timedeadline is exceeded and--skip-cleanup=false(the default). Fixes #3419. (#3526) - Fixed a bug in scorecard that caused tests to fail with permission errors when loading the bundle. (#3428)
v0.19.1
For documentation on this release, please visit https://v0-19-x.sdk.operatorframework.io/.
Additions
- Added the
--from-versionflag togenerate packagemanifests. (#3524)
Bug Fixes
- Fixed a bug that caused the Ansible operator not to set the environment variables
ANSIBLE_ROLES_PATHandANSIBLE_COLLECTIONS_PATHbased on the flags--ansible-roles-pathand--ansible-collections-path. (#3565)
v0.19.0
Note: this release includes ansible-operator and helm-operator binaries built for all corresponding image build architectures. See #3327 for details.
Additions
- Add "panic" level for --zap-stacktrace-level (allows "debug", "info", "error", "panic"). (#3040)
- The
operator-sdkbinary has a new CLI workflow and project layout for scaffolding Go operators that is aligned with Kubebuilder's CLI and project layout. See the new Quickstart Guide and the new CLI reference for more details. (#3190) bundle validatecan now use a containerd image ("none") tool to unpack images, removing the need for an external image tool like docker/podman. (#3222)- The SDK
scorecardcommand adds a new test image, scorecard-test-kuttl, that allows end users to write and execute kuttl based tests. (#3278) - Add "--olm-namespace" flag to olm subcommands (install, uninstall) to allow users to specify the namespace where olm is to be installed or uninstalled. (#3300)
- Add sdk annotations to bundle resources (CSVs,
annotations.yamlandbundle.dockerfile). (#3120) - Add "--version" flag to olm subcommands (uninstall, status) to allow users to override the version of olm inferred from packageserver's CSV. (#3279)
- Alias
run packagemanifestsasrun pm. (#3314) - Add
generate kustomize manifestssubcommand for new project layouts. (#3258) - Add
generate packagemanifestssubcommand for legacy project layouts. (#3149) - Add
generate packagemanifestssubcommand for new project layouts. (#3096) - Added predicate filtering function for labels based on selectors specified in watches.yaml. Events of resources that match the selector's labels will be skipped. (#3275)
- Add builds for
ansible-operatorandhelm-operatorbinaries. (#3363) - Add new scorecard APIVersion "osdk.openshift.io/v1alpha3" and types. (#3125)
Changes
- Breaking change: Prevent the ansible-operator from mangling variables containing the uppercase representations of special words (e.g IP, HTTP, etc). (#3265)
- Breaking change: In Helm-based operators, the
UpdateSuccessfulcondition reason was renamed toUpgradeSuccessfulto better align with Helm nomenclature. (#3345) - Breaking change: In Helm-based operators, the
UpdateErrorcondition reason was renamed toUpgradeErrorto better align with Helm nomenclature. (#3269) - Upgrade Helm dependency for Helm based-Operators from
v3.2.0tov3.2.4in order to fix CVE-2020-4053. (#3313) - Change default value of
--overwriteflag inoperator-sdk generate bundleto true. (#3280) - The scorecard-test-kuttl image was updated to be based off the v0.5.1 version of kudobuilder/kuttl. This update fixes bugs found in kuttl v0.5.0. (#3369)
- The
alpha scorecardsubcommand now outputs results as a scorecard.operatorframework.io/v1alpha3 Test instead of a scorecard.operatorframework.io/v1alpha2 ScorecardOutput. As a result, the--listargument will now just output a list of tests, without associated labels. (#3208)
Removals
- The
operator-sdk newcommand no longer supports scaffolding new Go projects with the--type=Goflag. To scaffold new projects, users are expected to useoperator-sdk initas part of the new CLI for Go operators. (#3190)
Deprecations
- With the introduction of the new Kubebuilder aligned CLI and project layout for Go operators, the old CLI will still continue to work for Go projects scaffolded in the old layout with
operator-sdk new. However the old CLI is now deprecated and will be removed in a future release. (#3190) - The migrate sub-command is deprecated. (#3319)
- Deprecate 'operator-sdk add crd'. Use 'operator-sdk add api' instead. (#3180)
bundle createis deprecated in favor of a combination ofgenerate bundleanddocker build -f bundle.Dockerfile .... (#3323)generate csvis deprecated in favor ofgenerate bundleorgenerate packagemanifests. (#3322)- The flag
--git-initin thenewcommand was deprecated. (#3241)
Bug Fixes
- Fix leader election of follower showing that an old leader will be evicted when the current leader is healthy. (#3059)
- Fix bug in
operator-sdk bundle validationthat causes erroneous validation errors when the number of annotations in an existingannotations.yamldoes not equal the number of default bundle annotations by upgrading theoperator-registrydependency. (#3221) - Fix the download URL for the
tinibinary on ARM64 for the ansible operator base image. (#3234) - The
generate crdssubcommand now checks for the existence of thepkg/apisdirectory and logs a descriptive fatal error message if it does not exist or is not a directory. (#3091) - Fix bug in
bundle validatethat erroneously causes errors when a CRD manifest contains versions not present in a bundled CSV by bumping the api library version. (#3282) - Bump api validation library to fix "CRD key not found" validation bug. (#3154)
v0.17.2
v0.18.2
Bug Fixes
- Fix bug in
operator-sdk bundle validatethat causes erroneous validation errors when the number of annotations in an existingannotations.yamldoes not equal the number of default bundle annotations by upgrading theoperator-registrydependency. (#3284) - Fix the download URL for the
tinibinary on ARM64 for the ansible operator base image. (#3286) - Fix bug in
bundle validatethat erroneously causes errors when a CRD manifest contains versions not present in a bundled CSV by bumping the api library version. (#3288)
v0.18.1
v0.18.0
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
--interactiveto the commandoperator-sdk generate csvin order to enable working with interactive prompts while generating CSV. (#2891) - Add new hidden alpha flag
--outputto print the result ofoperator-sdk bundle validatein 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/v1beta1toapiextensions.k8s.io/v1for commands that create or generate CRDs. (#2874) - Changed default API version for new Helm-based operators to
helm.operator-sdk/v1alpha1. Thek8s.iodomain 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-toolsas a dependency of Ansible based-operator images which was deprecated and it will no longer scaffold the/bin/ao-logswhich 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
healthzendpoint is successfully called. (#3102)
v0.17.1
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-forceannotation 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
v0.17.0
Added
- Added support for generating kube-state-metrics metrics for cluster-scoped resources. Also added
pkg/kubemetrics.NewNamespacedMetricsStoresandpkg/kubemetrics.NewClusterScopedMetricsStoresto support this new feature. (#2809) - Added the
generate csv --deploy-dir --apis-dir --crd-dirflags 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 orgenerate csv -hhelp text for more details. (#2511) - Added the
generate csv --output-dirflag to allow configuring the output location for the catalog directory. (#2511) - The flag
--watch-namespaceand--operator-namespacewas added tooperator-sdk run --local,operator-sdk test --localandoperator-sdk cleanupcommands in order to replace the flag--namespacewhich was deprecated.(#2617) - The methods
ctx.GetOperatorNamespace()andctx.GetWatchNamespace()was addedpkg/testin order to replacectx.GetNamespace()which is deprecated. (#2617) - The
--crd-versionflag was added to thenew,add api,add crd, andgenerate crdscommands so that users can opt-in tov1CRDs. (#2684) - The printout for the compatible Kubernetes Version #2446
- The
--output-dirflag instructsoperator-sdk bundle createto write manifests and metadata to a non-default directory. (#2715) - The
--overwriteflag instructsoperator-sdk bundle createto overwrite metadata, manifests, andbundle.Dockerfile. (#2715) operator-sdk bundle validatenow accepts either an image tag or a directory arg. If the arg is a directory, its children must contain amanifests/and ametadata/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-manifestsflag directsoperator-sdk generate csvto create amanifests/directory for the latest operator bundle, including CRDs. This flag is set by default. (#2776) operator-sdk run --olmsupports the new operator metadata format inmetadata/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.2tov1.17.4. (#2715) - Upgrade
controller-runtimeversion fromv0.4.0tov0.5.2. (#2715) - Upgrade
controller-toolsversion fromv0.2.4tov0.2.8. (#2715) - Upgrade
helmversion fromv3.0.2tov3.1.2. (#2715) - Upgrade
prometheus-operatorversion fromv0.34.0tov0.38.0. (#2715) - Upgrade
operator-registryversion fromv1.5.7tov1.6.2. (#2715) - Breaking Change:
operator-sdk bundle createnow creates amanifests/directory under the parent directory of the argument passed to--directory, and setting--generate-only=truewrites a Dockerfile to<project-root>/bundle.Dockerfilethat copies bundle manifests from thatmanifests/directory. (#2715) - Upgrade Kind used for tests for Ansible based-operators from
1.16to1.17. (#2753) - Breaking Change: Upgrade Molecule for Ansible-based operators from
2.22to3.0.2. For instructions on upgrading your project to use the V3 Molecule version see here. (#2749) - Breaking Change: Changed Conditions from
map[ConditionType]Conditionto[]Condition. (#2739) - Setting
operator-sdk generate csv --output-dirwill search the output directory for bundles before searching the default location. (#2776)
Deprecated
- Deprecated
pkg/kubemetrics.NewMetricsStores. Usepkg/kubemetrics.NewNamespacedMetricsStoresinstead. (#2809) - Breaking Change: The
--namespaceflag fromoperator-sdk run --local,operator-sdk test --localandoperator-sdk cleanupcommand was deprecated and will be removed in the future versions. Use--watch-namespaceand--operator-namespaceinstead of. (#2617) - Breaking Change: The method
ctx.GetNamespace()from thepkg/testis deprecated and will be removed in future versions. Usectx.GetOperatorNamespace()andctx.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. Useoperator-sdk bundle createto manage operator bundle metadata. (#2755)
Removed
- Breaking Change: remove
pkg/restmapperwhich was deprecated inv0.14.0. Projects that use this package must switch to theDynamicRESTMapperimplementation in controller-runtime. (#2544) - Breaking Change: remove deprecated
operator-sdk generate openapisubcommand. (#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 viagenerate csv --output-dir. (#2511)
Bug Fixes
- The Ansible Operator proxy server now properly supports the Pod
execAPI (#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/testno longer double-registers the--kubeconfigflag. Related bug: kubernetes-sigs/controller-runtime#878. (#2731) - The command
operator-sdk generate k8sno longer requires users to explicitly set GOROOT in their environment. Now, GOROOT is detected usinggo env GOROOTand set automatically. (#2754) operator-sdk generate csvandoperator-sdk test localnow 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 ...