v1.0.0-alpha.1

CLI support for legacy projects has been removed

To migrate your project, follow the migration guides to convert your projects to the new Kubebuilder-style layout.

The following subcommands were removed:

CommandGuidancePR(s)
operator-sdk newUse operator-sdk init#3385, #3343, #3531
operator-sdk add apiUse operator-sdk create api#3385, #3343, #3531
operator-sdk add controllerUse operator-sdk create api#3385
operator-sdk add crdUse operator-sdk create api#3547
operator-sdk buildUse make docker-build#3566
operator-sdk bundle createUse make bundle#3414
operator-sdk generate k8sUse make generate#3385
operator-sdk generate crdsUse make manifests#3385
operator-sdk generate csvUse operator-sdk generate kustomize manifests#3414
operator-sdk migrateRemoved support for hybrid operators, no migration#3385
operator-sdk print-depsRemoved, no migration#3385
operator-sdk run localUse make run#3406
operator-sdk testUse controller-runtime’s envtest framework#3409

Useful libraries have been split out into a separate repository

  • The EnqueueRequestForAnnotation watch handler is now available in package github.com/operator-framework/operator-lib/handler

  • The GenerationChangedPredicate was refactored and moved. Rewrite it as a composite predicate like the following:

    1. import (
    2. crpredicate "sigs.k8s.io/controller-runtime/pkg/predicate"
    3. libpredicate "github.com/operator-framework/operator-lib/predicate"
    4. )
    5. ...
    6. crpredicate.Or(
    7. crpredicate.GenerationChangedPredicate{},
    8. libpredicate.NoGenerationPredicate{},
    9. )
  • The leader-for-life leader election library at pkg/leader was moved to github.com/operator-framework/operator-lib/leader.

  • The pkg/status library with status conditions helpers was moved to github.com/operator-framework/operator-lib/status.

See the following PRs for details:

pkg/log/zap is no longer a public API

Migrate to the upstream controller-runtime implementation in sigs.k8s.io/controller-runtime/pkg/log/zap.

See #3525 for more details.

Default Ansible and Helm operator metrics port has changed

To continue using port 8383, specify --metrics-addr=:8383 when you start the operator.

See #3489 and #3440 for more details.

Update references to legacy operator-sdk domain strings

Update various usages of domains in plugin keys and annotations:

  • In Kubebuilder-style projects, change the .operator-sdk.io suffix to .sdk.operatorframework.io in the PROJECT file.

  • In Ansible and Helm projects, change legacy annotation keys to new annotation keys in sample CR files in your repository.

  • In live clusters containing CRs for Ansible and Helm-based operators:

    1. Patch all existing CRs that use a legacy annotation to ADD the new equivalent annotations alongside the legacy annotations.
    2. Upgrade the operator
    3. Patch all existing CRs that used a legacy annotation to REMOVE the legacy annotations.
LocationLegacyNew
PROJECT filego.operator-sdk.iogo.sdk.operatorframework.io
Custom resourcesansible.operator-sdk/reconcile-periodansible.sdk.operatorframework.io/reconcile-period
Custom resourcesansible.operator-sdk/max-runner-artifactsansible.sdk.operatorframework.io/max-runner-artifacts
Custom resourcesansible.operator-sdk/verbosityansible.sdk.operatorframework.io/verbosity
Custom resourceshelm.operator-sdk/upgrade-forcehelm.sdk.operatorframework.io/upgrade-force

See #3527 for more details.

Hybrid Ansible and Helm operator use cases are not supported in 1.0.0

There is no migration path that enables continued use of the Ansible-based or Helm-based operator Go libraries.

See #3560 and #3537 for more details.

In v3-alpha PROJECT files, add the projectName config key

If your PROJECT file has version: 3-alpha, set projectName at the root level in your PROJECT file. If this key is not set, an error will be returned (version: 2 projects will continue using the project directory name as the project name).

See #3438 for more details.

Changes to Ansible and Helm configuration of max workers

  • Flag max-workers was renamed to max-concurrent-reconciles in Ansible and Helm operators. Change all usage of --max-workers to --max-concurrent-reconciles. Functionality is identical; this is just a name change to align more with controller runtime terminology.

  • The WORKERS_<Kind>_<Group> environment variable was deprecated. Change all usage of these environment variables to MAX_CONCURRENT_RECONCILES_<Kind>_<Group>.

See #3435, #3452, and #3456 for more details.

Ansible Operator meta variable renamed to ansible_operator_meta

All existing references to the meta variable in your Ansible content will no longer work. Instead, your Ansible content should reference the ansible_operator_meta variable.

Alternatively, you can use the vars keyword in your watches.yaml in order to map the new ansible_operator_meta variable to meta. Below is a sample watches.yaml that has made this change:

  1. - version: v1alpha1
  2. group: test.example.com
  3. kind: Example
  4. role: test
  5. vars:
  6. meta: '{{ ansible_operator_meta }}'

See #3562 for more details.

Migrated Ansible and Helm operators to use new Kubebuilder-style metrics

  • Replaced kube-state-metrics style metrics on port :8686 with a similar resource_created_at metric registered with the controller-runtime metrics registry

  • Replace runtime creation of the metrics Service and ServiceMonitor with deploy-time kustomize manifests

See #3466 and #3451 for more details.

Removed pkg/k8sutil

With the transition to Kubebuilder-style projects, pkg/k8sutil is no longer used in the default scaffolding for Go operators. Migrate your project to the new Kubebuilder-style layout to remove the need for this package.

See #3475 for more details.

Removed pkg/kube-metrics and pkg/metrics

Remove the call to addMetrics in your main.go file and begin using the InstrumentedEnqueueRequestForObject handler when setting up controller-runtime watches for your primary CRs.

InstrumentedEnqueueRequestForObject can be imported from github.com/operator-framework/operator-lib/handler.

See #3484 for more details.

Removed package pkg/ready

Use controller-runtime‘s readyz server that supports custom http handlers. Add add a healthz.Checker (e.g. healthz.Ping) using manager.AddReadyzCheck.

See #3476 for more details.

Removed package pkg/tls

See the Kubebuilder docs on how to deploy and manage TLS certificates with cert-manager.

See #3468 for more details.

Update your scorecard config file to the new format

See the updated scorecard config documentation for details.

See #3434 and #3490 for more details.

Use scorecard instead of alpha scorecard

If you have been using operator-sdk alpha scorecard, update to use operator-sdk scorecard.

If you have been using operator-sdk scorecard, migrate to the new scorecard. See the new scorecard documentation.

See #3444 for more details.

Scorecard output formatting has changed

Update any scripts interpretting the scorecard output to understand the v1alpha3.TestList format.

See the json and text format descriptions for details.

See #3427 for more details.

Last modified September 16, 2020: [1.0.x] Fix broken links (#3893) (cfabe8d6)