Skip to content

Releases: operator-framework/operator-sdk

v0.11.0

11 Oct 21:55
v0.11.0
39c65c3
Compare
Choose a tag to compare

v0.11.0

Added

  • 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)
  • The operator-sdk olm-catalog gen-csv command now produces indented JSON for the alm-examples annotation. (#1793)
  • Added flag --dep-manager to command operator-sdk 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)
  • 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-linux for the operator-sdk binary 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 uninstall and olm status no longer use a --version flag 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.version is still supported, but users will see a warning message if spec.versions is not present and an error if spec.versions is populated but the version in spec.version is not in spec.versions. (#1876)
  • Upgrade base image for Go, Helm, and scorecard proxy from registry.access.redhat.com/ubi7/ubi-minimal:latest to registry.access.redhat.com/ubi8/ubi-minimal:latest. (#1952)
  • Upgrade base image for Ansible from registry.access.redhat.com/ubi7/ubi:latest to registry.access.redhat.com/ubi8/ubi:latest. (#1990 and #2004)
  • Updated kube-state-metrics dependency from v1.6.0 to v1.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.4 to kubernetes-1.14.1 (#1876)
  • Upgrade github.com/operator-framework/operator-lifecycle-manager version from b8a4faf68e36feb6d99a6aec623b405e587b17b1 to 0.10.1 (#1876)
  • Upgrade controller-runtime version from v0.1.12 to v0.2.0 (#1876)
    • The package sigs.k8s.io/controller-runtime/pkg/runtime/scheme is deprecated, and contains no code. Replace this import with sigs.k8s.io/controller-runtime/pkg/scheme where relevant.
    • The package sigs.k8s.io/controller-runtime/pkg/runtime/log is deprecated. Replace this import with sigs.k8s.io/controller-runtime/pkg/log where relevant.
    • The package sigs.k8s.io/controller-runtime/pkg/runtime/signals is deprecated. Replace this import with sigs.k8s.io/controller-runtime/pkg/manager/signals where relevant.
    • All methods on sigs.k8s.io/controller-runtime/pkg/client.Client (except for Get()) have been updated. Instead of each using a struct-typed or variadic functional option parameter, or having no option parameter, each now uses a variadic interface option parameter typed for each method. See List() below for an example.
    • sigs.k8s.io/controller-runtime/pkg/client.Client's List() method signature has been updated: List(ctx context.Context, opts *client.ListOptions, list runtime.Object) error is now List(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...)
  • pkg/test.FrameworkClient methods List() and Delete() have new signatures corresponding to the homonymous methods of sigs.k8s.io/controller-runtime/pkg/client.Client. (#1876)
  • 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)
  • 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)
  • 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. (#1943)

Removed

  • Removed flag --as-file from command operator-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-manager or inferred from top-level dependency manager files present if --dep-manager is not set. (#1819)

Bug Fixes

  • Configure the repo path correctly in operator-sdk add crd and 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-csv respect the --operator-name flag, channel names are checked for duplicates before (re-)generation. (#1693)
  • Generated inventory for Ansible-based Operators now sets the localhost's ansible_python_interpreter to {{ ansible_playbook_python }}, to properly match the implicit localhost. (#1952)
  • Fixed an issue in operator-sdk olm-catalog gen-csv where the generated CSV is missing the expected set of owned CRDs. (#2017)
  • The command operator-sdk olm-catalog gen-csv --csv-version=<version> --update-crds would fail to copy over CRD manifests into deploy/olm-catalog for manifests whose name didn't end with a _crd.yaml suffix. This has been fixed so gen-csv now copies all CRD manifests specified by deploy/olm-catalog/csv_config.yaml by checking the type of the manifest rather than the filename suffix. (#2015)
  • Added missing jmespath dependency to Ansible-based Operator .travis.yml file template. ([#2027](http...
Read more

v0.10.1

10 Oct 21:04
v0.10.1
872e7d9
Compare
Choose a tag to compare

v0.10.1

Bug Fixes

  • The command operator-sdk olm-catalog gen-csv --csv-version=<version> --update-crds would fail to copy over CRD manifests into deploy/olm-catalog for manifests whose name didn't end with a _crd.yaml suffix. This has been fixed so gen-csv now copies all CRD manifests specified by deploy/olm-catalog/csv_config.yaml by checking the type of the manifest rather than the filename suffix. (#2015)
  • Fixed an issue in operator-sdk olm-catalog gen-csv where the generated CSV is missing the expected set of owned CRDs. (#2017)
  • 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.10+ by checking the Version Upgrade Guide

v0.10.0

08 Aug 20:26
v0.10.0
ff80b17
Compare
Choose a tag to compare

Added

  • Document new compile-time dependency mercurial in user-facing documentation. (#1683)
  • Adds new flag --zap-time-encoding to the flagset provided by pkg/log/zap. This flag configures the timestamp format produced by the zap logger. See the logging doc for more information. (#1529)

Changed

  • 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)
  • Make ready package idempotent. Now, a user can call Set() or Unset() to set the operator's readiness without knowing the current state. (#1761)

Bug Fixes

  • Check if metadata.annotations['alm-examples'] is non-empty before creating contained CR manifests in the scorecard. (#1789)

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

v0.8.2

22 Jul 21:40
v0.8.2
28bd2b0
Compare
Choose a tag to compare

Bug Fixes

  • Fixes header file content validation when the content contains empty lines or centered text. (#1544)
  • Generated CSV's that include a deployment install strategy will be checked for a reference to metadata.annotations['olm.targetNamespaces'], and if one is not found a reference will be added to the WATCH_NAMESPACE env var for all containers in the deployment. This is a bug because any other value that references the CSV's namespace is incorrect. (#1396)
  • Build -trimpath was not being respected. $GOPATH was not expanding because exec.Cmd{} is not executed in a shell environment. (#1535)
  • Running the scorecard with --olm-deployed will now only use the first CR set in either the cr-manifest config option or the CSV's metadata.annotations['alm-examples'] as was intended, and access manifests correctly from the config. (#1565)
  • Use the correct domain names when generating CRD's instead that of the first CRD to be parsed. (#1636)

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

v0.9.0

12 Jul 20:42
v0.9.0
560208d
Compare
Choose a tag to compare

Note: an operator created or managed by this release requires that mercurial v3.9+ is installed to manage modules.

Added

  • Adds support for building OCI images with podman, e.g. operator-sdk build --image-builder=podman. (#1488)
  • New option for operator-sdk up local --enable-delve, which can be used to start the operator in remote debug mode with the delve debugger listening on port 2345. (#1422)
  • Enables controller-runtime metrics in Helm operator projects. (#1482)
  • New flags --vendor and --skip-validation for operator-sdk new that direct the SDK to initialize a new project with a vendor/ directory, and without validating project dependencies. vendor/ is not written by default. (#1519)
  • Generating and serving info metrics about each custom resource. By default these metrics are exposed on port 8686. (#1277)
  • Scaffold a pkg/apis/<group>/group.go package file to avoid go/build errors when running Kubernetes code generators. (#1401)
  • Adds a new extra variable containing the unmodified CR spec for ansible based operators. #1563
  • New flag --repo for subcommands new and migrate specifies the repository path to be used in Go source files generated by the SDK. This flag can only be used with Go modules. (#1475)
  • Adds --go-build-args flag to operator-sdk build for providing additional Go build arguments. (#1582)
  • New flags --csv-channel and --default-channel for subcommand gen-csv that add channels to and update the package manifest in deploy/olm-catalog/<operator-name> when generating a new CSV or updating an existing one. (#1364)
  • Adds go.mod and go.sum to switch from dep to Go modules to manage dependencies for the SDK project itself. (#1566)
  • New flag --operator-name for operator-sdk olm-catalog gen-csv to specify the operator name, ex. memcached-operator, to use in CSV generation. The project's name is used (old behavior) if --operator-name is not set. (#1571)
  • New flag --local-operator-flags for operator-sdk test local --up-local to specify flags to run a local operator with during a test. (#1509)

Changed

  • Upgrade the version of the dependency controller-runtime from v0.1.10 to v0.1.12. (#1612)
  • Remove TypeMeta declaration from the implementation of the objects (#1462)
  • Relaxed API version format check when parsing pkg/apis in code generators. API dir structures can now be of the format pkg/apis/<group>/<anything>, where <anything> was previously required to be in the Kubernetes version format, ex. v1alpha1. (#1525)
  • The SDK and operator projects will work outside of $GOPATH/src when using Go modules. (#1475)
  • CreateMetricsService() function from the metrics package accepts a REST config (*rest.Config) and an array of ServicePort objects ([]v1.ServicePort) as input to create Service metrics. CRPortName constant is added to describe the string of custom resource port name. (#1560 and #1626)
  • Changed the flag --skip-git-init to --git-init. This changes the default behavior of operator-sdk new to not initialize the new project directory as a git repository with git init. This behavior is now opt-in with --git-init. (#1588)
  • operator-sdk new will no longer create the initial commit for a new project, even with --git-init=true. (#1588)
  • When errors occur setting up the Kubernetes client for RBAC role generation, operator-sdk new --type=helm now falls back to a default RBAC role instead of failing. (#1627)

Removed

  • The SDK no longer depends on a vendor/ directory to manage dependencies only if using Go modules. The SDK and operator projects will only use vendoring if using dep, or modules and a vendor/ dir is present. (#1519)
  • Breaking change: ExposeMetricsPort is removed and replaced with CreateMetricsService() function. PrometheusPortName constant is replaced with OperatorPortName. (#1560)
  • Removes Gopkg.toml and Gopkg.lock to drop the use of dep in favor of Go modules to manage dependencies for the SDK project itself. (#1566)

Bug Fixes

  • Generated CSV's that include a deployment install strategy will be checked for a reference to metadata.annotations['olm.targetNamespaces'], and if one is not found a reference will be added to the WATCH_NAMESPACE env var for all containers in the deployment. This is a bug because any other value that references the CSV's namespace is incorrect. (#1396)
  • Build -trimpath was not being respected. $GOPATH was not expanding because exec.Cmd{} is not executed in a shell environment. (#1535)
  • Running the scorecard with --olm-deployed will now only use the first CR set in either the cr-manifest config option or the CSV's metadata.annotations['alm-examples'] as was intended, and access manifests correctly from the config. (#1565)
  • Use the correct domain names when generating CRD's instead that of the first CRD to be parsed. (#1636)

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

v0.8.1

22 May 21:22
v0.8.1
33b3bfe
Compare
Choose a tag to compare

v0.8.1

Bug Fixes

  • Fixes a regression that causes Helm RBAC generation to contain an empty custom ruleset when the chart's default manifest contains only namespaced resources. (#1456)
  • Fixes an issue that causes Helm RBAC generation to fail when creating new operators with a Kubernetes context configured to connect to an OpenShift cluster. (#1461)

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

v0.8.0

17 May 21:25
v0.8.0
78c4724
Compare
Choose a tag to compare

v0.8.0

Added

  • New option for operator-sdk build --image-builder, which can be used to specify which image builder to use. Adds support for buildah. (#1311)
  • Manager is now configured with a new DynamicRESTMapper, which accounts for the fact that the default RESTMapper, which only checks resource types at startup, can't handle the case of first creating a CRD and then an instance of that CRD. (#1329)
  • Unify CLI debug logging under a global --verbose flag (#1361)
  • Go module support by default for new Go operators and during Ansible and Helm operator migration. The dependency manager used for a new operator can be explicitly specified for new operators through the --dep-manager flag, available in operator-sdk new and operator-sdk migrate. dep is still available through --dep-manager=dep. (#1001)
  • New optional flag --custom-api-import for operator-sdk add controller to specify that the new controller reconciles a built-in or external Kubernetes API, and what import path and identifier it should have. (#1344)
  • Operator Scorecard plugin support (#1379). Documentation for the scorecard plugins API will be added in PR #1433.

Changed

  • When Helm operator projects are created, the SDK now generates RBAC rules in deploy/role.yaml based on the chart's default manifest. (#1188)
  • When debug level is 3 or higher, we will set the klog verbosity to that level. (#1322)
  • Relaxed requirements for groups in new project API's. Groups passed to operator-sdk add api's --api-version flag can now have no subdomains, ex core/v1. See (#1191) for discussion. (#1313)
  • Renamed --docker-build-args option to --image-build-args option for build subcommand, because this option can now be shared with other image build tools than docker when --image-builder option is specified. (#1311)
  • Reduces Helm release information in CR status to only the release name and manifest and moves it from status.conditions to a new top-level deployedRelease field. (#1309)
    • WARNING: Users with active CRs and releases who are upgrading their helm-based operator should upgrade to one based on v0.7.0 before upgrading further. Helm operators based on v0.8.0+ will not seamlessly transition release state to the persistent backend, and will instead uninstall and reinstall all managed releases.
  • Go operator CRDs are overwritten when being regenerated by operator-sdk generate openapi. Users can now rely on +kubebuilder annotations in their API code, which provide access to most OpenAPIv3 validation properties (the full set will be supported in the near future, see this PR) and other CRD fields. (#1278)
  • Use registry.access.redhat.com/ubi7/ubi-minimal:latest base image for the Go and Helm operators and scorecard proxy (#1376)
  • Allow "Owned CRDs Have Resources Listed" scorecard test to pass if the resources section exists

Deprecated

Removed

  • The SDK will no longer run defaulter-gen on running operator-sdk generate k8s. Defaulting for CRDs should be handled with mutating admission webhooks. (#1288)
  • The --version flag was removed. Users should use the operator-sdk version command. (#1444)
  • Breaking Change: The test cluster subcommand and the corresponding --enable-tests flag for the build subcommand have been removed (#1414)
  • Breaking Change: The --cluster-scoped flag for operator-sdk new has been removed so it won't scaffold a cluster-scoped operator. Read the operator scope documentation on the changes needed to run a cluster-scoped operator. (#1434)

Bug Fixes

  • In Helm-based operators, when a custom resource with a failing release is reverted back to a working state, the ReleaseFailed condition is now correctly removed. (#1321)
  • operator-sdk generate openapi no longer overwrites CRD values derived from +kubebuilder annotations in Go API code. See issues (#1212) and (#1323) for discussion. (#1278)
  • Running operator-sdk gen-csv on operators that do not have a CRDs directory, ex. deploy/crds, or do not have any owned CRDs, will not generate a "deploy/crds not found" error.

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

v0.7.1

18 May 00:55
v0.7.1
0edd823
Compare
Choose a tag to compare
v0.7.1 Pre-release
Pre-release

v0.7.1

Bug Fixes

  • Pin dependency versions in Ansible build and test framework Dockerfiles to fix broken build and test framework images. (#1348)
  • In Helm-based operators, when a custom resource with a failing release is reverted back to a working state, the ReleaseFailed condition is now correctly removed. (#1321)

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

v0.7.0

05 Apr 18:36
v0.7.0
7e07b20
Compare
Choose a tag to compare
v0.7.0 Pre-release
Pre-release

v0.7.0

Added

Changed

  • Updated the helm-operator to store release state in kubernetes secrets in the same namespace of the custom resource that defines the release. (#1102)
    • WARNING: Users with active CRs and releases who are upgrading their helm-based operator should not skip this version. Future versions will not seamlessly transition release state to the persistent backend, and will instead uninstall and reinstall all managed releases.
  • Change namespace-manifest flag in scorecard subcommand to namespaced-manifest to match other subcommands
  • Subcommands of operator-sdk generate are now verbose by default. (#1271)
  • operator-sdk olm-catalog gen-csv parses Custom Resource manifests from deploy/crds or a custom path specified in csv-config.yaml, encodes them in a JSON array, and sets the CSV's metadata.annotations.alm-examples field to that JSON. (#1116)

Bug Fixes

  • Fixed an issue that caused operator-sdk new --type=helm to fail for charts that have template files in nested template directories. (#1235)
  • Fix bug in the YAML scanner used by operator-sdk test and operator-sdk scorecard that could result in a panic if a manifest file started with --- (#1258)

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

v0.6.0

15 Mar 23:58
61e0c23
Compare
Choose a tag to compare
v0.6.0 Pre-release
Pre-release

v0.6.0

Added

  • New flags for operator-sdk new --type=helm, which can be used to populate the project with an existing chart. (#949)
  • Command operator-sdk olm-catalog flag --update-crds optionally copies CRD's from deploy/crds when creating a new CSV or updating an existing CSV, and --from-version uses another versioned CSV manifest as a base for a new CSV version. (#1016)
  • New flag --olm-deployed to direct the scorecard command to only use the CSV at --csv-path for manifest data, except for those provided to --cr-manifest. (#1044)

Changed

  • Changed the Go, Helm, and Scorecard base images to registry.access.redhat.com/ubi7-dev-preview/ubi-minimal:7.6 (#1142)
  • CSV manifest are now versioned according to the operator-registry manifest format. See issue #900 for more details. (#1016)
  • Unexported CleanupNoT function from pkg/test, as it is only intended to be used internally (#1167)

Bug Fixes

  • Fix issue where running operator-sdk test local --up-local would sometimes leave a running process in the background after exit (#1089)

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