Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Destroying a resource fails with "timed out waiting to be Ready" #1418

Closed
Tracked by #2824
lukehoban opened this issue Jan 7, 2021 · 12 comments · Fixed by #3133
Closed
Tracked by #2824

Destroying a resource fails with "timed out waiting to be Ready" #1418

lukehoban opened this issue Jan 7, 2021 · 12 comments · Fixed by #3133
Assignees
Labels
kind/enhancement Improvements or new features resolution/fixed This issue was fixed

Comments

@lukehoban
Copy link
Contributor

I am unable to destroy a Kubernetes CustomResourceDefinition resource, and get a failure that says "timed out waiting to be Ready", even though there is no need to wait for it to be ready to delete it. This blocs me from doing anything with my stack.

gitlab pulumi up
Previewing update (eks)

View Live: https://app.pulumi.com/lukehoban/gitlab/eks/previews/f2d3e6c1-26f8-43e1-a7e4-d825e8f3b963

     Type                                                                    Name                           Plan       
     pulumi:pulumi:Stack                                                     gitlab-eks                                
 -   └─ kubernetes:helm.sh/v3:Chart                                          gitlab-server                  delete     
 -      └─ kubernetes:apiextensions.k8s.io/v1beta1:CustomResourceDefinition  challenges.certmanager.k8s.io  delete     
 
Resources:
    - 2 to delete
    29 unchanged

Do you want to perform this update? yes
Updating (eks)

View Live: https://app.pulumi.com/lukehoban/gitlab/eks/updates/5

     Type                                                                 Name                           Status                  Info
     pulumi:pulumi:Stack                                                  gitlab-eks                     **failed**              1 error
     ├─ eks:index:Cluster                                                 gitlab                                                 
     │  └─ aws:eks:Cluster                                                gitlab-eksCluster                                      
 -   └─ kubernetes:apiextensions.k8s.io/v1beta1:CustomResourceDefinition  challenges.certmanager.k8s.io  **deleting failed**     1 error
 
Diagnostics:
  kubernetes:apiextensions.k8s.io/v1beta1:CustomResourceDefinition (challenges.certmanager.k8s.io):
    error: 'challenges.certmanager.k8s.io' timed out waiting to be Ready
@lukehoban
Copy link
Contributor Author

FWIW - here's what the resource shows:

status:
  acceptedNames:
    kind: Challenge
    listKind: ChallengeList
    plural: challenges
    singular: challenge
  conditions:
  - lastTransitionTime: "2021-01-07T19:40:30Z"
    message: no conflicts found
    reason: NoConflicts
    status: "True"
    type: NamesAccepted
  - lastTransitionTime: "2021-01-07T19:40:31Z"
    message: the initial names have been accepted
    reason: InitialNamesAccepted
    status: "True"
    type: Established
  - lastTransitionTime: "2021-01-07T19:40:32Z"
    message: protected groups must have approval annotation "api-approved.kubernetes.io",
      see https://github.com/kubernetes/enhancements/pull/1111
    reason: MissingAnnotation
    status: "False"
    type: KubernetesAPIApprovalPolicyConformant
  - lastTransitionTime: "2021-01-07T21:36:40Z"
    message: CustomResource deletion is in progress
    reason: InstanceDeletionInProgress
    status: "True"
    type: Terminating
  storedVersions:
  - v1alpha1

@lukehoban
Copy link
Contributor Author

Hmm - unfortunately kubectl delete hangs on both this CRD and the individual CRs managed by the CRD. So maybe some non-Pulumi problem. Though the Pulumi error message at least is misleading.

$ KUBECONFIG=./kubeconfig.json kubectl get challenges                                             
NAME                                      STATE     DOMAIN                             AGE
gitlab-server-gitlab-tls-602325406-0      pending   gitlab.gitlab.lukestestapp.net     150m
gitlab-server-minio-tls-1893706185-0      pending   minio.gitlab.lukestestapp.net      150m
gitlab-server-registry-tls-3624291886-0   pending   registry.gitlab.lukestestapp.net   150m
$ KUBECONFIG=./kubeconfig.json kubectl delete challenges gitlab-server-minio-tls-1893706185-0 
challenge.certmanager.k8s.io "gitlab-server-minio-tls-1893706185-0" deleted
<hangs here before returning>

@lkt82
Copy link

lkt82 commented Jan 14, 2021

Hi ran into this issues with cert-manager today as well. Did you find any workarounds ?

@lblackstone
Copy link
Member

I've hit this issue before as well, and was able to work around it with kubectl. It has something to do with finalizers on that CRD. We should figure out how to fix in the provider, but you can work around in the meantime with this:

kubectl patch crd challenges.certmanager.k8s.io -p '{"metadata":{"finalizers": []}}' --type=merge

@knowhoper
Copy link

I am also seeing this issue with ArgoCD installed via Helm. I also tried rendering the Helm Chart and deploying standard K8s resources.

Operation before timeout - timeout can be 10+ minutes depending on config:

 pulumi:pulumi:Stack                                             acme-infrastructure-gcp-beta                     
  • └─ kubernetes:apiextensions.k8s.io/v1:CustomResourceDefinition appprojects.argoproj.io deleting (74s)...

Error

error: 'appprojects.argoproj.io' timed out waiting to be Ready .

@knowhoper
Copy link

I solved this using a Github Action FYI:

      - name: Manual Delete Argo CRD 
        continue-on-error: true
        run: |
          gcloud container clusters get-credentials gke-aus-se1-beta --zone australia-southeast1-a --project acme-prd
          kubectl delete customresourcedefinition appprojects.argoproj.io --wait=false
          sleep 2
          kubectl patch crd appprojects.argoproj.io -p '{"metadata":{"finalizers": []}}' --type=merge

@lblackstone lblackstone added the kind/bug Some behavior is incorrect or out of spec label Jul 13, 2023
@blampe
Copy link
Contributor

blampe commented Nov 30, 2023

So maybe some non-Pulumi problem.

Yeah, there are a lot of issues floating around like kubernetes/kubernetes#60538 and cert-manager/cert-manager#1582 which recommend deleting stuck finalizers, but the fact they are stuck is a symptom of something else -- like the thing responsible for finalizing getting deleted before it could finalize other resources.

https://kubernetes.io/docs/concepts/overview/working-with-objects/finalizers/

Finalizers are usually added to resources for a reason, so forcefully removing them can lead to issues in your cluster. This should only be done when the purpose of the finalizer is understood and is accomplished in another way (for example, manually cleaning up some dependent object).

What would an appropriate Pulumi fix look like in this situation?

It feels like a dependency problem, like we should be able to delete the finali-zee before the finali-zer. But this doesn't work if there are any CRDs Pulumi doesn't know about, which is often the case with cert-manager and argo where this has come up. Even if we tear down everything we know about correctly, we can still deadlock while trying to delete a namespace because some unknown-to-us CRDs are stuck.

An annotation like pulumi.com/skipFinalizers: "true" seems scary, because we normally want to let finalizers do their job. But maybe this is actually OK? Users could conditionally set it to true in CI/CD where this tends to crop up more frequently.

@lukehoban lukehoban added kind/enhancement Improvements or new features and removed kind/bug Some behavior is incorrect or out of spec labels Dec 6, 2023
@lukehoban
Copy link
Contributor Author

One additional thought - could we add a warning/error that indicates in the case of an await timeout on a delete, where we know there are finalizers on the resources, that the deletion may be blocked on finalizers? That might be the right improvement to make to help point users at where the underlying problem is so they can investigate using other tools, and then resolve this as otherwise by design?

@blampe blampe added resolution/by-design This issue won't be fixed because the functionality is working as designed and removed kind/enhancement Improvements or new features labels Jul 26, 2024
@EronWright
Copy link
Contributor

As a best practice, users should use Pulumi dependencies to ensure that custom resources have the operator and its CRDs as a dependency. One shouldn't delete an operator, or its namespace, or its CRDs, until all CRs are completely deleted. An easy way to do that is to install the operator in a separate component (e.g. a v4/Chart), and draw a dependency on that component, to ensure strict ordering at both install and uninstall time.

@rshade
Copy link
Contributor

rshade commented Aug 7, 2024

@EronWright while I agree best practice is something we should strive for, I think its unfortunately not always where we are at. I have done quite a bit of finalizer hacking on kubernetes to get destroys to work. Usually this has lead me to just delete the cluster in the cloud and then refresh the resource, to complete the destroy. I don't think this is a workflow we want to encourage and I think @lukehoban's comment about a help message, possibly with a helpful kubectl command to fix it, and a "Are you missing a dependency on" would be a great addition and really helpful to users. I am not sure this is possible, but would be pretty awesome, is if we could detect the missing dependency and suggest that like: You are missing a dependency between Crd-A and CustomResourceA, you can delete them now by kubectl patch...

@pulumi-bot
Copy link
Contributor

Cannot close issue:

  • does not have required labels: kind/

Please fix these problems and try again.

1 similar comment
@pulumi-bot
Copy link
Contributor

Cannot close issue:

  • does not have required labels: kind/

Please fix these problems and try again.

@blampe blampe added the kind/enhancement Improvements or new features label Aug 21, 2024
@blampe blampe closed this as completed Aug 21, 2024
@mikhailshilkov mikhailshilkov removed the resolution/by-design This issue won't be fixed because the functionality is working as designed label Aug 26, 2024
blampe added a commit that referenced this issue Sep 3, 2024
- The new `enableSecretMutable` provider configuration option treats changes to
  `Secrets` as updates instead of replacements (similar to the
  `enableConfigMapMutable` option).

  The default replacement behavior can be preserved for a particular `Secret`
  by setting its `immutable` field to `true`.
  (#2291)

  **Note:** These options (`enableSecretMutable` and `enableConfigMapMutable`)
  may become the default behavior in a future v5 release of the provider.
  Programs that depend on the replacement of `Secrets` and `ConfigMaps` (e.g.
  to trigger updates for downstream dependencies like `Deployments`) are
  recommended to explicitly specify `immutable: true`.

- A warning is now emitted if an object has finalizers which might be blocking
  deletion. (#1418)

- **EXPERIMENTAL**: Generic await logic is now available as an opt-in feature.
  Running a program with `PULUMI_K8S_AWAIT_ALL=true` will now cause Pulumi to
  await readiness for _all_ resources, including custom resources.

  Generic readiness is determined according to some well-known conventions (like
  the "Ready" condition) as determined by [cli-utils](https://github.com/kubernetes-sigs/cli-utils/tree/master/pkg/kstatus).

  Pulumi's current behavior, without this feature enabled, is to assume some
  resources are immediately available, which can cause downstream resources to
  fail.

  Existing readiness logic is unaffected by this setting.
  (#2996)

- **EXPERIMENTAL**: The `pulumi.com/waitFor` annotation was introduced to allow
  for custom readiness checks. This override Pulumi's own await logic for the
  resource (however the `pulumi.com/skipAwait` annotation still takes
  precedence).

  The value of this annotation can take 3 forms:
    1. A string prefixed with `jsonpath=` followed by a
       [JSONPath](https://kubernetes.io/docs/reference/kubectl/jsonpath/)
       expression and an optional value.

       The JSONPath expression accepts the same syntax as
       `kubectl get -o jsonpath={...}`.

       If a value is provided, the resource is considered ready when the
       JSONPath expression evaluates to the same value. For example this
       resource expects its "phase" field to have a value of "Running":

           `pulumi.com/waitFor: "jsonpath={.status.phase}=Running"`

       If a value is not provided, the resource will be considered ready when
       any value exists at the given path, similar to `kubectl wait --for
       jsonpath=...`. This resource will wait until it has a webhook configured
       with a CA bundle:

           `pulumi.com/waitFor: "jsonpath={.webhooks[*].clientConfig.caBundle}"`

    2. A string prefixed with `condition=` followed by the type of the
       condition and an optional status. This matches the behavior of
       `kubectl wait --for=condition=...` and will wait until the resource has a
       matching condition. The expected status defaults to "True" if not
       specified.

           `pulumi.com/waitFor: "condition=Synced"`

           `pulumi.com/waitFor: "condition=Reconciling=False"`

    3. A string containing a JSON array of multiple `jsonpath=` and
       `condition=` expressions.

           `pulumi.com/waitFor: '["jsonpath={.foo}", "condition=Bar"]'`

- Pulumi will now emit logs for any Kubernetes "Warning" Events associated with
  resources being created, updated or deleted.
  (https://github.com/pulumi/pulumi-kubernetes/pull/3135/files)

- The `immutable` field is now respected for `ConfigMaps` when the
  provider is configured with `enableConfigMapMutable`.
(#3181)

- Fixed a panic that could occur during deletion.
  (#3157)
blampe added a commit that referenced this issue Sep 3, 2024
>[!IMPORTANT]
> The `enableSecretMutable` and `enableConfigMapMutable` options may
become the default behavior in a future v5 release of the provider.
Programs that depend on the replacement of `Secrets` and `ConfigMaps`
(e.g. to trigger updates for downstream dependencies like `Deployments`)
are recommended to explicitly specify `immutable: true`.

### Added

- The new `enableSecretMutable` provider configuration option treats
changes to `Secrets` as updates instead of replacements (similar to the
`enableConfigMapMutable` option).

The default replacement behavior can be preserved for a particular
`Secret` by setting its `immutable` field to `true`.
(#2291)

- A warning is now emitted if an object has finalizers which might be
blocking deletion.
(#1418)

- **EXPERIMENTAL**: Generic await logic is now available as an opt-in
feature. Running a program with `PULUMI_K8S_AWAIT_ALL=true` will now
cause Pulumi to await readiness for _all_ resources, including custom
resources.

Generic readiness is determined according to some well-known conventions
(like the "Ready" condition) as determined by
[cli-utils](https://github.com/kubernetes-sigs/cli-utils/tree/master/pkg/kstatus).

Pulumi's current behavior without this feature enabled is to assume some
resources are immediately available, which can cause downstream
resources to fail.

Existing readiness logic is unaffected by this setting.
(#2996)

- **EXPERIMENTAL**: The `pulumi.com/waitFor` annotation was introduced
to allow for custom readiness checks. This override Pulumi's own await
logic for the resource (however the `pulumi.com/skipAwait` annotation
still takes precedence).

  The value of this annotation can take 3 forms:

1. A string prefixed with `jsonpath=` followed by a
[JSONPath](https://kubernetes.io/docs/reference/kubectl/jsonpath/)
expression and an optional value.

The JSONPath expression accepts the same syntax as `kubectl get -o
jsonpath={...}`.

If a value is provided, the resource is considered ready when the
JSONPath expression evaluates to the same value. For example this
resource expects its "phase" field to have a value of "Running":

           `pulumi.com/waitFor: "jsonpath={.status.phase}=Running"`

If a value is not provided, the resource will be considered ready when
any value exists at the given path, similar to `kubectl wait --for
jsonpath=...`. This resource will wait until it has a webhook configured
with a CA bundle:

`pulumi.com/waitFor: "jsonpath={.webhooks[*].clientConfig.caBundle}"`

2. A string prefixed with `condition=` followed by the type of the
condition and an optional status. This matches the behavior of `kubectl
wait --for=condition=...` and will wait until the resource has a
matching condition. The expected status defaults to "True" if not
specified.

           `pulumi.com/waitFor: "condition=Synced"`

           `pulumi.com/waitFor: "condition=Reconciling=False"`

3. A string containing a JSON array of multiple `jsonpath=` and
`condition=` expressions.

           `pulumi.com/waitFor: '["jsonpath={.foo}", "condition=Bar"]'`

- Pulumi will now emit logs for any Kubernetes "Warning" Events
associated with resources being created, updated or deleted.
(https://github.com/pulumi/pulumi-kubernetes/pull/3135/files)

### Fixed

- The `immutable` field is now respected for `ConfigMaps` when the
provider is configured with `enableConfigMapMutable`.
(#3181)

- Fixed a panic that could occur during deletion.
(#3157)
lumiere-bot bot referenced this issue in coolguy1771/home-ops Sep 16, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@pulumi/kubernetes](https://pulumi.com)
([source](https://github.com/pulumi/pulumi-kubernetes)) |
dependencies | minor | [`4.17.1` ->
`4.18.1`](https://renovatebot.com/diffs/npm/@pulumi%2fkubernetes/4.17.1/4.18.1)
|

---

### Release Notes

<details>
<summary>pulumi/pulumi-kubernetes (@&#8203;pulumi/kubernetes)</summary>

###
[`v4.18.1`](https://github.com/pulumi/pulumi-kubernetes/blob/HEAD/CHANGELOG.md#4181-September-13-2024)

[Compare
Source](https://github.com/pulumi/pulumi-kubernetes/compare/v4.18.0...v4.18.1)

##### Added

- Schemagen is now a library that can be consumed by other packages.
([https://github.com/pulumi/pulumi-kubernetes/pull/3187](https://github.com/pulumi/pulumi-kubernetes/pull/3187))

##### Changed

- Updated beta Kubernetes client libraries to stable v1.31 release.
([https://github.com/pulumi/pulumi-kubernetes/pull/3196](https://github.com/pulumi/pulumi-kubernetes/pull/3196))

###
[`v4.18.0`](https://github.com/pulumi/pulumi-kubernetes/blob/HEAD/CHANGELOG.md#4180-September-3-2024)

[Compare
Source](https://github.com/pulumi/pulumi-kubernetes/compare/v4.17.1...v4.18.0)

##### Added

- The new `enableSecretMutable` provider configuration option treats
changes to
    `Secrets` as updates instead of replacements (similar to the
    `enableConfigMapMutable` option).

The default replacement behavior can be preserved for a particular
`Secret`
    by setting its `immutable` field to `true`.

[https://github.com/pulumi/pulumi-kubernetes/issues/2291](https://github.com/pulumi/pulumi-kubernetes/issues/2291)2291)

**Note:** These options (`enableSecretMutable` and
`enableConfigMapMutable`)
may become the default behavior in a future v5 release of the provider.
Programs that depend on the replacement of `Secrets` and `ConfigMaps`
(e.g.
to trigger updates for downstream dependencies like `Deployments`) are
    recommended to explicitly specify `immutable: true`.

- A warning is now emitted if an object has finalizers which might be
blocking

deletio[https://github.com/pulumi/pulumi-kubernetes/issues/1418](https://github.com/pulumi/pulumi-kubernetes/issues/1418)1418)

- **EXPERIMENTAL**: Generic await logic is now available as an opt-in
feature.
Running a program with `PULUMI_K8S_AWAIT_ALL=true` will now cause Pulumi
to
    await readiness for *all* resources, including custom resources.

Generic readiness is determined according to some well-known conventions
(like
the "Ready" condition) as determined by
[cli-utils](https://github.com/kubernetes-sigs/cli-utils/tree/master/pkg/kstatus).

Pulumi's current behavior, without this feature enabled, is to assume
some
resources are immediately available, which can cause downstream
resources to
    fail.

    Existing readiness logic is unaffected by this setting.

[https://github.com/pulumi/pulumi-kubernetes/issues/2996](https://github.com/pulumi/pulumi-kubernetes/issues/2996)2996)

- **EXPERIMENTAL**: The `pulumi.com/waitFor` annotation was introduced
to allow
for custom readiness checks. This override Pulumi's own await logic for
the
    resource (however the `pulumi.com/skipAwait` annotation still takes
    precedence).

    The value of this annotation can take 3 forms:

    1.  A string prefixed with `jsonpath=` followed by a
[JSONPath](https://kubernetes.io/docs/reference/kubectl/jsonpath/)
        expression and an optional value.

        The JSONPath expression accepts the same syntax as
        `kubectl get -o jsonpath={...}`.

If a value is provided, the resource is considered ready when the
JSONPath expression evaluates to the same value. For example this
        resource expects its "phase" field to have a value of "Running":

            `pulumi.com/waitFor: "jsonpath={.status.phase}=Running"`

If a value is not provided, the resource will be considered ready when
any value exists at the given path, similar to `kubectl wait --for
jsonpath=...`. This resource will wait until it has a webhook configured
        with a CA bundle:

`pulumi.com/waitFor: "jsonpath={.webhooks[*].clientConfig.caBundle}"`

    2.  A string prefixed with `condition=` followed by the type of the
        condition and an optional status. This matches the behavior of
`kubectl wait --for=condition=...` and will wait until the resource has
a
matching condition. The expected status defaults to "True" if not
        specified.

            `pulumi.com/waitFor: "condition=Synced"`

            `pulumi.com/waitFor: "condition=Reconciling=False"`

    3.  A string containing a JSON array of multiple `jsonpath=` and
        `condition=` expressions.

`pulumi.com/waitFor: '["jsonpath={.foo}", "condition=Bar"]'`

- Pulumi will now emit logs for any Kubernetes "Warning" Events
associated with
resources being created, updated or
delete[https://github.com/pulumi/pulumi-kubernetes/pull/3135](https://github.com/pulumi/pulumi-kubernetes/pull/3135)ull/3135/files)

##### Fixed

- The `immutable` field is now respected for `ConfigMaps` when the
provider is configured with `enableConfigMapMutable`.

[https://github.com/pulumi/pulumi-kubernetes/issues/3181](https://github.com/pulumi/pulumi-kubernetes/issues/3181)3181)

- Fixed a panic that could occur during deletion.
([https://github.com/pulumi/pulumi-kubernetes/issues/3157](https://github.com/pulumi/pulumi-kubernetes/issues/3157))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://github.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC43Ny4wIiwidXBkYXRlZEluVmVyIjoiMzguNzcuNiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsidHlwZS9taW5vciJdfQ==-->

Co-authored-by: lumiere-bot[bot] <98047013+lumiere-bot[bot]@users.noreply.github.com>
lumiere-bot bot referenced this issue in coolguy1771/home-ops Sep 16, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@pulumi/kubernetes](https://pulumi.com)
([source](https://github.com/pulumi/pulumi-kubernetes)) |
dependencies | minor | [`4.17.1` ->
`4.18.1`](https://renovatebot.com/diffs/npm/@pulumi%2fkubernetes/4.17.1/4.18.1)
|

---

### Release Notes

<details>
<summary>pulumi/pulumi-kubernetes (@&#8203;pulumi/kubernetes)</summary>

###
[`v4.18.1`](https://github.com/pulumi/pulumi-kubernetes/blob/HEAD/CHANGELOG.md#4181-September-13-2024)

[Compare
Source](https://github.com/pulumi/pulumi-kubernetes/compare/v4.18.0...v4.18.1)

##### Added

- Schemagen is now a library that can be consumed by other packages.
([https://github.com/pulumi/pulumi-kubernetes/pull/3187](https://github.com/pulumi/pulumi-kubernetes/pull/3187))

##### Changed

- Updated beta Kubernetes client libraries to stable v1.31 release.
([https://github.com/pulumi/pulumi-kubernetes/pull/3196](https://github.com/pulumi/pulumi-kubernetes/pull/3196))

###
[`v4.18.0`](https://github.com/pulumi/pulumi-kubernetes/blob/HEAD/CHANGELOG.md#4180-September-3-2024)

[Compare
Source](https://github.com/pulumi/pulumi-kubernetes/compare/v4.17.1...v4.18.0)

##### Added

- The new `enableSecretMutable` provider configuration option treats
changes to
    `Secrets` as updates instead of replacements (similar to the
    `enableConfigMapMutable` option).

The default replacement behavior can be preserved for a particular
`Secret`
    by setting its `immutable` field to `true`.

[https://github.com/pulumi/pulumi-kubernetes/issues/2291](https://github.com/pulumi/pulumi-kubernetes/issues/2291)2291)

**Note:** These options (`enableSecretMutable` and
`enableConfigMapMutable`)
may become the default behavior in a future v5 release of the provider.
Programs that depend on the replacement of `Secrets` and `ConfigMaps`
(e.g.
to trigger updates for downstream dependencies like `Deployments`) are
    recommended to explicitly specify `immutable: true`.

- A warning is now emitted if an object has finalizers which might be
blocking

deletio[https://github.com/pulumi/pulumi-kubernetes/issues/1418](https://github.com/pulumi/pulumi-kubernetes/issues/1418)1418)

- **EXPERIMENTAL**: Generic await logic is now available as an opt-in
feature.
Running a program with `PULUMI_K8S_AWAIT_ALL=true` will now cause Pulumi
to
    await readiness for *all* resources, including custom resources.

Generic readiness is determined according to some well-known conventions
(like
the "Ready" condition) as determined by
[cli-utils](https://github.com/kubernetes-sigs/cli-utils/tree/master/pkg/kstatus).

Pulumi's current behavior, without this feature enabled, is to assume
some
resources are immediately available, which can cause downstream
resources to
    fail.

    Existing readiness logic is unaffected by this setting.

[https://github.com/pulumi/pulumi-kubernetes/issues/2996](https://github.com/pulumi/pulumi-kubernetes/issues/2996)2996)

- **EXPERIMENTAL**: The `pulumi.com/waitFor` annotation was introduced
to allow
for custom readiness checks. This override Pulumi's own await logic for
the
    resource (however the `pulumi.com/skipAwait` annotation still takes
    precedence).

    The value of this annotation can take 3 forms:

    1.  A string prefixed with `jsonpath=` followed by a
[JSONPath](https://kubernetes.io/docs/reference/kubectl/jsonpath/)
        expression and an optional value.

        The JSONPath expression accepts the same syntax as
        `kubectl get -o jsonpath={...}`.

If a value is provided, the resource is considered ready when the
JSONPath expression evaluates to the same value. For example this
        resource expects its "phase" field to have a value of "Running":

            `pulumi.com/waitFor: "jsonpath={.status.phase}=Running"`

If a value is not provided, the resource will be considered ready when
any value exists at the given path, similar to `kubectl wait --for
jsonpath=...`. This resource will wait until it has a webhook configured
        with a CA bundle:

`pulumi.com/waitFor: "jsonpath={.webhooks[*].clientConfig.caBundle}"`

    2.  A string prefixed with `condition=` followed by the type of the
        condition and an optional status. This matches the behavior of
`kubectl wait --for=condition=...` and will wait until the resource has
a
matching condition. The expected status defaults to "True" if not
        specified.

            `pulumi.com/waitFor: "condition=Synced"`

            `pulumi.com/waitFor: "condition=Reconciling=False"`

    3.  A string containing a JSON array of multiple `jsonpath=` and
        `condition=` expressions.

`pulumi.com/waitFor: '["jsonpath={.foo}", "condition=Bar"]'`

- Pulumi will now emit logs for any Kubernetes "Warning" Events
associated with
resources being created, updated or
delete[https://github.com/pulumi/pulumi-kubernetes/pull/3135](https://github.com/pulumi/pulumi-kubernetes/pull/3135)ull/3135/files)

##### Fixed

- The `immutable` field is now respected for `ConfigMaps` when the
provider is configured with `enableConfigMapMutable`.

[https://github.com/pulumi/pulumi-kubernetes/issues/3181](https://github.com/pulumi/pulumi-kubernetes/issues/3181)3181)

- Fixed a panic that could occur during deletion.
([https://github.com/pulumi/pulumi-kubernetes/issues/3157](https://github.com/pulumi/pulumi-kubernetes/issues/3157))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://github.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC43Ny4wIiwidXBkYXRlZEluVmVyIjoiMzguNzcuNiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsidHlwZS9taW5vciJdfQ==-->

Co-authored-by: lumiere-bot[bot] <98047013+lumiere-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Improvements or new features resolution/fixed This issue was fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants