v0.9.0
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
foroperator-sdk new
that direct the SDK to initialize a new project with avendor/
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 avoidgo/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 subcommandsnew
andmigrate
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 tooperator-sdk build
for providing additional Go build arguments. (#1582) - New flags
--csv-channel
and--default-channel
for subcommandgen-csv
that add channels to and update the package manifest indeploy/olm-catalog/<operator-name>
when generating a new CSV or updating an existing one. (#1364) - Adds
go.mod
andgo.sum
to switch fromdep
to Go modules to manage dependencies for the SDK project itself. (#1566) - New flag
--operator-name
foroperator-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
foroperator-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
tov0.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 formatpkg/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 ofoperator-sdk new
to not initialize the new project directory as a git repository withgit 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 usingdep
, or modules and avendor/
dir is present. (#1519) - Breaking change:
ExposeMetricsPort
is removed and replaced withCreateMetricsService()
function.PrometheusPortName
constant is replaced withOperatorPortName
. (#1560) - Removes
Gopkg.toml
andGopkg.lock
to drop the use ofdep
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 theWATCH_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 becauseexec.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 thecr-manifest
config option or the CSV'smetadata.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