From 0d1078b455ec3b67519c8abccd4de401ba8810ee Mon Sep 17 00:00:00 2001 From: "jesus m. rodriguez" Date: Mon, 27 Jul 2020 15:44:35 -0400 Subject: [PATCH 1/6] Generate 1.0.0-alpha CHANGELOG and migration guide --- CHANGELOG.md | 65 ++++ changelog/fragments/ansible-helm-log-fmt.yaml | 6 - .../fragments/ansible-leader-election.yaml | 9 - changelog/fragments/ansible-metrics-addr.yml | 15 - changelog/fragments/ansible-operator-env.yaml | 9 - .../ansible-operator-optional-case.yaml | 10 - changelog/fragments/cmd-legacy-helm.yaml | 33 --- changelog/fragments/consistent-domain.yaml | 41 --- changelog/fragments/crds-with-core-types.yaml | 5 - .../fragments/enqueue-object-handler.yaml | 7 - .../fragments/fix-find-metadata-dir.yaml | 7 - changelog/fragments/helm-leader-election.yaml | 7 - changelog/fragments/helm-metrics-addr.yaml | 14 - changelog/fragments/modify-ansible-flags.yaml | 5 - changelog/fragments/move-log-internally.yaml | 34 --- .../mv-EnqueueRequestForAnnotation.yaml | 16 - changelog/fragments/mv-ansible-internal.yaml | 11 - changelog/fragments/mv-pkg-helm.yaml | 15 - changelog/fragments/no-pod-left-behind.yaml | 5 - .../fragments/operator-name-config-file.yaml | 10 - .../packagemanifests-from-version.yaml | 4 - changelog/fragments/remove-add-crd.yaml | 7 - changelog/fragments/remove-build.yaml | 12 - changelog/fragments/remove-legacy-helm.yaml | 18 -- changelog/fragments/remove-pkg-predicate.yaml | 11 - .../fragments/remove-test-framework.yaml | 8 - changelog/fragments/rename-max-workers.yaml | 12 - .../rename-meta-ansible-operator-meta.yaml | 27 -- changelog/fragments/rm-ansible-metrics.yml | 11 - .../fragments/rm-cmd-legacy-ansible.yaml | 33 --- changelog/fragments/rm-helm-metrics.yaml | 11 - changelog/fragments/rm-k8sutils.yaml | 16 - .../fragments/rm-legacy-bundle-cmds.yaml | 11 - changelog/fragments/rm-legacy-gen-bundle.yaml | 11 - changelog/fragments/rm-legacy-gen-csv.yaml | 11 - .../rm-legacy-gen-packagemanifests.yaml | 11 - changelog/fragments/rm-legacy-go.yaml | 10 - changelog/fragments/rm-legacy-run.yaml | 14 - changelog/fragments/rm-pkg-kube-metrics.yaml | 15 - .../fragments/rm-pkg-leader-and-status.yaml | 15 - changelog/fragments/rm-pkg-metrics.yaml | 15 - changelog/fragments/rm-pkg-ready.yaml | 14 - changelog/fragments/rm-tls-pkg.yaml | 17 -- .../fragments/scorecard-bundle-metadata.yaml | 6 - .../fragments/scorecard-config-scaffold.yaml | 9 - changelog/fragments/scorecard-default-ns.yaml | 12 - .../fragments/scorecard-label-perms.yaml | 5 - .../scorecard-metadata-source-of-truth.yaml | 5 - changelog/fragments/scorecard-move-alpha.yaml | 27 -- changelog/fragments/scorecard-output-api.yaml | 15 - changelog/fragments/scorecard-parallel.yaml | 55 ---- .../fragments/use-operator-lib-metrics.yaml | 19 -- .../en/docs/upgrading-sdk-version/v1.0.0.md | 278 ++++++++++++++++++ 53 files changed, 343 insertions(+), 726 deletions(-) delete mode 100644 changelog/fragments/ansible-helm-log-fmt.yaml delete mode 100644 changelog/fragments/ansible-leader-election.yaml delete mode 100644 changelog/fragments/ansible-metrics-addr.yml delete mode 100644 changelog/fragments/ansible-operator-env.yaml delete mode 100644 changelog/fragments/ansible-operator-optional-case.yaml delete mode 100644 changelog/fragments/cmd-legacy-helm.yaml delete mode 100644 changelog/fragments/consistent-domain.yaml delete mode 100644 changelog/fragments/crds-with-core-types.yaml delete mode 100644 changelog/fragments/enqueue-object-handler.yaml delete mode 100644 changelog/fragments/fix-find-metadata-dir.yaml delete mode 100644 changelog/fragments/helm-leader-election.yaml delete mode 100644 changelog/fragments/helm-metrics-addr.yaml delete mode 100644 changelog/fragments/modify-ansible-flags.yaml delete mode 100644 changelog/fragments/move-log-internally.yaml delete mode 100644 changelog/fragments/mv-EnqueueRequestForAnnotation.yaml delete mode 100644 changelog/fragments/mv-ansible-internal.yaml delete mode 100644 changelog/fragments/mv-pkg-helm.yaml delete mode 100644 changelog/fragments/no-pod-left-behind.yaml delete mode 100644 changelog/fragments/operator-name-config-file.yaml delete mode 100644 changelog/fragments/packagemanifests-from-version.yaml delete mode 100644 changelog/fragments/remove-add-crd.yaml delete mode 100644 changelog/fragments/remove-build.yaml delete mode 100644 changelog/fragments/remove-legacy-helm.yaml delete mode 100644 changelog/fragments/remove-pkg-predicate.yaml delete mode 100644 changelog/fragments/remove-test-framework.yaml delete mode 100644 changelog/fragments/rename-max-workers.yaml delete mode 100644 changelog/fragments/rename-meta-ansible-operator-meta.yaml delete mode 100644 changelog/fragments/rm-ansible-metrics.yml delete mode 100644 changelog/fragments/rm-cmd-legacy-ansible.yaml delete mode 100644 changelog/fragments/rm-helm-metrics.yaml delete mode 100644 changelog/fragments/rm-k8sutils.yaml delete mode 100644 changelog/fragments/rm-legacy-bundle-cmds.yaml delete mode 100644 changelog/fragments/rm-legacy-gen-bundle.yaml delete mode 100644 changelog/fragments/rm-legacy-gen-csv.yaml delete mode 100644 changelog/fragments/rm-legacy-gen-packagemanifests.yaml delete mode 100644 changelog/fragments/rm-legacy-go.yaml delete mode 100644 changelog/fragments/rm-legacy-run.yaml delete mode 100644 changelog/fragments/rm-pkg-kube-metrics.yaml delete mode 100644 changelog/fragments/rm-pkg-leader-and-status.yaml delete mode 100644 changelog/fragments/rm-pkg-metrics.yaml delete mode 100644 changelog/fragments/rm-pkg-ready.yaml delete mode 100644 changelog/fragments/rm-tls-pkg.yaml delete mode 100644 changelog/fragments/scorecard-bundle-metadata.yaml delete mode 100644 changelog/fragments/scorecard-config-scaffold.yaml delete mode 100644 changelog/fragments/scorecard-default-ns.yaml delete mode 100644 changelog/fragments/scorecard-label-perms.yaml delete mode 100644 changelog/fragments/scorecard-metadata-source-of-truth.yaml delete mode 100644 changelog/fragments/scorecard-move-alpha.yaml delete mode 100644 changelog/fragments/scorecard-output-api.yaml delete mode 100644 changelog/fragments/scorecard-parallel.yaml delete mode 100644 changelog/fragments/use-operator-lib-metrics.yaml create mode 100644 website/content/en/docs/upgrading-sdk-version/v1.0.0.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 570eb4bbede..e52eb9b32ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,68 @@ +## v1.0.0 + +### Additions + +- The `snakeCaseParameters` option has been added to the `watches.yaml` for Ansible-based Operators. This allows the user to configure whether parameters in the resource spec are automatically converted from `camelCase` to `snake_case`. The default is `true`, so there is no behavior change for existing operators, but it can now be disabled. ([#3245](https://github.com/operator-framework/operator-sdk/pull/3245)) +- Added `projectName` key to the PROJECT config file (v3-alpha+). ([#3438](https://github.com/operator-framework/operator-sdk/pull/3438)) +- Added the `--from-version` flag to `generate packagemanifests`. ([#3509](https://github.com/operator-framework/operator-sdk/pull/3509)) +- `generate bundle` now adds scorecard bundle metadata to `bundle.Dockerfile` and `annotations.yaml` if `--overwrite` is set (the default in a project's `Makefile`) or both files do not exist. ([#3474](https://github.com/operator-framework/operator-sdk/pull/3474)) +- Added `config/scorecard` kustomize scaffolds to `init`. ([#3490](https://github.com/operator-framework/operator-sdk/pull/3490)) + +### Changes + +- Use structure logging in Helm and Ansible operator base images when printing version information. ([#3564](https://github.com/operator-framework/operator-sdk/pull/3564)) +- The Ansible operator now uses the controller-runtime's lease-based leader election instead of SDK's leader-for-life mechanism. ([#3457](https://github.com/operator-framework/operator-sdk/pull/3457)) +- **Breaking change**: Added `--metrics-addr` flag to the Ansible operator to make it configurable, and changed the default port from `:8383` to `:8080`. ([#3489](https://github.com/operator-framework/operator-sdk/pull/3489)) +- **Breaking change**: Changed domain suffix used for plugins and CR annotations to consistently use `.sdk.operatorframework.io`. ([#3527](https://github.com/operator-framework/operator-sdk/pull/3527)) +- The Helm operator now uses the controller-runtime's lease-based leader election instead of SDK's leader-for-life mechanism. ([#3446](https://github.com/operator-framework/operator-sdk/pull/3446)) +- **Breaking change**: Added `--metrics-addr` flag to the Helm operator to make it configurable, and changed the default port from `:8383` to `:8080`. ([#3440](https://github.com/operator-framework/operator-sdk/pull/3440)) +- **Breaking change**: Removed the implementation for `EnqueueRequestForAnnotation` handler from the SDK repository and referenced it from [operator-lib](https://github.com/operator-framework/operator-lib/blob/main/handler/enqueue_annotation.go) instead. ([#3506](https://github.com/operator-framework/operator-sdk/pull/3506)) +- **Breaking change**: The ansible operator implementation in `pkg/ansible` was moved to `internal/ansible`. ([#3560](https://github.com/operator-framework/operator-sdk/pull/3560)) +- **Breaking change**: The Ansible operator's `--max-workers` flag and `WORKERS__` environment variable have been renamed to `--max-concurrent-reconciles` and `MAX_CONCURRENT_RECONCILES__` respectively. ([#3452](https://github.com/operator-framework/operator-sdk/pull/3452)) +- **Breaking change**: The `meta` variable passed to Ansible playbooks and roles has been renamed to `ansible_operator_meta`. ([#3562](https://github.com/operator-framework/operator-sdk/pull/3562)) +- **Breaking change**: Implemented the scorecard config as a componentconfig object. ([#3490](https://github.com/operator-framework/operator-sdk/pull/3490)) +- When a namespace is not provided on the command line, the scorecard command now looks for a namespace in the kubeconfig. If a namespace can not be found in the kubeconfig file, then 'default' is used. ([#3478](https://github.com/operator-framework/operator-sdk/pull/3478)) +- Use on-disk bundle metadata in scorecard (either unpacked from an image or directly if a directory is passed) as the source of truth for bundle metadata, and not image labels which are informative only. ([#3450](https://github.com/operator-framework/operator-sdk/pull/3450)) +- **Breaking change**: The `alpha scorecard` command has been promoted to the standard scorecard command. ([#3444](https://github.com/operator-framework/operator-sdk/pull/3444)) +- **Breaking change**: Changed scorecard text and json output to use a `v1alpha3.TestList` instead of aggregating all test results under a single `v1alpha3.Test` and set exit status to 1 when a test fails. ([#3427](https://github.com/operator-framework/operator-sdk/pull/3427)) +- **Breaking change**: Changed the scorecard configuration format to include a new top-level `stages` field, which allows users to define stages of tests and to enable parallelism within each stage. ([#3434](https://github.com/operator-framework/operator-sdk/pull/3434)) +- Ansible & Helm-based Operators switched to using the `InstrumentedEnqueueRequestForObject` from [operator-lib](https://github.com/operator-framework/operator-lib/blob/main/handler/instrumented_enqueue_object.go) instead of controller-runtime's `EnqueueRequestForObject`. ([#3523](https://github.com/operator-framework/operator-sdk/pull/3523)) + +### Removals + +- **Breaking change**: Removed legacy `new` and `add api` commands from Helm-based Operators. ([#3343](https://github.com/operator-framework/operator-sdk/pull/3343)) +- **Breaking change**: Moved `pkg/log/zap` to `internal/log/zap`, therefore it is no longer a public API. ([#3525](https://github.com/operator-framework/operator-sdk/pull/3525)) +- **Breaking change**: Move pkg/helm to internal/helm. ([#3537](https://github.com/operator-framework/operator-sdk/pull/3537)) +- **Breaking change**: Remove the `add crd` subcommand. ([#3547](https://github.com/operator-framework/operator-sdk/pull/3547)) +- **Breaking change**: Removed the `build` subcommand. ([#3566](https://github.com/operator-framework/operator-sdk/pull/3566)) +- **Breaking change**: The Helm legacy layout is no longer supported. ([#3343](https://github.com/operator-framework/operator-sdk/pull/3343)) +- **Breaking change**: Removed `pkg/predicate`: `ResourceFilterPredicate` is now available via `pkg/ansible/predicate.NewResourceFilterPredicate()`; `GenerationChangedPredicate` has been renamed, modified, and moved (see this [operator-lib PR](https://github.com/operator-framework/operator-lib/pull/11) for details). ([#3532](https://github.com/operator-framework/operator-sdk/pull/3532)) +- **Breaking change**: Removed `test` subcommand and the test framework `pkg/test`. ([#3409](https://github.com/operator-framework/operator-sdk/pull/3409)) +- **Breaking change**: Removed legacy metrics generation code from Ansible-based Operators. ([#3466](https://github.com/operator-framework/operator-sdk/pull/3466)) +- **Breaking change**: Removed legacy `new` and `add api` commands from Ansible-based Operators. ([#3531](https://github.com/operator-framework/operator-sdk/pull/3531)) +- **Breaking change**: Removed legacy metrics generation code from Helm-based Operators. ([#3451](https://github.com/operator-framework/operator-sdk/pull/3451)) +- **Breaking change**: Removed `pkg/k8sutils` and its helpers methods `GetWatchNamespace()`, `GetOperatorNamespace()`, `GetOperatorName()`, `ResourceExists()`, `GetPod()`, `GetGVKsFromAddToScheme()` and `SupportsOwnerReference()`. ([#3475](https://github.com/operator-framework/operator-sdk/pull/3475)) +- **Breaking change**: Removed `bundle create` command and `bundle validate` support in legacy projects. ([#3414](https://github.com/operator-framework/operator-sdk/pull/3414)) +- **Breaking change**: Removed `generate bundle` command support in legacy projects. ([#3414](https://github.com/operator-framework/operator-sdk/pull/3414)) +- **Breaking change**: Removed legacy `generate csv` command. ([#3414](https://github.com/operator-framework/operator-sdk/pull/3414)) +- **Breaking change**: Removed `generate packagemanifests` command support in legacy projects. ([#3414](https://github.com/operator-framework/operator-sdk/pull/3414)) +- **Breaking change**: Removed support in legacy Go projects for CLI subcommands and features: `add`, `migrate` `print-deps`, `generate k8s`, `generate crds`, and `scorecard`. ([#3385](https://github.com/operator-framework/operator-sdk/pull/3385)) +- **Breaking change**: Removed `run` and `cleanup` subcommands support in legacy projects. ([#3406](https://github.com/operator-framework/operator-sdk/pull/3406)) +- **Breaking change**: Removed `pkg/kube-metrics` and its associated helpers `NewNamespacedMetricsStores()`, `NewClusterScopedMetricsStores()`, `ServeMetrics()`, and `GenerateAndServeCRMetrics()`. ([#3484](https://github.com/operator-framework/operator-sdk/pull/3484)) +- **Breaking change**: Removed `pkg/leader` and `pkg/status`. These are now part of operator-lib. ([#3503](https://github.com/operator-framework/operator-sdk/pull/3503)) +- **Breaking change**: Removed `pkg/metrics` and its helpers `GenerateAndServeCRMetrics()` and `GetNamespacesForMetrics()`. ([#3484](https://github.com/operator-framework/operator-sdk/pull/3484)) +- **Breaking change**: Removed `pkg/ready` and its helper utils `Ready`, `Set()`, `Unset()`. ([#3476](https://github.com/operator-framework/operator-sdk/pull/3476)) +- **Breaking change**: Removed `pkg/tls` since that pkg is a leftover from an earlier effort to make certificate management easier, but was abandoned in favor of alternatives like cert-manager. ([#3468](https://github.com/operator-framework/operator-sdk/pull/3468)) + +### Bug Fixes + +- Fixed a bug that caused the Ansible operator not to set the environment variables `ANSIBLE_ROLES_PATH` and `ANSIBLE_COLLECTIONS_PATH` based on the flags `--ansible-roles-path` and `--ansible-collections-path`. ([#3549](https://github.com/operator-framework/operator-sdk/pull/3549)) +- Use group and kind instead of only kind when parsing manifests in the CSV generator to avoid marshaling them into the wrong Go types. ([#3334](https://github.com/operator-framework/operator-sdk/pull/3334)) +- Fixed issue that caused scorecard to fail loading local bundle due to a bug search method for the bundle metadata directory. ([#3408](https://github.com/operator-framework/operator-sdk/pull/3408)) +- Fixed CVE-2020-14040 by updating to `golang.org/x/text/0.3.3`. ([#3458](https://github.com/operator-framework/operator-sdk/pull/3458)) +- The `scorecard` subcommand now removes existing pods if the `--wait-time` deadline is exceeded and `--skip-cleanup=false` (the default). Fixes [#3419](https://github.com/operator-framework/operator-sdk/issues/3419). ([#3526](https://github.com/operator-framework/operator-sdk/pull/3526)) +- Fixed a bug in scorecard that caused tests to fail with permission errors when loading the bundle. ([#3428](https://github.com/operator-framework/operator-sdk/pull/3428)) + ## v0.19.0 ### Additions diff --git a/changelog/fragments/ansible-helm-log-fmt.yaml b/changelog/fragments/ansible-helm-log-fmt.yaml deleted file mode 100644 index aadbd7b8d8c..00000000000 --- a/changelog/fragments/ansible-helm-log-fmt.yaml +++ /dev/null @@ -1,6 +0,0 @@ -entries: - - description: > - Use structure logging in Helm and Ansible operator base images - when printing version information. - kind: "change" - breaking: false diff --git a/changelog/fragments/ansible-leader-election.yaml b/changelog/fragments/ansible-leader-election.yaml deleted file mode 100644 index ce8b5e82c33..00000000000 --- a/changelog/fragments/ansible-leader-election.yaml +++ /dev/null @@ -1,9 +0,0 @@ -# entries is a list of entries to include in -# release notes and/or the migration guide -entries: - - description: > - In the Ansible operator, use controller-runtime's lease-based leader - election instead of SDK's leader-for-life mechnism. - - kind: "change" - breaking: false diff --git a/changelog/fragments/ansible-metrics-addr.yml b/changelog/fragments/ansible-metrics-addr.yml deleted file mode 100644 index 2c6e49a2cca..00000000000 --- a/changelog/fragments/ansible-metrics-addr.yml +++ /dev/null @@ -1,15 +0,0 @@ -entries: - - description: > - Added `--metrics-addr` flag to ansible operator to make it configurable, and - changed the default from `:8383` to `:8080` - - kind: "change" - - # Is this a breaking change? - breaking: true - - migration: - header: Default ansible operator metrics port changed - body: > - To continue using port 8383, specify `--metrics-addr=:8383` when you start the operator. - \ No newline at end of file diff --git a/changelog/fragments/ansible-operator-env.yaml b/changelog/fragments/ansible-operator-env.yaml deleted file mode 100644 index 26ffaf31232..00000000000 --- a/changelog/fragments/ansible-operator-env.yaml +++ /dev/null @@ -1,9 +0,0 @@ -entries: - - description: > - Fixed a bug that caused the Ansible operator not to set the environment - variables `ANSIBLE_ROLES_PATH` and `ANSIBLE_COLLECTIONS_PATH` based on the - flags `--ansible-roles-path` and `--ansible-collections-path` - - kind: bugfix - - breaking: false diff --git a/changelog/fragments/ansible-operator-optional-case.yaml b/changelog/fragments/ansible-operator-optional-case.yaml deleted file mode 100644 index 5c36a1c1f03..00000000000 --- a/changelog/fragments/ansible-operator-optional-case.yaml +++ /dev/null @@ -1,10 +0,0 @@ -entries: - - description: > - The `snakeCaseParameters` option has been added to the `watches.yaml` for - Ansible-based Operators. This allows the user to configure whether parameters - in the resource spec are automatically converted from camelCase to snake_case. - The default is `true`, so there is no behavior change for existing operators, - but it can now be disabled. - - kind: "addition" - breaking: false diff --git a/changelog/fragments/cmd-legacy-helm.yaml b/changelog/fragments/cmd-legacy-helm.yaml deleted file mode 100644 index 400c96a2da3..00000000000 --- a/changelog/fragments/cmd-legacy-helm.yaml +++ /dev/null @@ -1,33 +0,0 @@ -# entries is a list of entries to include in -# release notes and/or the migration guide -entries: - - description: > - The commands `operator-sdk new --type=helm` and `operator-sdk add api` are no longer supported for Helm-based Operators. - - # kind is one of: - # - addition - # - change - # - deprecation - # - removal - # - bugfix - kind: "removal" - - # Is this a breaking change? - breaking: true - - # NOTE: ONLY USE `pull_request_override` WHEN ADDING THIS - # FILE FOR A PREVIOUSLY MERGED PULL_REQUEST! - # - # The generator auto-detects the PR number from the commit - # message in which this file was originally added. - # - # What is the pull request number (without the "#")? - # pull_request_override: 0 - - - # Migration can be defined to automatically add a section to - # the migration guide. This is required for breaking changes. - migration: - header: New and api subcommands are no longer supported for Helm-based Operators. - body: > - TBD diff --git a/changelog/fragments/consistent-domain.yaml b/changelog/fragments/consistent-domain.yaml deleted file mode 100644 index c2b50ef7bd6..00000000000 --- a/changelog/fragments/consistent-domain.yaml +++ /dev/null @@ -1,41 +0,0 @@ -# entries is a list of entries to include in -# release notes and/or the migration guide -entries: - - description: > - Changed domain suffix used for plugins and CR annotations to - consistently use `.sdk.operatorframework.io`. - - # kind is one of: - # - addition - # - change - # - deprecation - # - removal - # - bugfix - kind: "change" - - # Is this a breaking change? - breaking: true - - # Migration can be defined to automatically add a section to - # the migration guide. This is required for breaking changes. - migration: - header: Update references to legacy operator-sdk domain strings - body: | - 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. - - | Location | Legacy | New | - |------------------|---------------------------------------------|---------------------------------------------------------| - | `PROJECT` file | `go.operator-sdk.io` | `go.sdk.operatorframework.io` | - | Custom resources | `ansible.operator-sdk/reconcile-period` | `ansible.sdk.operatorframework.io/reconcile-period` | - | Custom resources | `ansible.operator-sdk/max-runner-artifacts` | `ansible.sdk.operatorframework.io/max-runner-artifacts` | - | Custom resources | `ansible.operator-sdk/verbosity` | `ansible.sdk.operatorframework.io/verbosity` | - | Custom resources | `helm.operator-sdk/upgrade-force` | `helm.sdk.operatorframework.io/upgrade-force` | diff --git a/changelog/fragments/crds-with-core-types.yaml b/changelog/fragments/crds-with-core-types.yaml deleted file mode 100644 index 76c5b1e371c..00000000000 --- a/changelog/fragments/crds-with-core-types.yaml +++ /dev/null @@ -1,5 +0,0 @@ -entries: - - description: > - Use group and kind instead of only kind when parsing manifests in the CSV generator to avoid marshaling them into the wrong Go types. - kind: "bugfix" - breaking: false diff --git a/changelog/fragments/enqueue-object-handler.yaml b/changelog/fragments/enqueue-object-handler.yaml deleted file mode 100644 index 80bc279a1b3..00000000000 --- a/changelog/fragments/enqueue-object-handler.yaml +++ /dev/null @@ -1,7 +0,0 @@ -entries: - - description: > - Add new handler for metrics which can be registered with controller-runtime registry, - and wraps existing EnqueueResuestForObject, for both Ansible and Helm controllers. - - kind: "addition" - breaking: false \ No newline at end of file diff --git a/changelog/fragments/fix-find-metadata-dir.yaml b/changelog/fragments/fix-find-metadata-dir.yaml deleted file mode 100644 index 5de25b1e644..00000000000 --- a/changelog/fragments/fix-find-metadata-dir.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# entries is a list of entries to include in -# release notes and/or the migration guide -entries: - - description: > - Fixed issue that caused scorecard to fail loading local bundle due to a - bug search method for the bundle metadata directory. - kind: bugfix diff --git a/changelog/fragments/helm-leader-election.yaml b/changelog/fragments/helm-leader-election.yaml deleted file mode 100644 index 21f56bec232..00000000000 --- a/changelog/fragments/helm-leader-election.yaml +++ /dev/null @@ -1,7 +0,0 @@ -entries: - - description: > - In the Helm operator, use controller-runtime's lease-based leader - election instead of SDK's leader-for-life mechanism. - - kind: "change" - breaking: false diff --git a/changelog/fragments/helm-metrics-addr.yaml b/changelog/fragments/helm-metrics-addr.yaml deleted file mode 100644 index 6d3589cbf14..00000000000 --- a/changelog/fragments/helm-metrics-addr.yaml +++ /dev/null @@ -1,14 +0,0 @@ -entries: - - description: > - Added `--metrics-addr` flag to helm operator to make it configurable, and - changed the default from `:8383` to `:8080` - - kind: "change" - - # Is this a breaking change? - breaking: true - - migration: - header: Default helm operator metrics port changed - body: > - To continue using port 8383, specify `--metrics-addr=:8383` when you start the operator. diff --git a/changelog/fragments/modify-ansible-flags.yaml b/changelog/fragments/modify-ansible-flags.yaml deleted file mode 100644 index bdf25d1ff2d..00000000000 --- a/changelog/fragments/modify-ansible-flags.yaml +++ /dev/null @@ -1,5 +0,0 @@ -entries: - - description: > - Rename "--max-workers" flag to "--max-concurrent-reconciles", and add "MAX_CONCURRENT_RECONCILES__" global variable - to ansible binary. Also include deprecation message for "--max-workers" flag and "WORKERS__" global variable. - kind: "addition" diff --git a/changelog/fragments/move-log-internally.yaml b/changelog/fragments/move-log-internally.yaml deleted file mode 100644 index e24ccba8526..00000000000 --- a/changelog/fragments/move-log-internally.yaml +++ /dev/null @@ -1,34 +0,0 @@ -# entries is a list of entries to include in -# release notes and/or the migration guide -entries: - - description: > - Moved `pkg/log/zap` to `internal/log/zap`, therefore it is no - longer a public API. - - # kind is one of: - # - addition - # - change - # - deprecation - # - removal - # - bugfix - kind: "removal" - - # Is this a breaking change? - breaking: true - - # NOTE: ONLY USE `pull_request_override` WHEN ADDING THIS - # FILE FOR A PREVIOUSLY MERGED PULL_REQUEST! - # - # The generator auto-detects the PR number from the commit - # message in which this file was originally added. - # - # What is the pull request number (without the "#")? - # pull_request_override: 0 - - - # Migration can be defined to automatically add a section to - # the migration guide. This is required for breaking changes. - migration: - header: pkg/log/zap is no longer a public API - body: > - TBD diff --git a/changelog/fragments/mv-EnqueueRequestForAnnotation.yaml b/changelog/fragments/mv-EnqueueRequestForAnnotation.yaml deleted file mode 100644 index cff29343b55..00000000000 --- a/changelog/fragments/mv-EnqueueRequestForAnnotation.yaml +++ /dev/null @@ -1,16 +0,0 @@ -entries: - - description: > - Remove the implementation for `EnqueueRequestForAnnotation` handler from sdk repository and - reference it from operator-lib instead. - kind: "change" - - # Is this a breaking change? - breaking: true - - # Migration can be defined to automatically add a section to - # the migration guide. This is required for breaking changes. - migration: - header: Move the implementation of `EnqueueRequestForAnnotation` handler - body: > - The implementation of `EnqueueRequestForAnnotation` handler has been removed from Operator SDK repository - and is now imported from Operator-lib. diff --git a/changelog/fragments/mv-ansible-internal.yaml b/changelog/fragments/mv-ansible-internal.yaml deleted file mode 100644 index 5dddb705c1d..00000000000 --- a/changelog/fragments/mv-ansible-internal.yaml +++ /dev/null @@ -1,11 +0,0 @@ -entries: - - description: > - The ansible operator implementation in `pkg/ansible` was moved to - `internal/ansible`. - - kind: change - breaking: true - migration: - header: Hybrid Go/Ansible operator use cases are not supported in 1.0.0 - body: > - There is no migration path that enables continued use of the Ansible-based operator Go libraries diff --git a/changelog/fragments/mv-pkg-helm.yaml b/changelog/fragments/mv-pkg-helm.yaml deleted file mode 100644 index 23cec93a503..00000000000 --- a/changelog/fragments/mv-pkg-helm.yaml +++ /dev/null @@ -1,15 +0,0 @@ -# entries is a list of entries to include in -# release notes and/or the migration guide -entries: - - description: > - Move pkg/helm to internal/helm - - kind: "removal" - - # Is this a breaking change? - breaking: yes - - migration: - header: Move pkg/helm to internal/helm - body: > - TBD diff --git a/changelog/fragments/no-pod-left-behind.yaml b/changelog/fragments/no-pod-left-behind.yaml deleted file mode 100644 index 120be32a122..00000000000 --- a/changelog/fragments/no-pod-left-behind.yaml +++ /dev/null @@ -1,5 +0,0 @@ -entries: - - description: > - The `scorecard` subcommand now removes existing pods if the `--wait-time` deadline is exceeded - and `--skip-cleanup=false` (the default). Fixes [#3419](https://github.com/operator-framework/operator-sdk/issues/3419). - kind: bugfix diff --git a/changelog/fragments/operator-name-config-file.yaml b/changelog/fragments/operator-name-config-file.yaml deleted file mode 100644 index dad5850c40b..00000000000 --- a/changelog/fragments/operator-name-config-file.yaml +++ /dev/null @@ -1,10 +0,0 @@ -entries: - - description: > - Added `projectName` key to the PROJECT config file (v3-alpha+). - kind: addition - breaking: false - migration: - header: Add the `projectName` config key to your PROJECT file - body: > - Set the `projectName` key in your PROJECT file. If this key is not set, - the current working directory's base name will be used in various subcommands. diff --git a/changelog/fragments/packagemanifests-from-version.yaml b/changelog/fragments/packagemanifests-from-version.yaml deleted file mode 100644 index b00097f1a0d..00000000000 --- a/changelog/fragments/packagemanifests-from-version.yaml +++ /dev/null @@ -1,4 +0,0 @@ -entries: - - description: > - Added the `--from-version` flag to `generate packagemanifests`. - kind: addition diff --git a/changelog/fragments/remove-add-crd.yaml b/changelog/fragments/remove-add-crd.yaml deleted file mode 100644 index 841731cb94b..00000000000 --- a/changelog/fragments/remove-add-crd.yaml +++ /dev/null @@ -1,7 +0,0 @@ -entries: - - description: Remove the `add crd` subcommand. - kind: removal - breaking: true - migration: - header: Remove the `add crd` subcommand - body: TBD diff --git a/changelog/fragments/remove-build.yaml b/changelog/fragments/remove-build.yaml deleted file mode 100644 index 4df94121cea..00000000000 --- a/changelog/fragments/remove-build.yaml +++ /dev/null @@ -1,12 +0,0 @@ -entries: - - description: Removed the `build` subcommand. - kind: removal - breaking: true - migration: - header: Remove `operator-sdk build` references from project - body: > - `operator-sdk build` was removed in favor of `make docker-build`. Any image build args passed - to the removed command can be directly added to the `docker-build` Makefile rule. - Any Go build args passed to the removed command can be directly added to the project's Dockerfile. - The image builder can be substituted for `docker` in the `docker-build` Makefile rule, assuming - flags are the same. diff --git a/changelog/fragments/remove-legacy-helm.yaml b/changelog/fragments/remove-legacy-helm.yaml deleted file mode 100644 index 893feb33cad..00000000000 --- a/changelog/fragments/remove-legacy-helm.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# entries is a list of entries to include in -# release notes and/or the migration guide -entries: - - description: > - The Helm legacy layout is no longer supported. - - kind: "removal" - - # Is this a breaking change? - breaking: true - - # Migration can be defined to automatically add a section to - # the migration guide. This is required for breaking changes. - migration: - header: Migrate your Helm project to the new layout - body: > - TBD - diff --git a/changelog/fragments/remove-pkg-predicate.yaml b/changelog/fragments/remove-pkg-predicate.yaml deleted file mode 100644 index 900315a7049..00000000000 --- a/changelog/fragments/remove-pkg-predicate.yaml +++ /dev/null @@ -1,11 +0,0 @@ -entries: - - description: > - Remove `pkg/predicate`: `ResourceFilterPredicate` is now available via - `pkg/ansible/predicate.NewResourceFilterPredicate()`; `GenerationChangedPredicate` has been renamed, - modified, and moved (see this [operator-lib PR](https://github.com/operator-framework/operator-lib/pull/11) - for details). - kind: removal - breaking: true - migration: - header: Update `pkg/predicate` imports - body: TBD diff --git a/changelog/fragments/remove-test-framework.yaml b/changelog/fragments/remove-test-framework.yaml deleted file mode 100644 index 6048f1a9985..00000000000 --- a/changelog/fragments/remove-test-framework.yaml +++ /dev/null @@ -1,8 +0,0 @@ -entries: - - description: Remove `test` subcommand and the test framework `pkg/test`. - kind: "removal" - pull_request_override: 3409 - breaking: true - migration: - header: Remove `test` subcommand and the test framework `pkg/test` - body: TBD diff --git a/changelog/fragments/rename-max-workers.yaml b/changelog/fragments/rename-max-workers.yaml deleted file mode 100644 index fbdf852ddb2..00000000000 --- a/changelog/fragments/rename-max-workers.yaml +++ /dev/null @@ -1,12 +0,0 @@ -entries: - - description: > - **(Valid only for Ansible/Helm-based Operators)**. The flag `--max-workers` is no longer supported. - Use `--max-concurrent-reconciles` instead. - kind: "change" - breaking: true - migration: - header: Flag `max-workers` is no longer supported. - body: | - The flag `--max-workers` is no longer supported with ansible/helm binaries. It has been - renamed to `--max-concurrent-reconciles`. - diff --git a/changelog/fragments/rename-meta-ansible-operator-meta.yaml b/changelog/fragments/rename-meta-ansible-operator-meta.yaml deleted file mode 100644 index 166a5646f2e..00000000000 --- a/changelog/fragments/rename-meta-ansible-operator-meta.yaml +++ /dev/null @@ -1,27 +0,0 @@ -# entries is a list of entries to include in -# release notes and/or the migration guide -entries: - - description: > - The `meta` variable passed to Ansible playbooks and roles - has been renamed to `ansible_operator_meta`. - kind: "change" - breaking: true - migration: - header: Ansible Operator `meta` variable renamed to `ansible_operator_meta` - body: | - 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: - - ```yaml - - version: v1alpha1 - group: test.example.com - kind: Example - role: test - vars: - meta: '{{ ansible_operator_meta }}' - ``` diff --git a/changelog/fragments/rm-ansible-metrics.yml b/changelog/fragments/rm-ansible-metrics.yml deleted file mode 100644 index 59cf0ecacd5..00000000000 --- a/changelog/fragments/rm-ansible-metrics.yml +++ /dev/null @@ -1,11 +0,0 @@ -# entries is a list of entries to include in -# release notes and/or the migration guide -entries: - - description: > - Remove legacy metrics generation code. - kind: "removal" - # Is this a breaking change? - breaking: true - migration: - header: Remove legacy metrics generation code from cmd/ansible-operator/main.go, and tests/e2e-anisble.sh checks for servicemonitor. - body: TBD \ No newline at end of file diff --git a/changelog/fragments/rm-cmd-legacy-ansible.yaml b/changelog/fragments/rm-cmd-legacy-ansible.yaml deleted file mode 100644 index 727f5ce28ee..00000000000 --- a/changelog/fragments/rm-cmd-legacy-ansible.yaml +++ /dev/null @@ -1,33 +0,0 @@ -# entries is a list of entries to include in -# release notes and/or the migration guide -entries: - - description: > - The commands `operator-sdk new --type=ansible` and `operator-sdk add api` are no longer supported for Ansible-based Operators. - - # kind is one of: - # - addition - # - change - # - deprecation - # - removal - # - bugfix - kind: "removal" - - # Is this a breaking change? - breaking: true - - # NOTE: ONLY USE `pull_request_override` WHEN ADDING THIS - # FILE FOR A PREVIOUSLY MERGED PULL_REQUEST! - # - # The generator auto-detects the PR number from the commit - # message in which this file was originally added. - # - # What is the pull request number (without the "#")? - # pull_request_override: 0 - - - # Migration can be defined to automatically add a section to - # the migration guide. This is required for breaking changes. - migration: - header: New and api subcommands are no longer supported for Ansible-based Operators. - body: > - TBD diff --git a/changelog/fragments/rm-helm-metrics.yaml b/changelog/fragments/rm-helm-metrics.yaml deleted file mode 100644 index 539d0f68e4d..00000000000 --- a/changelog/fragments/rm-helm-metrics.yaml +++ /dev/null @@ -1,11 +0,0 @@ -# entries is a list of entries to include in -# release notes and/or the migration guide -entries: - - description: > - Remove legacy metrics generation code. - kind: "removal" - # Is this a breaking change? - breaking: true - migration: - header: Remove legacy metrics generation code from cmd/helm-operator/main.go, and test-e2e-helm.sh checks for servicemonitor. - body: TBD \ No newline at end of file diff --git a/changelog/fragments/rm-k8sutils.yaml b/changelog/fragments/rm-k8sutils.yaml deleted file mode 100644 index 8cc5ae48c13..00000000000 --- a/changelog/fragments/rm-k8sutils.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# entries is a list of entries to include in -# release notes and/or the migration guide -entries: - - description: > - Removed `pkg/k8sutils` and its helpers methods `GetWatchNamespace()`, - `GetOperatorNamespace()`, `GetOperatorName()`, `ResourceExists()`, `GetPod()`, - `GetGVKsFromAddToScheme()` and `SupportsOwnerReference()`. - - kind: "removal" - - breaking: true - - migration: - header: Removed k8sutils - body: > - TBD diff --git a/changelog/fragments/rm-legacy-bundle-cmds.yaml b/changelog/fragments/rm-legacy-bundle-cmds.yaml deleted file mode 100644 index f18bba17c99..00000000000 --- a/changelog/fragments/rm-legacy-bundle-cmds.yaml +++ /dev/null @@ -1,11 +0,0 @@ -# entries is a list of entries to include in -# release notes and/or the migration guide -entries: - - description: > - Remove legacy "bundle create/validate" commands - kind: "removal" - # Is this a breaking change? - breaking: true - migration: - header: Remove legacy "bundle create/validate" commands - body: TBD diff --git a/changelog/fragments/rm-legacy-gen-bundle.yaml b/changelog/fragments/rm-legacy-gen-bundle.yaml deleted file mode 100644 index cfac537bea0..00000000000 --- a/changelog/fragments/rm-legacy-gen-bundle.yaml +++ /dev/null @@ -1,11 +0,0 @@ -# entries is a list of entries to include in -# release notes and/or the migration guide -entries: - - description: > - Remove legacy generate bundle command - kind: "removal" - # Is this a breaking change? - breaking: true - migration: - header: Remove legacy generate bundle command - body: TBD diff --git a/changelog/fragments/rm-legacy-gen-csv.yaml b/changelog/fragments/rm-legacy-gen-csv.yaml deleted file mode 100644 index df7724a00fb..00000000000 --- a/changelog/fragments/rm-legacy-gen-csv.yaml +++ /dev/null @@ -1,11 +0,0 @@ -# entries is a list of entries to include in -# release notes and/or the migration guide -entries: - - description: > - Remove legacy generate csv command - kind: "removal" - # Is this a breaking change? - breaking: true - migration: - header: Remove legacy generate csv command - body: TBD diff --git a/changelog/fragments/rm-legacy-gen-packagemanifests.yaml b/changelog/fragments/rm-legacy-gen-packagemanifests.yaml deleted file mode 100644 index 9b1f9b79841..00000000000 --- a/changelog/fragments/rm-legacy-gen-packagemanifests.yaml +++ /dev/null @@ -1,11 +0,0 @@ -# entries is a list of entries to include in -# release notes and/or the migration guide -entries: - - description: > - Remove legacy generate packagemanifests command - kind: "removal" - # Is this a breaking change? - breaking: true - migration: - header: Remove legacy generate packagemanifests command - body: TBD diff --git a/changelog/fragments/rm-legacy-go.yaml b/changelog/fragments/rm-legacy-go.yaml deleted file mode 100644 index ea3fa6ad062..00000000000 --- a/changelog/fragments/rm-legacy-go.yaml +++ /dev/null @@ -1,10 +0,0 @@ -entries: - - description: > - Removed legacy go CLI subcommands and features: `add`, `migrate` - `print-deps`, `generate k8s`, `generate crds`, and `scorecard`. - kind: removal - breaking: true - pull_request_override: 3385 - migration: - header: Migrate to kubebuilder-style Go project - body: TBD diff --git a/changelog/fragments/rm-legacy-run.yaml b/changelog/fragments/rm-legacy-run.yaml deleted file mode 100644 index 049988e333d..00000000000 --- a/changelog/fragments/rm-legacy-run.yaml +++ /dev/null @@ -1,14 +0,0 @@ -# entries is a list of entries to include in -# release notes and/or the migration guide -entries: - - description: > - Remove legacy `run` and `cleanup` subcommands - - kind: "removal" - - # Is this a breaking change? - breaking: true - - migration: - header: Migrate to kubebuilder-style Go project - body: TBD diff --git a/changelog/fragments/rm-pkg-kube-metrics.yaml b/changelog/fragments/rm-pkg-kube-metrics.yaml deleted file mode 100644 index 5a6ced13c12..00000000000 --- a/changelog/fragments/rm-pkg-kube-metrics.yaml +++ /dev/null @@ -1,15 +0,0 @@ -# entries is a list of entries to include in -# release notes and/or the migration guide -entries: - - description: > - Removed `pkg/kube-metrics` and its associated helpers `NewNamespacedMetricsStores()`, - `NewClusterScopedMetricsStores()`, `ServeMetrics()`, and `GenerateAndServeCRMetrics()`. - - kind: "removal" - - breaking: true - - migration: - header: Removed `pkg/kube-metrics` - body: > - TBD diff --git a/changelog/fragments/rm-pkg-leader-and-status.yaml b/changelog/fragments/rm-pkg-leader-and-status.yaml deleted file mode 100644 index deac7ef8897..00000000000 --- a/changelog/fragments/rm-pkg-leader-and-status.yaml +++ /dev/null @@ -1,15 +0,0 @@ -# entries is a list of entries to include in -# release notes and/or the migration guide -entries: - - description: > - Removed `pkg/leader` and `pkg/status`. These are now part of - operator-lib. - - kind: "removal" - - breaking: true - - migration: - header: Removed `pkg/leader` and `pkg/status` - body: > - TBD diff --git a/changelog/fragments/rm-pkg-metrics.yaml b/changelog/fragments/rm-pkg-metrics.yaml deleted file mode 100644 index ca93320a16a..00000000000 --- a/changelog/fragments/rm-pkg-metrics.yaml +++ /dev/null @@ -1,15 +0,0 @@ -# entries is a list of entries to include in -# release notes and/or the migration guide -entries: - - description: > - Removed `pkg/metrics` and its helpers "GenerateAndServeCRMetrics()" and - "GetNamespacesForMetrics()". - - kind: "removal" - - breaking: true - - migration: - header: Removed `pkg/metrics` - body: > - TBD diff --git a/changelog/fragments/rm-pkg-ready.yaml b/changelog/fragments/rm-pkg-ready.yaml deleted file mode 100644 index 5f98bedb5b8..00000000000 --- a/changelog/fragments/rm-pkg-ready.yaml +++ /dev/null @@ -1,14 +0,0 @@ -# entries is a list of entries to include in -# release notes and/or the migration guide -entries: - - description: > - Removed `pkg/ready` and its helper utils `Ready`, `Set()`, `Unset()`. - - kind: "removal" - - breaking: true - - migration: - header: Removed `pkg/ready` - body: > - TBD diff --git a/changelog/fragments/rm-tls-pkg.yaml b/changelog/fragments/rm-tls-pkg.yaml deleted file mode 100644 index 762679ccf4e..00000000000 --- a/changelog/fragments/rm-tls-pkg.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# entries is a list of entries to include in -# release notes and/or the migration guide -entries: - - description: > - Removed `pkg/tls` since that pkg is a leftover from an earlier effort to make certificate - management easier, but was abandoned in favor of alternatives like cert-manager. - - kind: "removal" - - breaking: true - - migration: - header: Removed pkg/tls - body: > - See the [Kubebuilder docs](https://book.kubebuilder.io/cronjob-tutorial/cert-manager.html#deploying-the-cert-manager) - on how to deploy and manage TLS certificates with cert-manager. - diff --git a/changelog/fragments/scorecard-bundle-metadata.yaml b/changelog/fragments/scorecard-bundle-metadata.yaml deleted file mode 100644 index 01a525470ca..00000000000 --- a/changelog/fragments/scorecard-bundle-metadata.yaml +++ /dev/null @@ -1,6 +0,0 @@ -entries: - - description: > - `generate bundle` now adds scorecard bundle metadata to bundle.Dockerfile and annotations.yaml - if `--overwrite` is set (the default in a project's `Makefile`) or both files do not exist. - kind: addition - breaking: false diff --git a/changelog/fragments/scorecard-config-scaffold.yaml b/changelog/fragments/scorecard-config-scaffold.yaml deleted file mode 100644 index 38038e0d18b..00000000000 --- a/changelog/fragments/scorecard-config-scaffold.yaml +++ /dev/null @@ -1,9 +0,0 @@ -entries: - - description: Implemented the scorecard config as a componentconfig object - kind: change - breaking: true - migration: - header: Update your scorecard config file to the new format - body: See the updated scorecard [config documentation](https://sdk.operatorframework.io/docs/scorecard/scorecard/#config-file) for details. - - description: Added `config/scorecard` kustomize scaffolds to `init` - kind: addition diff --git a/changelog/fragments/scorecard-default-ns.yaml b/changelog/fragments/scorecard-default-ns.yaml deleted file mode 100644 index f63cd158a89..00000000000 --- a/changelog/fragments/scorecard-default-ns.yaml +++ /dev/null @@ -1,12 +0,0 @@ -entries: - - description: > - Changes the scorecard command to look for a namespace in the - kubeconfig instead of defaulting to 'default' when the - namespace is not defined on the command line flag. If a namespace - can not be found in the kubeconfig file, then 'default' is used. - - kind: "change" - - # Is this a breaking change? - breaking: false - diff --git a/changelog/fragments/scorecard-label-perms.yaml b/changelog/fragments/scorecard-label-perms.yaml deleted file mode 100644 index 6a83700dfd5..00000000000 --- a/changelog/fragments/scorecard-label-perms.yaml +++ /dev/null @@ -1,5 +0,0 @@ -entries: - - description: > - Fixed a bug in scorecard that caused tests to fail with permission errors - when loading the bundle. - kind: "bugfix" diff --git a/changelog/fragments/scorecard-metadata-source-of-truth.yaml b/changelog/fragments/scorecard-metadata-source-of-truth.yaml deleted file mode 100644 index 5f8ab94fc02..00000000000 --- a/changelog/fragments/scorecard-metadata-source-of-truth.yaml +++ /dev/null @@ -1,5 +0,0 @@ -entries: - - description: > - Use on-disk bundle metadata in scorecard (either unpacked from an image or directly if a directory is passed) - as the source of truth for bundle metadata, and not image labels which are informative only. - kind: change diff --git a/changelog/fragments/scorecard-move-alpha.yaml b/changelog/fragments/scorecard-move-alpha.yaml deleted file mode 100644 index 38dc322a4ef..00000000000 --- a/changelog/fragments/scorecard-move-alpha.yaml +++ /dev/null @@ -1,27 +0,0 @@ -entries: - - description: > - Changes the alpha scorecard command to become the standard scorecard - command. - - kind: "change" - - # Is this a breaking change? - breaking: true - - # NOTE: ONLY USE `pull_request_override` WHEN ADDING THIS - # FILE FOR A PREVIOUSLY MERGED PULL_REQUEST! - # - # The generator auto-detects the PR number from the commit - # message in which this file was originally added. - # - # What is the pull request number (without the "#")? - # pull_request_override: 0 - - - # Migration can be defined to automatically add a section to - # the migration guide. This is required for breaking changes. - migration: - header: Move scorecard/alpha to scorecard - body: | - If you referenced 'operator-sdk alpha scorecard', you will - need to update them to use 'operator-sdk scorecard'. diff --git a/changelog/fragments/scorecard-output-api.yaml b/changelog/fragments/scorecard-output-api.yaml deleted file mode 100644 index 482c8ba08df..00000000000 --- a/changelog/fragments/scorecard-output-api.yaml +++ /dev/null @@ -1,15 +0,0 @@ -# entries is a list of entries to include in -# release notes and/or the migration guide -entries: - - description: > - Changed scorecard text and json output to use a `v1alpha3.TestList` - instead of aggregating all test results under a single - `v1alpha3.Test` and set exit status to 1 when a test fails. - kind: "change" - breaking: true - migration: - header: Alpha scorecard output API updates - body: | - Update any scripts interpretting the scorecard output to - understand the v1alpha3 TestList format. - diff --git a/changelog/fragments/scorecard-parallel.yaml b/changelog/fragments/scorecard-parallel.yaml deleted file mode 100644 index 862e3dd4cb5..00000000000 --- a/changelog/fragments/scorecard-parallel.yaml +++ /dev/null @@ -1,55 +0,0 @@ -entries: - - description: > - Changes the scorecard configuration format to include a new top-level - `stages` field, which allows users to define stages of tests and to - enable parallelism within each stage. - - kind: "change" - - # Is this a breaking change? - breaking: true - - # NOTE: ONLY USE `pull_request_override` WHEN ADDING THIS - # FILE FOR A PREVIOUSLY MERGED PULL_REQUEST! - # - # The generator auto-detects the PR number from the commit - # message in which this file was originally added. - # - # What is the pull request number (without the "#")? - # pull_request_override: 0 - - - # Migration can be defined to automatically add a section to - # the migration guide. This is required for breaking changes. - migration: - header: Add stages to scorecard configuration file - body: | - Update your scorecard configuration file to contain a new top-level - stages field, and move your test definitions under one or more stages. - - **Example** - - ```yaml - tests: - - image: quay.io/operator-framework/scorecard-test:dev - entrypoint: - - scorecard-test - - basic-check-spec - labels: - suite: basic - test: basic-check-spec-test - ``` - - should be converted to - - ```yaml - stages: - - tests: - - image: quay.io/operator-framework/scorecard-test:dev - entrypoint: - - scorecard-test - - basic-check-spec - labels: - suite: basic - test: basic-check-spec-test - ``` diff --git a/changelog/fragments/use-operator-lib-metrics.yaml b/changelog/fragments/use-operator-lib-metrics.yaml deleted file mode 100644 index f8a96987a85..00000000000 --- a/changelog/fragments/use-operator-lib-metrics.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# entries is a list of entries to include in -# release notes and/or the migration guide -entries: - - description: > - Remove the implementation for `InstrumentedEnqueueRequestForObject` - handler from SDK repository and reference it from operator-lib instead. - - kind: "change" - - # Is this a breaking change? - breaking: true - - # Migration can be defined to automatically add a section to - # the migration guide. This is required for breaking changes. - migration: - header: Move the implementation of `InstrumentedEnqueueRequestForObject` handler - body: > - The implementation of `InstrumentedEnqueueRequestForObject` handler has been - removed from Operator SDK repository and is now imported from operator-lib. diff --git a/website/content/en/docs/upgrading-sdk-version/v1.0.0.md b/website/content/en/docs/upgrading-sdk-version/v1.0.0.md new file mode 100644 index 00000000000..cf5ecaf62cc --- /dev/null +++ b/website/content/en/docs/upgrading-sdk-version/v1.0.0.md @@ -0,0 +1,278 @@ +--- +title: v1.0.0 +weight: 999000000 +--- + +## Default Ansible operator metrics port has changed + +To continue using port 8383, specify `--metrics-addr=:8383` when you start the operator. + +_See [#3489](https://github.com/operator-framework/operator-sdk/pull/3489) for more details._ + +## New and api subcommands are no longer supported for Helm-based Operators. + +TBD + +_See [#3343](https://github.com/operator-framework/operator-sdk/pull/3343) 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. + +| Location | Legacy | New | +|------------------|---------------------------------------------|---------------------------------------------------------| +| `PROJECT` file | `go.operator-sdk.io` | `go.sdk.operatorframework.io` | +| Custom resources | `ansible.operator-sdk/reconcile-period` | `ansible.sdk.operatorframework.io/reconcile-period` | +| Custom resources | `ansible.operator-sdk/max-runner-artifacts` | `ansible.sdk.operatorframework.io/max-runner-artifacts` | +| Custom resources | `ansible.operator-sdk/verbosity` | `ansible.sdk.operatorframework.io/verbosity` | +| Custom resources | `helm.operator-sdk/upgrade-force` | `helm.sdk.operatorframework.io/upgrade-force` | + +_See [#3527](https://github.com/operator-framework/operator-sdk/pull/3527) for more details._ + +## Default Helm operator metrics port has changed + +To continue using port 8383, specify `--metrics-addr=:8383` when you start the operator. + +_See [#3440](https://github.com/operator-framework/operator-sdk/pull/3440) for more details._ + +## pkg/log/zap is no longer a public API + +TBD + +_See [#3525](https://github.com/operator-framework/operator-sdk/pull/3525) for more details._ + +## Move the implementation of `EnqueueRequestForAnnotation` handler + +Import "github.com/operator-framework/operator-lib/handler" to continue using the `EnqueueRequestForAnnotation` handler. + +_See [#3506](https://github.com/operator-framework/operator-sdk/pull/3506) for more details._ + +## Hybrid Go/Ansible operator use cases are not supported in 1.0.0 + +There is no migration path that enables continued use of the Ansible-based operator Go libraries + +_See [#3560](https://github.com/operator-framework/operator-sdk/pull/3560) for more details._ + +## Move pkg/helm to internal/helm + +TBD + +_See [#3537](https://github.com/operator-framework/operator-sdk/pull/3537) for more details._ + +## Add the `projectName` config key to your PROJECT file + +Set the `projectName` key in your PROJECT file. If this key is not set, the current working directory's base name will be used in various subcommands. + +_See [#3438](https://github.com/operator-framework/operator-sdk/pull/3438) for more details._ + +## Remove the `add crd` subcommand + +TBD + +_See [#3547](https://github.com/operator-framework/operator-sdk/pull/3547) for more details._ + +## Remove `operator-sdk build` references from project + +`operator-sdk build` was removed in favor of `make docker-build`. Any image build args passed to the removed command can be directly added to the `docker-build` Makefile rule. Any Go build args passed to the removed command can be directly added to the project's Dockerfile. The image builder can be substituted for `docker` in the `docker-build` Makefile rule, assuming flags are the same. + +_See [#3566](https://github.com/operator-framework/operator-sdk/pull/3566) for more details._ + +## Migrate your Helm project to the new layout + +TBD + +_See [#3343](https://github.com/operator-framework/operator-sdk/pull/3343) for more details._ + +## Update `pkg/predicate` imports + +TBD + +_See [#3532](https://github.com/operator-framework/operator-sdk/pull/3532) for more details._ + +## Removed `test` subcommand and the test framework `pkg/test` + +TBD + +_See [#3409](https://github.com/operator-framework/operator-sdk/pull/3409) for more details._ + +## Flag `max-workers` and `WORKERS__` environment variable are no longer supported. + +The `--max-workers` flag and `WORKERS__` environment variable are no longer supported +with the Ansible operator. They have been renamed to `--max-concurrent-reconciles` and +`MAX_CONCURRENT_RECONCILES__` respectively. + +_See [#3452](https://github.com/operator-framework/operator-sdk/pull/3452) 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: + +```yaml + - version: v1alpha1 + group: test.example.com + kind: Example + role: test + vars: + meta: '{{ ansible_operator_meta }}' +``` + +_See [#3562](https://github.com/operator-framework/operator-sdk/pull/3562) for more details._ + +## Removed legacy metrics generation code from cmd/ansible-operator/main.go, and tests/e2e-anisble.sh checks for servicemonitor. + +TBD + +_See [#3466](https://github.com/operator-framework/operator-sdk/pull/3466) for more details._ + +## New and api subcommands are no longer supported for Ansible-based Operators. + +TBD + +_See [#3531](https://github.com/operator-framework/operator-sdk/pull/3531) for more details._ + +## Remove legacy metrics generation code from cmd/helm-operator/main.go, and test-e2e-helm.sh checks for servicemonitor. + +TBD + +_See [#3451](https://github.com/operator-framework/operator-sdk/pull/3451) for more details._ + +## Removed k8sutils + +TBD + +_See [#3475](https://github.com/operator-framework/operator-sdk/pull/3475) for more details._ + +## Remove `bundle create` command and `bundle validate` support in legacy projects + +TBD + +_See [#3414](https://github.com/operator-framework/operator-sdk/pull/3414) for more details._ + +## Remove legacy generate bundle command + +TBD + +_See [#3414](https://github.com/operator-framework/operator-sdk/pull/3414) for more details._ + +## Remove legacy generate csv command + +TBD + +_See [#3414](https://github.com/operator-framework/operator-sdk/pull/3414) for more details._ + +## Remove generate packagemanifests command support in legacy projects + +TBD + +_See [#3414](https://github.com/operator-framework/operator-sdk/pull/3414) for more details._ + +## Migrate to kubebuilder-style Go project + +TBD + +_See [#3385](https://github.com/operator-framework/operator-sdk/pull/3385) for more details._ + +## Migrate to kubebuilder-style Go project + +TBD + +_See [#3406](https://github.com/operator-framework/operator-sdk/pull/3406) for more details._ + +## Removed `pkg/kube-metrics` + +TBD + +_See [#3484](https://github.com/operator-framework/operator-sdk/pull/3484) for more details._ + +## Removed `pkg/leader` and `pkg/status` + +TBD + +_See [#3503](https://github.com/operator-framework/operator-sdk/pull/3503) for more details._ + +## Removed `pkg/metrics` + +TBD + +_See [#3484](https://github.com/operator-framework/operator-sdk/pull/3484) for more details._ + +## Removed `pkg/ready` + +TBD + +_See [#3476](https://github.com/operator-framework/operator-sdk/pull/3476) for more details._ + +## Removed pkg/tls + +See the [Kubebuilder docs](https://book.kubebuilder.io/cronjob-tutorial/cert-manager.html#deploying-the-cert-manager) on how to deploy and manage TLS certificates with cert-manager. + +_See [#3468](https://github.com/operator-framework/operator-sdk/pull/3468) for more details._ + +## Update your scorecard config file to the new format + +See the updated scorecard [config documentation](https://sdk.operatorframework.io/docs/scorecard/scorecard/#config-file) for details. + +_See [#3490](https://github.com/operator-framework/operator-sdk/pull/3490) for more details._ + +## Move scorecard/alpha to scorecard + +If you referenced 'operator-sdk alpha scorecard', you will +need to update them to use 'operator-sdk scorecard'. + +_See [#3444](https://github.com/operator-framework/operator-sdk/pull/3444) for more details._ + +## Alpha scorecard output API updates + +Update any scripts interpretting the scorecard output to +understand the v1alpha3 TestList format. + +_See [#3427](https://github.com/operator-framework/operator-sdk/pull/3427) for more details._ + +## Add stages to scorecard configuration file + +Update your scorecard configuration file to contain a new top-level +stages field, and move your test definitions under one or more stages. + +**Example** + +```yaml +tests: +- image: quay.io/operator-framework/scorecard-test:dev + entrypoint: + - scorecard-test + - basic-check-spec + labels: + suite: basic + test: basic-check-spec-test +``` + +should be converted to + +```yaml +stages: +- tests: + - image: quay.io/operator-framework/scorecard-test:dev + entrypoint: + - scorecard-test + - basic-check-spec + labels: + suite: basic + test: basic-check-spec-test +``` + +_See [#3434](https://github.com/operator-framework/operator-sdk/pull/3434) for more details._ From b42200ce70e32f0844bd40d7143de77832179c91 Mon Sep 17 00:00:00 2001 From: "jesus m. rodriguez" Date: Mon, 27 Jul 2020 16:06:42 -0400 Subject: [PATCH 2/6] Bump version to v1.0.0-alpha.1 --- version/version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version/version.go b/version/version.go index 0fb23305e1f..683c8f4baea 100644 --- a/version/version.go +++ b/version/version.go @@ -21,7 +21,7 @@ import ( //var needs to be used instead of const for ldflags var ( - Version = "v0.19.0+git" + Version = "v1.0.0-alpha.1" GitVersion = "unknown" GitCommit = "unknown" KubernetesVersion = "unknown" From 7ba6ff1118a6d82e4112c26c89f6423bf17d9996 Mon Sep 17 00:00:00 2001 From: "jesus m. rodriguez" Date: Mon, 27 Jul 2020 16:52:57 -0400 Subject: [PATCH 3/6] Consolidate the many changes that happened this release. --- CHANGELOG.md | 37 +++++++++++-------------------------- 1 file changed, 11 insertions(+), 26 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e52eb9b32ab..aa8ffbfcaca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,53 +1,38 @@ -## v1.0.0 +## v1.0.0-alpha.1 ### Additions - The `snakeCaseParameters` option has been added to the `watches.yaml` for Ansible-based Operators. This allows the user to configure whether parameters in the resource spec are automatically converted from `camelCase` to `snake_case`. The default is `true`, so there is no behavior change for existing operators, but it can now be disabled. ([#3245](https://github.com/operator-framework/operator-sdk/pull/3245)) - Added `projectName` key to the PROJECT config file (v3-alpha+). ([#3438](https://github.com/operator-framework/operator-sdk/pull/3438)) - Added the `--from-version` flag to `generate packagemanifests`. ([#3509](https://github.com/operator-framework/operator-sdk/pull/3509)) -- `generate bundle` now adds scorecard bundle metadata to `bundle.Dockerfile` and `annotations.yaml` if `--overwrite` is set (the default in a project's `Makefile`) or both files do not exist. ([#3474](https://github.com/operator-framework/operator-sdk/pull/3474)) +- The `generate bundle` command now adds scorecard bundle metadata to `bundle.Dockerfile` and `annotations.yaml` if `--overwrite` is set (the default in a project's `Makefile`) or both files do not exist. ([#3474](https://github.com/operator-framework/operator-sdk/pull/3474)) - Added `config/scorecard` kustomize scaffolds to `init`. ([#3490](https://github.com/operator-framework/operator-sdk/pull/3490)) ### Changes -- Use structure logging in Helm and Ansible operator base images when printing version information. ([#3564](https://github.com/operator-framework/operator-sdk/pull/3564)) -- The Ansible operator now uses the controller-runtime's lease-based leader election instead of SDK's leader-for-life mechanism. ([#3457](https://github.com/operator-framework/operator-sdk/pull/3457)) -- **Breaking change**: Added `--metrics-addr` flag to the Ansible operator to make it configurable, and changed the default port from `:8383` to `:8080`. ([#3489](https://github.com/operator-framework/operator-sdk/pull/3489)) +- Use structured logging in Ansible and Helm operator base images when printing version information. ([#3564](https://github.com/operator-framework/operator-sdk/pull/3564)) +- The Ansible and Helm-based operators now use the controller-runtime's lease-based leader election instead of SDK's leader-for-life mechanism. ([#3457](https://github.com/operator-framework/operator-sdk/pull/3457)) & ([#3446](https://github.com/operator-framework/operator-sdk/pull/3446)) +- **Breaking change**: Added `--metrics-addr` flag to the Ansible and Helm-based operators to make it configurable, and changed the default port from `:8383` to `:8080`. ([#3489](https://github.com/operator-framework/operator-sdk/pull/3489)) & ([#3440](https://github.com/operator-framework/operator-sdk/pull/3440)) - **Breaking change**: Changed domain suffix used for plugins and CR annotations to consistently use `.sdk.operatorframework.io`. ([#3527](https://github.com/operator-framework/operator-sdk/pull/3527)) -- The Helm operator now uses the controller-runtime's lease-based leader election instead of SDK's leader-for-life mechanism. ([#3446](https://github.com/operator-framework/operator-sdk/pull/3446)) -- **Breaking change**: Added `--metrics-addr` flag to the Helm operator to make it configurable, and changed the default port from `:8383` to `:8080`. ([#3440](https://github.com/operator-framework/operator-sdk/pull/3440)) - **Breaking change**: Removed the implementation for `EnqueueRequestForAnnotation` handler from the SDK repository and referenced it from [operator-lib](https://github.com/operator-framework/operator-lib/blob/main/handler/enqueue_annotation.go) instead. ([#3506](https://github.com/operator-framework/operator-sdk/pull/3506)) -- **Breaking change**: The ansible operator implementation in `pkg/ansible` was moved to `internal/ansible`. ([#3560](https://github.com/operator-framework/operator-sdk/pull/3560)) +- **Breaking change**: The Ansible operator implementation in `pkg/ansible` was moved to `internal/ansible`. ([#3560](https://github.com/operator-framework/operator-sdk/pull/3560)) +- **Breaking change**: The Helm operator implementation in `pkg/helm` was moved to `internal/helm`. ([#3537](https://github.com/operator-framework/operator-sdk/pull/3537)) - **Breaking change**: The Ansible operator's `--max-workers` flag and `WORKERS__` environment variable have been renamed to `--max-concurrent-reconciles` and `MAX_CONCURRENT_RECONCILES__` respectively. ([#3452](https://github.com/operator-framework/operator-sdk/pull/3452)) - **Breaking change**: The `meta` variable passed to Ansible playbooks and roles has been renamed to `ansible_operator_meta`. ([#3562](https://github.com/operator-framework/operator-sdk/pull/3562)) -- **Breaking change**: Implemented the scorecard config as a componentconfig object. ([#3490](https://github.com/operator-framework/operator-sdk/pull/3490)) +- **Breaking change**: The scorecard configuration is now implemented as a componentconfig object and now includes a new top-level `stages` field, which allows users to define stages of tests and to enable parallelism within each stage. ([#3490](https://github.com/operator-framework/operator-sdk/pull/3490)) & ([#3434](https://github.com/operator-framework/operator-sdk/pull/3434)) - When a namespace is not provided on the command line, the scorecard command now looks for a namespace in the kubeconfig. If a namespace can not be found in the kubeconfig file, then 'default' is used. ([#3478](https://github.com/operator-framework/operator-sdk/pull/3478)) - Use on-disk bundle metadata in scorecard (either unpacked from an image or directly if a directory is passed) as the source of truth for bundle metadata, and not image labels which are informative only. ([#3450](https://github.com/operator-framework/operator-sdk/pull/3450)) - **Breaking change**: The `alpha scorecard` command has been promoted to the standard scorecard command. ([#3444](https://github.com/operator-framework/operator-sdk/pull/3444)) - **Breaking change**: Changed scorecard text and json output to use a `v1alpha3.TestList` instead of aggregating all test results under a single `v1alpha3.Test` and set exit status to 1 when a test fails. ([#3427](https://github.com/operator-framework/operator-sdk/pull/3427)) -- **Breaking change**: Changed the scorecard configuration format to include a new top-level `stages` field, which allows users to define stages of tests and to enable parallelism within each stage. ([#3434](https://github.com/operator-framework/operator-sdk/pull/3434)) - Ansible & Helm-based Operators switched to using the `InstrumentedEnqueueRequestForObject` from [operator-lib](https://github.com/operator-framework/operator-lib/blob/main/handler/instrumented_enqueue_object.go) instead of controller-runtime's `EnqueueRequestForObject`. ([#3523](https://github.com/operator-framework/operator-sdk/pull/3523)) ### Removals - -- **Breaking change**: Removed legacy `new` and `add api` commands from Helm-based Operators. ([#3343](https://github.com/operator-framework/operator-sdk/pull/3343)) +- **Breaking change**: Removed support for the legacy layout. Operator SDK has a new CLI and project layout that is aligned with Kubebuilder. ([#3327](https://github.com/operator-framework/operator-sdk/issues/3327)) ([#3343](https://github.com/operator-framework/operator-sdk/pull/3343)) ([#3547](https://github.com/operator-framework/operator-sdk/pull/3547)) ([#3566](https://github.com/operator-framework/operator-sdk/pull/3566)) ([#3343](https://github.com/operator-framework/operator-sdk/pull/3343)) ([#3466](https://github.com/operator-framework/operator-sdk/pull/3466)) ([#3531](https://github.com/operator-framework/operator-sdk/pull/3531)) ([#3451](https://github.com/operator-framework/operator-sdk/pull/3451)) ([#3414](https://github.com/operator-framework/operator-sdk/pull/3414)) ([#3414](https://github.com/operator-framework/operator-sdk/pull/3414)) ([#3414](https://github.com/operator-framework/operator-sdk/pull/3414)) ([#3414](https://github.com/operator-framework/operator-sdk/pull/3414)) ([#3385](https://github.com/operator-framework/operator-sdk/pull/3385)) ([#3406](https://github.com/operator-framework/operator-sdk/pull/3406)) - **Breaking change**: Moved `pkg/log/zap` to `internal/log/zap`, therefore it is no longer a public API. ([#3525](https://github.com/operator-framework/operator-sdk/pull/3525)) -- **Breaking change**: Move pkg/helm to internal/helm. ([#3537](https://github.com/operator-framework/operator-sdk/pull/3537)) -- **Breaking change**: Remove the `add crd` subcommand. ([#3547](https://github.com/operator-framework/operator-sdk/pull/3547)) -- **Breaking change**: Removed the `build` subcommand. ([#3566](https://github.com/operator-framework/operator-sdk/pull/3566)) -- **Breaking change**: The Helm legacy layout is no longer supported. ([#3343](https://github.com/operator-framework/operator-sdk/pull/3343)) -- **Breaking change**: Removed `pkg/predicate`: `ResourceFilterPredicate` is now available via `pkg/ansible/predicate.NewResourceFilterPredicate()`; `GenerationChangedPredicate` has been renamed, modified, and moved (see this [operator-lib PR](https://github.com/operator-framework/operator-lib/pull/11) for details). ([#3532](https://github.com/operator-framework/operator-sdk/pull/3532)) +- **Breaking change**: Removed `pkg/predicate`: `ResourceFilterPredicate`. ([#3532](https://github.com/operator-framework/operator-sdk/pull/3532)) +- **Breaking change**: Refactored and moved `pkg/predicate.GenerationChangedPredicate` (see this [operator-lib PR](https://github.com/operator-framework/operator-lib/pull/11) for details). ([#3532](https://github.com/operator-framework/operator-sdk/pull/3532)) - **Breaking change**: Removed `test` subcommand and the test framework `pkg/test`. ([#3409](https://github.com/operator-framework/operator-sdk/pull/3409)) -- **Breaking change**: Removed legacy metrics generation code from Ansible-based Operators. ([#3466](https://github.com/operator-framework/operator-sdk/pull/3466)) -- **Breaking change**: Removed legacy `new` and `add api` commands from Ansible-based Operators. ([#3531](https://github.com/operator-framework/operator-sdk/pull/3531)) -- **Breaking change**: Removed legacy metrics generation code from Helm-based Operators. ([#3451](https://github.com/operator-framework/operator-sdk/pull/3451)) - **Breaking change**: Removed `pkg/k8sutils` and its helpers methods `GetWatchNamespace()`, `GetOperatorNamespace()`, `GetOperatorName()`, `ResourceExists()`, `GetPod()`, `GetGVKsFromAddToScheme()` and `SupportsOwnerReference()`. ([#3475](https://github.com/operator-framework/operator-sdk/pull/3475)) -- **Breaking change**: Removed `bundle create` command and `bundle validate` support in legacy projects. ([#3414](https://github.com/operator-framework/operator-sdk/pull/3414)) -- **Breaking change**: Removed `generate bundle` command support in legacy projects. ([#3414](https://github.com/operator-framework/operator-sdk/pull/3414)) -- **Breaking change**: Removed legacy `generate csv` command. ([#3414](https://github.com/operator-framework/operator-sdk/pull/3414)) -- **Breaking change**: Removed `generate packagemanifests` command support in legacy projects. ([#3414](https://github.com/operator-framework/operator-sdk/pull/3414)) -- **Breaking change**: Removed support in legacy Go projects for CLI subcommands and features: `add`, `migrate` `print-deps`, `generate k8s`, `generate crds`, and `scorecard`. ([#3385](https://github.com/operator-framework/operator-sdk/pull/3385)) -- **Breaking change**: Removed `run` and `cleanup` subcommands support in legacy projects. ([#3406](https://github.com/operator-framework/operator-sdk/pull/3406)) - **Breaking change**: Removed `pkg/kube-metrics` and its associated helpers `NewNamespacedMetricsStores()`, `NewClusterScopedMetricsStores()`, `ServeMetrics()`, and `GenerateAndServeCRMetrics()`. ([#3484](https://github.com/operator-framework/operator-sdk/pull/3484)) - **Breaking change**: Removed `pkg/leader` and `pkg/status`. These are now part of operator-lib. ([#3503](https://github.com/operator-framework/operator-sdk/pull/3503)) - **Breaking change**: Removed `pkg/metrics` and its helpers `GenerateAndServeCRMetrics()` and `GetNamespacesForMetrics()`. ([#3484](https://github.com/operator-framework/operator-sdk/pull/3484)) From db8ac4d27affa39a4f8a98120cc1c9484fd7075e Mon Sep 17 00:00:00 2001 From: Joe Lanford Date: Mon, 27 Jul 2020 18:00:23 -0400 Subject: [PATCH 4/6] updated and consolidated migration guide --- .../upgrading-sdk-version/v1.0.0-alpha.1.md | 207 +++++++++++++ .../en/docs/upgrading-sdk-version/v1.0.0.md | 278 ------------------ 2 files changed, 207 insertions(+), 278 deletions(-) create mode 100644 website/content/en/docs/upgrading-sdk-version/v1.0.0-alpha.1.md delete mode 100644 website/content/en/docs/upgrading-sdk-version/v1.0.0.md diff --git a/website/content/en/docs/upgrading-sdk-version/v1.0.0-alpha.1.md b/website/content/en/docs/upgrading-sdk-version/v1.0.0-alpha.1.md new file mode 100644 index 00000000000..3e5a40c02c1 --- /dev/null +++ b/website/content/en/docs/upgrading-sdk-version/v1.0.0-alpha.1.md @@ -0,0 +1,207 @@ +--- +title: v1.0.0-alpha.1 +weight: 999000000 +--- + +## 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 + + +- [Go](https://master.sdk.operatorframework.io/docs/building-operators/golang/project_migration_guide/) +- [Ansible](https://github.com/operator-framework/operator-sdk/pull/3571) (PR in progress) +- [Helm](https://master.sdk.operatorframework.io/docs/building-operators/helm/migration/) + +The following subcommands were removed: + +| Command | Guidance | PR(s) +|-------------------------------|----------------------------------------------------------------------------------------------------------|------- +| `operator-sdk new` | Use `operator-sdk init` | [#3385](https://github.com/operator-framework/operator-sdk/pull/3385), [#3343](https://github.com/operator-framework/operator-sdk/pull/3343), [#3531](https://github.com/operator-framework/operator-sdk/pull/3531) +| `operator-sdk add api` | Use `operator-sdk create api` | [#3385](https://github.com/operator-framework/operator-sdk/pull/3385), [#3343](https://github.com/operator-framework/operator-sdk/pull/3343), [#3531](https://github.com/operator-framework/operator-sdk/pull/3531) +| `operator-sdk add controller` | Use `operator-sdk create api` | [#3385](https://github.com/operator-framework/operator-sdk/pull/3385) +| `operator-sdk add crd` | Use `operator-sdk create api` | [#3547](https://github.com/operator-framework/operator-sdk/pull/3547) +| `operator-sdk build` | Use `make docker-build` | [#3566](https://github.com/operator-framework/operator-sdk/pull/3566) +| `operator-sdk bundle create` | Use `make bundle` | [#3414](https://github.com/operator-framework/operator-sdk/pull/3414) +| `operator-sdk generate k8s` | Use `make generate` | [#3385](https://github.com/operator-framework/operator-sdk/pull/3385) +| `operator-sdk generate crds` | Use `make manifests` | [#3385](https://github.com/operator-framework/operator-sdk/pull/3385) +| `operator-sdk generate csv` | Use `operator-sdk generate kustomize manifests` | [#3414](https://github.com/operator-framework/operator-sdk/pull/3414) +| `operator-sdk migrate` | Removed support for hybrid operators, no migration | [#3385](https://github.com/operator-framework/operator-sdk/pull/3385) +| `operator-sdk print-deps` | Removed, no migration | [#3385](https://github.com/operator-framework/operator-sdk/pull/3385) +| `operator-sdk run local` | Use `make run` | [#3406](https://github.com/operator-framework/operator-sdk/pull/3406) +| `operator-sdk test` | Use controller-runtime's [envtest](https://book.kubebuilder.io/reference/testing/envtest.html) framework | [#3409](https://github.com/operator-framework/operator-sdk/pull/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: + + ```go + import ( + crpredicate "sigs.k8s.io/controller-runtime/pkg/predicate" + libpredicate "github.com/operator-framework/operator-lib/predicate" + ) + + ... + + crpredicate.Or( + crpredicate.GenerationChangedPredicate{}, + libpredicate.NoGenerationPredicate{}, + ) + ``` +- 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: +- [#3506](https://github.com/operator-framework/operator-sdk/pull/3506) +- [#3532](https://github.com/operator-framework/operator-sdk/pull/3532) +- [#3503](https://github.com/operator-framework/operator-sdk/pull/3503) + +## 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](https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.6.1/pkg/log/zap?tab=doc#Options.BindFlags) + +_See [#3525](https://github.com/operator-framework/operator-sdk/pull/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](https://github.com/operator-framework/operator-sdk/pull/3489) and [#3440](https://github.com/operator-framework/operator-sdk/pull/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. + +| Location | Legacy | New | +|------------------|---------------------------------------------|---------------------------------------------------------| +| `PROJECT` file | `go.operator-sdk.io` | `go.sdk.operatorframework.io` | +| Custom resources | `ansible.operator-sdk/reconcile-period` | `ansible.sdk.operatorframework.io/reconcile-period` | +| Custom resources | `ansible.operator-sdk/max-runner-artifacts` | `ansible.sdk.operatorframework.io/max-runner-artifacts` | +| Custom resources | `ansible.operator-sdk/verbosity` | `ansible.sdk.operatorframework.io/verbosity` | +| Custom resources | `helm.operator-sdk/upgrade-force` | `helm.sdk.operatorframework.io/upgrade-force` | + +_See [#3527](https://github.com/operator-framework/operator-sdk/pull/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](https://github.com/operator-framework/operator-sdk/pull/3560) and [#3537](https://github.com/operator-framework/operator-sdk/pull/3537) for more details._ + +## In `v3-alpha` PROJECT files, add the `projectName` config key to your PROJECT file + +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](https://github.com/operator-framework/operator-sdk/pull/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__` environment variable was deprecated. Change all usage of these + environment variables to `MAX_CONCURRENT_RECONCILES__`. + +_See [#3435](https://github.com/operator-framework/operator-sdk/pull/3435), [#3452](https://github.com/operator-framework/operator-sdk/pull/3452), and [#3456](https://github.com/operator-framework/operator-sdk/pull/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: + +```yaml + - version: v1alpha1 + group: test.example.com + kind: Example + role: test + vars: + meta: '{{ ansible_operator_meta }}' +``` + +_See [#3562](https://github.com/operator-framework/operator-sdk/pull/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 templates + +_See [#3466](https://github.com/operator-framework/operator-sdk/pull/3466) and [#3451](https://github.com/operator-framework/operator-sdk/pull/3451) for more details._ + +## Removed pkg/k8sutils + +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](https://github.com/operator-framework/operator-sdk/pull/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](https://github.com/operator-framework/operator-sdk/pull/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`]( +https://github.com/kubernetes-sigs/controller-runtime/blob/229c3c357d9e6b07c3d6774010c35161a82b08f9/pkg/healthz/healthz.go#L187-L188)) +using [`manager.AddReadyzCheck`](https://github.com/kubernetes-sigs/controller-runtime/blob/229c3c357d9e6b07c3d6774010c35161a82b08f9/pkg/manager/manager.go#L73-L74) + +_See [#3476](https://github.com/operator-framework/operator-sdk/pull/3476) for more details._ + +## Removed package `pkg/tls` + +See the [Kubebuilder docs](https://book.kubebuilder.io/cronjob-tutorial/cert-manager.html#deploying-the-cert-manager) on +how to deploy and manage TLS certificates with cert-manager. + +_See [#3468](https://github.com/operator-framework/operator-sdk/pull/3468) for more details._ + +## Update your scorecard config file to the new format + +See the updated scorecard [config documentation](https://sdk.operatorframework.io/docs/scorecard/scorecard/#config-file) +for details. + +_See [#3434](https://github.com/operator-framework/operator-sdk/pull/3434) and +[#3490](https://github.com/operator-framework/operator-sdk/pull/3490) for more details._ + +## Move scorecard/alpha to scorecard + +If you referenced 'operator-sdk alpha scorecard', you will +need to update them to use 'operator-sdk scorecard'. + +_See [#3444](https://github.com/operator-framework/operator-sdk/pull/3444) for more details._ + +## Alpha scorecard output API updates + +Update any scripts interpretting the scorecard output to +understand the v1alpha3 TestList format. + +See the [`json`](https://master.sdk.operatorframework.io/docs/advanced-topics/scorecard/scorecard/#json-format) and +[`text`](https://master.sdk.operatorframework.io/docs/advanced-topics/scorecard/scorecard/#text-format) format +descriptions for details. + +_See [#3427](https://github.com/operator-framework/operator-sdk/pull/3427) for more details._ diff --git a/website/content/en/docs/upgrading-sdk-version/v1.0.0.md b/website/content/en/docs/upgrading-sdk-version/v1.0.0.md deleted file mode 100644 index cf5ecaf62cc..00000000000 --- a/website/content/en/docs/upgrading-sdk-version/v1.0.0.md +++ /dev/null @@ -1,278 +0,0 @@ ---- -title: v1.0.0 -weight: 999000000 ---- - -## Default Ansible operator metrics port has changed - -To continue using port 8383, specify `--metrics-addr=:8383` when you start the operator. - -_See [#3489](https://github.com/operator-framework/operator-sdk/pull/3489) for more details._ - -## New and api subcommands are no longer supported for Helm-based Operators. - -TBD - -_See [#3343](https://github.com/operator-framework/operator-sdk/pull/3343) 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. - -| Location | Legacy | New | -|------------------|---------------------------------------------|---------------------------------------------------------| -| `PROJECT` file | `go.operator-sdk.io` | `go.sdk.operatorframework.io` | -| Custom resources | `ansible.operator-sdk/reconcile-period` | `ansible.sdk.operatorframework.io/reconcile-period` | -| Custom resources | `ansible.operator-sdk/max-runner-artifacts` | `ansible.sdk.operatorframework.io/max-runner-artifacts` | -| Custom resources | `ansible.operator-sdk/verbosity` | `ansible.sdk.operatorframework.io/verbosity` | -| Custom resources | `helm.operator-sdk/upgrade-force` | `helm.sdk.operatorframework.io/upgrade-force` | - -_See [#3527](https://github.com/operator-framework/operator-sdk/pull/3527) for more details._ - -## Default Helm operator metrics port has changed - -To continue using port 8383, specify `--metrics-addr=:8383` when you start the operator. - -_See [#3440](https://github.com/operator-framework/operator-sdk/pull/3440) for more details._ - -## pkg/log/zap is no longer a public API - -TBD - -_See [#3525](https://github.com/operator-framework/operator-sdk/pull/3525) for more details._ - -## Move the implementation of `EnqueueRequestForAnnotation` handler - -Import "github.com/operator-framework/operator-lib/handler" to continue using the `EnqueueRequestForAnnotation` handler. - -_See [#3506](https://github.com/operator-framework/operator-sdk/pull/3506) for more details._ - -## Hybrid Go/Ansible operator use cases are not supported in 1.0.0 - -There is no migration path that enables continued use of the Ansible-based operator Go libraries - -_See [#3560](https://github.com/operator-framework/operator-sdk/pull/3560) for more details._ - -## Move pkg/helm to internal/helm - -TBD - -_See [#3537](https://github.com/operator-framework/operator-sdk/pull/3537) for more details._ - -## Add the `projectName` config key to your PROJECT file - -Set the `projectName` key in your PROJECT file. If this key is not set, the current working directory's base name will be used in various subcommands. - -_See [#3438](https://github.com/operator-framework/operator-sdk/pull/3438) for more details._ - -## Remove the `add crd` subcommand - -TBD - -_See [#3547](https://github.com/operator-framework/operator-sdk/pull/3547) for more details._ - -## Remove `operator-sdk build` references from project - -`operator-sdk build` was removed in favor of `make docker-build`. Any image build args passed to the removed command can be directly added to the `docker-build` Makefile rule. Any Go build args passed to the removed command can be directly added to the project's Dockerfile. The image builder can be substituted for `docker` in the `docker-build` Makefile rule, assuming flags are the same. - -_See [#3566](https://github.com/operator-framework/operator-sdk/pull/3566) for more details._ - -## Migrate your Helm project to the new layout - -TBD - -_See [#3343](https://github.com/operator-framework/operator-sdk/pull/3343) for more details._ - -## Update `pkg/predicate` imports - -TBD - -_See [#3532](https://github.com/operator-framework/operator-sdk/pull/3532) for more details._ - -## Removed `test` subcommand and the test framework `pkg/test` - -TBD - -_See [#3409](https://github.com/operator-framework/operator-sdk/pull/3409) for more details._ - -## Flag `max-workers` and `WORKERS__` environment variable are no longer supported. - -The `--max-workers` flag and `WORKERS__` environment variable are no longer supported -with the Ansible operator. They have been renamed to `--max-concurrent-reconciles` and -`MAX_CONCURRENT_RECONCILES__` respectively. - -_See [#3452](https://github.com/operator-framework/operator-sdk/pull/3452) 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: - -```yaml - - version: v1alpha1 - group: test.example.com - kind: Example - role: test - vars: - meta: '{{ ansible_operator_meta }}' -``` - -_See [#3562](https://github.com/operator-framework/operator-sdk/pull/3562) for more details._ - -## Removed legacy metrics generation code from cmd/ansible-operator/main.go, and tests/e2e-anisble.sh checks for servicemonitor. - -TBD - -_See [#3466](https://github.com/operator-framework/operator-sdk/pull/3466) for more details._ - -## New and api subcommands are no longer supported for Ansible-based Operators. - -TBD - -_See [#3531](https://github.com/operator-framework/operator-sdk/pull/3531) for more details._ - -## Remove legacy metrics generation code from cmd/helm-operator/main.go, and test-e2e-helm.sh checks for servicemonitor. - -TBD - -_See [#3451](https://github.com/operator-framework/operator-sdk/pull/3451) for more details._ - -## Removed k8sutils - -TBD - -_See [#3475](https://github.com/operator-framework/operator-sdk/pull/3475) for more details._ - -## Remove `bundle create` command and `bundle validate` support in legacy projects - -TBD - -_See [#3414](https://github.com/operator-framework/operator-sdk/pull/3414) for more details._ - -## Remove legacy generate bundle command - -TBD - -_See [#3414](https://github.com/operator-framework/operator-sdk/pull/3414) for more details._ - -## Remove legacy generate csv command - -TBD - -_See [#3414](https://github.com/operator-framework/operator-sdk/pull/3414) for more details._ - -## Remove generate packagemanifests command support in legacy projects - -TBD - -_See [#3414](https://github.com/operator-framework/operator-sdk/pull/3414) for more details._ - -## Migrate to kubebuilder-style Go project - -TBD - -_See [#3385](https://github.com/operator-framework/operator-sdk/pull/3385) for more details._ - -## Migrate to kubebuilder-style Go project - -TBD - -_See [#3406](https://github.com/operator-framework/operator-sdk/pull/3406) for more details._ - -## Removed `pkg/kube-metrics` - -TBD - -_See [#3484](https://github.com/operator-framework/operator-sdk/pull/3484) for more details._ - -## Removed `pkg/leader` and `pkg/status` - -TBD - -_See [#3503](https://github.com/operator-framework/operator-sdk/pull/3503) for more details._ - -## Removed `pkg/metrics` - -TBD - -_See [#3484](https://github.com/operator-framework/operator-sdk/pull/3484) for more details._ - -## Removed `pkg/ready` - -TBD - -_See [#3476](https://github.com/operator-framework/operator-sdk/pull/3476) for more details._ - -## Removed pkg/tls - -See the [Kubebuilder docs](https://book.kubebuilder.io/cronjob-tutorial/cert-manager.html#deploying-the-cert-manager) on how to deploy and manage TLS certificates with cert-manager. - -_See [#3468](https://github.com/operator-framework/operator-sdk/pull/3468) for more details._ - -## Update your scorecard config file to the new format - -See the updated scorecard [config documentation](https://sdk.operatorframework.io/docs/scorecard/scorecard/#config-file) for details. - -_See [#3490](https://github.com/operator-framework/operator-sdk/pull/3490) for more details._ - -## Move scorecard/alpha to scorecard - -If you referenced 'operator-sdk alpha scorecard', you will -need to update them to use 'operator-sdk scorecard'. - -_See [#3444](https://github.com/operator-framework/operator-sdk/pull/3444) for more details._ - -## Alpha scorecard output API updates - -Update any scripts interpretting the scorecard output to -understand the v1alpha3 TestList format. - -_See [#3427](https://github.com/operator-framework/operator-sdk/pull/3427) for more details._ - -## Add stages to scorecard configuration file - -Update your scorecard configuration file to contain a new top-level -stages field, and move your test definitions under one or more stages. - -**Example** - -```yaml -tests: -- image: quay.io/operator-framework/scorecard-test:dev - entrypoint: - - scorecard-test - - basic-check-spec - labels: - suite: basic - test: basic-check-spec-test -``` - -should be converted to - -```yaml -stages: -- tests: - - image: quay.io/operator-framework/scorecard-test:dev - entrypoint: - - scorecard-test - - basic-check-spec - labels: - suite: basic - test: basic-check-spec-test -``` - -_See [#3434](https://github.com/operator-framework/operator-sdk/pull/3434) for more details._ From 4e1764488f59432b61ed114a924a12d91317a102 Mon Sep 17 00:00:00 2001 From: "jesus m. rodriguez" Date: Mon, 27 Jul 2020 20:18:01 -0400 Subject: [PATCH 5/6] Apply suggestions to migration doc. --- .../upgrading-sdk-version/v1.0.0-alpha.1.md | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/website/content/en/docs/upgrading-sdk-version/v1.0.0-alpha.1.md b/website/content/en/docs/upgrading-sdk-version/v1.0.0-alpha.1.md index 3e5a40c02c1..31dd0c1dec9 100644 --- a/website/content/en/docs/upgrading-sdk-version/v1.0.0-alpha.1.md +++ b/website/content/en/docs/upgrading-sdk-version/v1.0.0-alpha.1.md @@ -6,7 +6,7 @@ weight: 999000000 ## 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 +Kubebuilder-style layout. - [Go](https://master.sdk.operatorframework.io/docs/building-operators/golang/project_migration_guide/) @@ -59,7 +59,7 @@ 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](https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.6.1/pkg/log/zap?tab=doc#Options.BindFlags) +Migrate to the upstream controller-runtime implementation in [sigs.k8s.io/controller-runtime/pkg/log/zap](https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.6.1/pkg/log/zap?tab=doc#Options.BindFlags). _See [#3525](https://github.com/operator-framework/operator-sdk/pull/3525) for more details._ @@ -94,11 +94,11 @@ _See [#3527](https://github.com/operator-framework/operator-sdk/pull/3527) for m ## 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 +There is no migration path that enables continued use of the Ansible-based or Helm-based operator Go libraries. _See [#3560](https://github.com/operator-framework/operator-sdk/pull/3560) and [#3537](https://github.com/operator-framework/operator-sdk/pull/3537) for more details._ -## In `v3-alpha` PROJECT files, add the `projectName` config key to your PROJECT file +## 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 @@ -143,11 +143,11 @@ _See [#3562](https://github.com/operator-framework/operator-sdk/pull/3562) for m - 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 templates +- Replace runtime creation of the metrics `Service` and `ServiceMonitor` with deploy-time kustomize manifests _See [#3466](https://github.com/operator-framework/operator-sdk/pull/3466) and [#3451](https://github.com/operator-framework/operator-sdk/pull/3451) for more details._ -## Removed pkg/k8sutils +## 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 @@ -190,12 +190,14 @@ _See [#3434](https://github.com/operator-framework/operator-sdk/pull/3434) and ## Move scorecard/alpha to scorecard -If you referenced 'operator-sdk alpha scorecard', you will -need to update them to use 'operator-sdk 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](https://master.sdk.operatorframework.io/docs/advanced-topics/scorecard/scorecard/) _See [#3444](https://github.com/operator-framework/operator-sdk/pull/3444) for more details._ -## Alpha scorecard output API updates +## Scorecard output formatting has changed Update any scripts interpretting the scorecard output to understand the v1alpha3 TestList format. From 21f442f77b7ef182fb0c3c6abfc7fc119f160072 Mon Sep 17 00:00:00 2001 From: "jesus m. rodriguez" Date: Mon, 27 Jul 2020 21:08:42 -0400 Subject: [PATCH 6/6] Incorporate some final changes to migration guide. --- .../docs/upgrading-sdk-version/v1.0.0-alpha.1.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/content/en/docs/upgrading-sdk-version/v1.0.0-alpha.1.md b/website/content/en/docs/upgrading-sdk-version/v1.0.0-alpha.1.md index 31dd0c1dec9..20b83142bc1 100644 --- a/website/content/en/docs/upgrading-sdk-version/v1.0.0-alpha.1.md +++ b/website/content/en/docs/upgrading-sdk-version/v1.0.0-alpha.1.md @@ -57,7 +57,7 @@ See the following PRs for details: - [#3532](https://github.com/operator-framework/operator-sdk/pull/3532) - [#3503](https://github.com/operator-framework/operator-sdk/pull/3503) -## pkg/log/zap is no longer a public API +## `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](https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.6.1/pkg/log/zap?tab=doc#Options.BindFlags). @@ -161,15 +161,15 @@ 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` +`InstrumentedEnqueueRequestForObject` can be imported from `github.com/operator-framework/operator-lib/handler`. _See [#3484](https://github.com/operator-framework/operator-sdk/pull/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`]( -https://github.com/kubernetes-sigs/controller-runtime/blob/229c3c357d9e6b07c3d6774010c35161a82b08f9/pkg/healthz/healthz.go#L187-L188)) -using [`manager.AddReadyzCheck`](https://github.com/kubernetes-sigs/controller-runtime/blob/229c3c357d9e6b07c3d6774010c35161a82b08f9/pkg/manager/manager.go#L73-L74) +https://github.com/kubernetes-sigs/controller-runtime/blob/229c3c357d9e6b07c3d6774010c35161a82b08f9/pkg/healthz/healthz.go#L187-L188)) +using [`manager.AddReadyzCheck`](https://github.com/kubernetes-sigs/controller-runtime/blob/229c3c357d9e6b07c3d6774010c35161a82b08f9/pkg/manager/manager.go#L73-L74). _See [#3476](https://github.com/operator-framework/operator-sdk/pull/3476) for more details._ @@ -188,19 +188,19 @@ for details. _See [#3434](https://github.com/operator-framework/operator-sdk/pull/3434) and [#3490](https://github.com/operator-framework/operator-sdk/pull/3490) for more details._ -## Move scorecard/alpha to scorecard +## 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](https://master.sdk.operatorframework.io/docs/advanced-topics/scorecard/scorecard/) +[scorecard documentation](https://master.sdk.operatorframework.io/docs/advanced-topics/scorecard/scorecard/). _See [#3444](https://github.com/operator-framework/operator-sdk/pull/3444) for more details._ ## Scorecard output formatting has changed Update any scripts interpretting the scorecard output to -understand the v1alpha3 TestList format. +understand the `v1alpha3.TestList` format. See the [`json`](https://master.sdk.operatorframework.io/docs/advanced-topics/scorecard/scorecard/#json-format) and [`text`](https://master.sdk.operatorframework.io/docs/advanced-topics/scorecard/scorecard/#text-format) format