Skip to content

v0.9.0

Compare
Choose a tag to compare
@estroz estroz released this 12 Jul 20:42
· 2007 commits to master since this release
v0.9.0
560208d

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