https://pulumi.com logo
#kubernetes
Title
# kubernetes
d

dry-keyboard-94795

09/04/2023, 11:45 AM
Dealing with a GCP bug, which prevents me from deleting a Namespace timely. Is there a way to trigger a deletion, but don't wait for it? The end-goal would be have it marked correctly as "terminating", with the expectation that the cluster will delete once the stuck finalizers are cleared
Workaround I'm thinking of is to use
pulumi.Command
+ the
deleted_with
option on the Namespace, so that I can do a soft delete with
kubectl
directly (ie, mark as terminated, and let the cluster take care of it once all the finalizers are finished)
Having
skipAwait
specific to creation/update/delete steps would be handy, though!
Using a different workaround with
NamespacePatch
, but requires refreshes before the update that deletes the NS. For reference:
Copy code
k8s.core.v1.NamespacePatch(
    self.name,
    opts=self._default_opts.merge(p.ResourceOptions(depends_on=[ns], deleted_with=ns)),
    metadata=k8s.meta.v1.ObjectMetaArgs(
        name=ns.metadata["name"],
        annotations={
            "<http://pulumi.com/skipAwait|pulumi.com/skipAwait>": "true",
        },
    ),
)
(
_default_opts
is just
parent=self
in this case)