Hi, using typescript. I'm currently running into t...
# general
c
Hi, using typescript. I'm currently running into the problem that the
pulumi preview
command due to an rancher admission webhook which doesn't support dry runs for k8s services.
Copy code
Diagnostics:
  kubernetes:core/v1:Service (service):
    error: Preview failed: 1 error occurred:
    	* the Kubernetes API server reported that "<namespace>/<service name>" failed to fully initialize or become live: admission webhook "rancher-externalip-webhook.rancher-externalip-webhook.svc" does not support dry run
Is there a way to prevent pulumi from doing a dry run for that single resource?
m
I'm not familiar with these resources, but if you're looking for a way to control flow based on whether the current operation is a preview, you can use
pulumi.runtime.isDryRun()
-- e.g., for Node.js: https://www.pulumi.com/docs/reference/pkg/nodejs/pulumi/pulumi/functions/runtime.isDryRun.html