← Back to Pull requests

docs: add an Upgrade page with notes for v1.0 #418

Merged
gaker merged 3 files (244 lines) on Nov 24, 2026 22:20 UTC
View on GitHub
gaker gaker commented on Nov 24, 2026 00:34 UTC
Author

The changes since v0.20.0 include several that break an existing install unless someone acts first, and the release notes had no place for them beyond the generated PR list.

The new Upgrade page lists, for each release, what to do before upgrading and what behaves differently after. The v1.0 notes cover:

  • the prefect.io/allowed-api-urls annotation on API key Secrets and ConfigMaps, with a command that lists them

  • the new default Prefect version, and how to keep the old one

  • API settings in work pools, with a command that lists them

  • the operator's role when rbac.operator.create=false

  • NO_PROXY and Istio on worker and flow run pods

  • the RBAC the admission policies check, and Kubernetes 1.30

  • background pruning and Application deletion in Argo CD

  • --take-ownership on the first Helm upgrade, and the new ClusterRole names
  • The Downgrade section moves from the Install page to the Upgrade page.

    <details>
    <summary>Session context</summary>

    I checked each item against the rollout caveats in #379 to #407 and against the code in this stack, and ran the listing command against sample work pools on OrbStack. The page assumes the next release is v1.0.0. #402's label requirement is left out, because #406 replaced it with the annotation.

    </details>

    🤖 Generated with Claude Code

    Diff: 244 lines (+227 / -17) across 3 files Reviewer: chrisguidry Review duration: 1306m
    All Vouch review confidence checks passed
    Residual risk 0.07 = Change Risk (0.39) × (1 − Review Confidence (0.82)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.39 · 244 lines diff across 3 files
    0.39
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.75 · 2 substantive comment(s)
    0.75
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 50%
    82%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.329
    Real PR Conversation Timeline
    4 items
    chrisguidry chrisguidry commented on code on Nov 24, 2026 19:51 UTC
    Code Review
    docs/content/getting-started/upgrade.md:1
    @@ -0,0 +1,174 @@
    +---
    +title: Upgrade
    +weight: 3
    +---
    +
    +Read the notes below for each release between yours and the new one, then
    +upgrade the operator. Each
    +[GitHub release](https://github.com/PrefectHQ/prefect-operator/releases) also
    +lists every change it includes.
    +
    +## Upgrade the operator
    +
    +With the release manifest, apply the new release's manifest. It updates the
    +CRDs too:
    +
    +```sh
    +VERSION=v0.21.0
    +kubectl apply --server-side \
    +  -f https://github.com/PrefectHQ/prefect-operator/releases/download/$VERSION/prefect-operator.yaml
    +```
    +
    +With Helm, find the chart version whose `APP VERSION` is the release, and
    +upgrade to it:
    +
    +```sh
    +helm repo update
    +helm search repo prefect-operator/prefect-operator --versions | head
    +helm upgrade prefect-operator prefect-operator/prefect-operator \
    +  --namespace prefect-system --version <chart-version>
    +```
    +
    +## v0.21
    +
    +### Before you upgrade
    +
    +**Annotate the Secrets and ConfigMaps that hold API keys.** The operator reads
    +an API key only from an object with the `prefect.io/allowed-api-urls`
    +annotation, which lists the API URLs the key may be sent to. Until the object
    +has it, a resource that uses the key has `Synced` `False` with the reason
    +`PrefectClientError`. Deleting the resource keeps it in `Terminating` for an
    +hour, and then leaves its object in Prefect. To list the objects that need the
    +annotation:
    +
    +```sh
    +kubectl get prefectworkpools,prefectworkqueues,prefectdeployments,prefectautomations -A \
    +  -o jsonpath='{range .items[*]}{.metadata.namespace} secret/{.spec.server.apiKey.valueFrom.secretKeyRef.name} configmap/{.spec.server.apiKey.valueFrom.configMapKeyRef.name}{"\n"}{end}' |
    +  awk '{ for (i = 2; i <= 3; i++) if ($i !~ /\/$/) print $1, $i }' | sort -u
    +```
    +
    +```text
    +data-eng secret/prefect-api-key
    +ml configmap/prefect-api-key
    +```
    +
    +Then annotate each one with the URL its resources use:
    +
    +```sh
    +kubectl -n data-eng annotate secret/prefect-api-key \
    +  prefect.io/allowed-api-urls=https://api.prefect.cloud/api/accounts/<account-id>/workspaces/<workspace-id>
    +```
    +
    +See [the annotation](../../guides/prefect-cloud/#the-prefectioallowed-api-urls-annotation)
    +for which URLs an entry matches.
    +
    +**Grant the RBAC that the admission policies check.** The release manifest
    +and the chart now install
    +[admission policies](../../guides/permissions/#admission-policies). Writing a
    +`PrefectServer` or `PrefectWorkPool` then requires `create` on `deployments`
    +in its namespace. Writing a `PrefectWorkQueue`, `PrefectDeployment`, or
    +`PrefectAutomation` requires `get` on the Secret or ConfigMap that it reads
    +the API key or auth string from. The policies check new writes only, so existing resources
    +keep working until someone changes them. With Helm, set
    +`admissionPolicy.enabled=false` to leave the policies out.
    +
    +**Run Kubernetes 1.30 or later.** The policies need it, and the chart refuses
    +to install on earlier versions.
    +
    +**With Argo CD, prune with background deletion.** The policies refuse a
    +foreground delete of a `PrefectServer`, and Argo CD prunes with foreground
    +deletion. Set the `PrunePropagationPolicy=background` sync option on each
    +application that includes a server.
    +
    +**With Helm, let the release take over the CRDs.** The chart now upgrades the
    +CRDs, and the first upgrade fails with an error that a CRD "exists and cannot
    +be imported into the current release". With Helm 3.17 or later, pass
    +`--take-ownership` on that upgrade. For an earlier Helm, see
    +[the chart README](https://github.com/PrefectHQ/prefect-operator/blob/main/deploy/charts/prefect-operator/README.md#upgrading-from-a-chart-that-installed-crds-from-crds).
    +If you run more than one release of the chart in a cluster, set
    +`crds.install=false` on all but one.
    +
    +The chart also creates editor and viewer ClusterRoles for
    +`PrefectWorkQueue`, `PrefectDeployment`, and `PrefectAutomation`, such as
    +`prefect-workqueue:editor`. The upgrade fails if a ClusterRole with one of

    Non-blocking: this holds only for an upgrade without --take-ownership. The paragraph above tells Helm 3.17+ users to pass --take-ownership on this same upgrade, and that flag adopts every existing object in the rendered chart, not only the CRDs. A ClusterRole someone already created as prefect-workqueue:editor is then taken over and its rules replaced, with no error. The release manifest overwrites it the same way. Maybe: "If a ClusterRole with one of those names already exists outside the release, the upgrade fails, or with --take-ownership replaces it. To keep yours, set rbac.userRoles.<resource>.editor.create or .viewer.create to false."

    chrisguidry chrisguidry approved these changes on Nov 24, 2026 19:51 UTC
    Approved Reviewer

    LGTM

    gaker gaker commented on code on Nov 24, 2026 20:22 UTC
    Code Review
    docs/content/getting-started/upgrade.md:1
    @@ -0,0 +1,174 @@
    +---
    +title: Upgrade
    +weight: 3
    +---
    +
    +Read the notes below for each release between yours and the new one, then
    +upgrade the operator. Each
    +[GitHub release](https://github.com/PrefectHQ/prefect-operator/releases) also
    +lists every change it includes.
    +
    +## Upgrade the operator
    +
    +With the release manifest, apply the new release's manifest. It updates the
    +CRDs too:
    +
    +```sh
    +VERSION=v0.21.0
    +kubectl apply --server-side \
    +  -f https://github.com/PrefectHQ/prefect-operator/releases/download/$VERSION/prefect-operator.yaml
    +```
    +
    +With Helm, find the chart version whose `APP VERSION` is the release, and
    +upgrade to it:
    +
    +```sh
    +helm repo update
    +helm search repo prefect-operator/prefect-operator --versions | head
    +helm upgrade prefect-operator prefect-operator/prefect-operator \
    +  --namespace prefect-system --version <chart-version>
    +```
    +
    +## v0.21
    +
    +### Before you upgrade
    +
    +**Annotate the Secrets and ConfigMaps that hold API keys.** The operator reads
    +an API key only from an object with the `prefect.io/allowed-api-urls`
    +annotation, which lists the API URLs the key may be sent to. Until the object
    +has it, a resource that uses the key has `Synced` `False` with the reason
    +`PrefectClientError`. Deleting the resource keeps it in `Terminating` for an
    +hour, and then leaves its object in Prefect. To list the objects that need the
    +annotation:
    +
    +```sh
    +kubectl get prefectworkpools,prefectworkqueues,prefectdeployments,prefectautomations -A \
    +  -o jsonpath='{range .items[*]}{.metadata.namespace} secret/{.spec.server.apiKey.valueFrom.secretKeyRef.name} configmap/{.spec.server.apiKey.valueFrom.configMapKeyRef.name}{"\n"}{end}' |
    +  awk '{ for (i = 2; i <= 3; i++) if ($i !~ /\/$/) print $1, $i }' | sort -u
    +```
    +
    +```text
    +data-eng secret/prefect-api-key
    +ml configmap/prefect-api-key
    +```
    +
    +Then annotate each one with the URL its resources use:
    +
    +```sh
    +kubectl -n data-eng annotate secret/prefect-api-key \
    +  prefect.io/allowed-api-urls=https://api.prefect.cloud/api/accounts/<account-id>/workspaces/<workspace-id>
    +```
    +
    +See [the annotation](../../guides/prefect-cloud/#the-prefectioallowed-api-urls-annotation)
    +for which URLs an entry matches.
    +
    +**Grant the RBAC that the admission policies check.** The release manifest
    +and the chart now install
    +[admission policies](../../guides/permissions/#admission-policies). Writing a
    +`PrefectServer` or `PrefectWorkPool` then requires `create` on `deployments`
    +in its namespace. Writing a `PrefectWorkQueue`, `PrefectDeployment`, or
    +`PrefectAutomation` requires `get` on the Secret or ConfigMap that it reads
    +the API key or auth string from. The policies check new writes only, so existing resources
    +keep working until someone changes them. With Helm, set
    +`admissionPolicy.enabled=false` to leave the policies out.
    +
    +**Run Kubernetes 1.30 or later.** The policies need it, and the chart refuses
    +to install on earlier versions.
    +
    +**With Argo CD, prune with background deletion.** The policies refuse a
    +foreground delete of a `PrefectServer`, and Argo CD prunes with foreground
    +deletion. Set the `PrunePropagationPolicy=background` sync option on each
    +application that includes a server.
    +
    +**With Helm, let the release take over the CRDs.** The chart now upgrades the
    +CRDs, and the first upgrade fails with an error that a CRD "exists and cannot
    +be imported into the current release". With Helm 3.17 or later, pass
    +`--take-ownership` on that upgrade. For an earlier Helm, see
    +[the chart README](https://github.com/PrefectHQ/prefect-operator/blob/main/deploy/charts/prefect-operator/README.md#upgrading-from-a-chart-that-installed-crds-from-crds).
    +If you run more than one release of the chart in a cluster, set
    +`crds.install=false` on all but one.
    +
    +The chart also creates editor and viewer ClusterRoles for
    +`PrefectWorkQueue`, `PrefectDeployment`, and `PrefectAutomation`, such as
    +`prefect-workqueue:editor`. The upgrade fails if a ClusterRole with one of

    Fixed in 7038fc7, for --take-ownership and for the release manifest.

    Reviewers
    Assignees
    gaker gaker
    Labels
    risk: low confidence: 82.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 38.8% (MEDIUM) · Higher = larger blast radius
    38.8%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 82.5% · Lower = rushed or shallow review
    82.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 6.8% · Safe to merge
    6.8%