Releases: operator-framework/operator-sdk
v0.10.0
Added
- Document new compile-time dependency
mercurialin user-facing documentation. (#1683) - Adds new flag
--zap-time-encodingto the flagset provided bypkg/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-pathis nowrole-pathsand takes a list of strings. Users can now specify multipleRoleandClusterRolemanifests usingrole-paths. (#1704) - Make
readypackage idempotent. Now, a user can callSet()orUnset()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
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 theWATCH_NAMESPACEenv 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
-trimpathwas not being respected.$GOPATHwas not expanding becauseexec.Cmd{}is not executed in a shell environment. (#1535) - Running the scorecard with
--olm-deployedwill now only use the first CR set in either thecr-manifestconfig 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.8+ by checking the Version Upgrade Guide
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
--vendorand--skip-validationforoperator-sdk newthat 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.gopackage file to avoidgo/builderrors when running Kubernetes code generators. (#1401) - Adds a new extra variable containing the unmodified CR spec for ansible based operators. #1563
- New flag
--repofor subcommandsnewandmigratespecifies 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-argsflag tooperator-sdk buildfor providing additional Go build arguments. (#1582) - New flags
--csv-channeland--default-channelfor subcommandgen-csvthat 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.modandgo.sumto switch fromdepto Go modules to manage dependencies for the SDK project itself. (#1566) - New flag
--operator-nameforoperator-sdk olm-catalog gen-csvto specify the operator name, ex.memcached-operator, to use in CSV generation. The project's name is used (old behavior) if--operator-nameis not set. (#1571) - New flag
--local-operator-flagsforoperator-sdk test local --up-localto specify flags to run a local operator with during a test. (#1509)
Changed
- Upgrade the version of the dependency controller-runtime from
v0.1.10tov0.1.12. (#1612) - Remove TypeMeta declaration from the implementation of the objects (#1462)
- Relaxed API version format check when parsing
pkg/apisin 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/srcwhen 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.CRPortNameconstant is added to describe the string of custom resource port name. (#1560 and #1626)- Changed the flag
--skip-git-initto--git-init. This changes the default behavior ofoperator-sdk newto not initialize the new project directory as a git repository withgit init. This behavior is now opt-in with--git-init. (#1588) operator-sdk newwill 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=helmnow 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:
ExposeMetricsPortis removed and replaced withCreateMetricsService()function.PrometheusPortNameconstant is replaced withOperatorPortName. (#1560) - Removes
Gopkg.tomlandGopkg.lockto drop the use ofdepin 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_NAMESPACEenv 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
-trimpathwas not being respected.$GOPATHwas not expanding becauseexec.Cmd{}is not executed in a shell environment. (#1535) - Running the scorecard with
--olm-deployedwill now only use the first CR set in either thecr-manifestconfig 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
v0.8.1
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
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 defaultRESTMapper, 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
--verboseflag (#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-managerflag, available inoperator-sdk newandoperator-sdk migrate.depis still available through--dep-manager=dep. (#1001) - New optional flag
--custom-api-importforoperator-sdk add controllerto 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.yamlbased 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-versionflag can now have no subdomains, excore/v1. See (#1191) for discussion. (#1313) - Renamed
--docker-build-argsoption to--image-build-argsoption forbuildsubcommand, because this option can now be shared with other image build tools than docker when--image-builderoption is specified. (#1311) - Reduces Helm release information in CR status to only the release name and manifest and moves it from
status.conditionsto a new top-leveldeployedReleasefield. (#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+kubebuilderannotations 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:latestbase 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-genon runningoperator-sdk generate k8s. Defaulting for CRDs should be handled with mutating admission webhooks. (#1288) - The
--versionflag was removed. Users should use theoperator-sdk versioncommand. (#1444) - Breaking Change: The
test clustersubcommand and the corresponding--enable-testsflag for thebuildsubcommand have been removed (#1414) - Breaking Change: The
--cluster-scopedflag foroperator-sdk newhas 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
ReleaseFailedcondition is now correctly removed. (#1321) operator-sdk generate openapino longer overwrites CRD values derived from+kubebuilderannotations in Go API code. See issues (#1212) and (#1323) for discussion. (#1278)- Running
operator-sdk gen-csvon 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
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
ReleaseFailedcondition 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
v0.7.0
Added
- New optional flag
--header-filefor commandsoperator-sdk generate k8sandoperator-sdk add apito supply a boilerplate header file for generated code. (#1239)
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-manifestflag in scorecard subcommand tonamespaced-manifestto match other subcommands - Subcommands of
operator-sdk generateare now verbose by default. (#1271) operator-sdk olm-catalog gen-csvparses Custom Resource manifests fromdeploy/crdsor a custom path specified incsv-config.yaml, encodes them in a JSON array, and sets the CSV'smetadata.annotations.alm-examplesfield to that JSON. (#1116)
Bug Fixes
- Fixed an issue that caused
operator-sdk new --type=helmto fail for charts that have template files in nested template directories. (#1235) - Fix bug in the YAML scanner used by
operator-sdk testandoperator-sdk scorecardthat 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
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-catalogflag--update-crdsoptionally copies CRD's fromdeploy/crdswhen creating a new CSV or updating an existing CSV, and--from-versionuses another versioned CSV manifest as a base for a new CSV version. (#1016) - New flag
--olm-deployedto direct thescorecardcommand to only use the CSV at--csv-pathfor 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-registrymanifest format. See issue #900 for more details. (#1016) - Unexported
CleanupNoTfunction frompkg/test, as it is only intended to be used internally (#1167)
Bug Fixes
- Fix issue where running
operator-sdk test local --up-localwould 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
v0.5.0
v0.5.0
Added
- Updated the Kubernetes dependencies to
1.13.1(#1020) - Updated the controller-runtime version to
v0.1.10. See the controller-runtimev0.1.10release notes for new features and bug fixes. (#1020) - By default the controller-runtime metrics are exposed on port 8383. This is done as part of the scaffold in the main.go file, the port can be adjusted by modifying the
metricsPortvariable. #786 - A new command
operator-sdk olm-catalogto be used as a parent for SDK subcommands generating code related to Operator Lifecycle Manager (OLM) Catalog integration, and subcommandoperator-sdk olm-catalog gen-csvwhich generates a Cluster Service Version for an operator so the OLM can deploy the operator in a cluster. (#673) - Helm-based operators have leader election turned on by default. When upgrading, add environment variable
POD_NAMEto your operator's Deployment using the Kubernetes downward API. To see an example, runoperator-sdk new --type=helm ...and see filedeploy/operator.yaml. #1000 - A new command
operator-sdk generate openapiwhich generates OpenAPIv3 validation specs in Go and in CRD manifests as YAML. (#869) - The
operator-sdk add apicommand now generates OpenAPIv3 validation specs in Go for that API, and in all CRD manifests as YAML.
Changed
- In new Helm operator projects, the scaffolded CR
specfield now contains the default values.yaml from the generated chart. (#967)
Note: See how to upgrade your project to the version v0.5+ by checking the Version Upgrade Guide
v0.4.1
v0.4.1
Bug Fixes
- Make
up localsubcommand respectKUBECONFIGenv var (#996) - Make
up localsubcommand use default namespace set in kubeconfig instead of hardcodeddefaultand also add ability to watch all namespaces for ansible and helm type operators (#996) - Added k8s_status modules back to generation (#972)
- Update checks for gvk registration to cover all cases for ansible (#973 & #1019)
- Update reconciler for ansible and helm to use the cache rather than the API client. (#1022 & #1048 & #1054)
- Update reconciler to will update the status everytime for ansible (#1066)
- Update ansible proxy to recover dependent watches when pod is killed (#1067)
- Update ansible proxy to handle watching cluster scoped dependent watches (#1031)
Note: See how to upgrade your project to the version v0.4+ by checking the Version Upgrade Guide