Is there a way to specify "latest" chart version w...
# general
Is there a way to specify "latest" chart version when using new
? I couldn't find the possible values from a cursory look at
Looks like
is currently required, but probably shouldn't be as Helm doesn't require the version. Opened to track, and you can should be able to work around in the meantime by passing
version: <any>undefined
I think I saw an issue on this already, but is there a way for the chart deployments to do an
upgrade --install
instead of an
? meaning, if something already exists in kubernetes then we just ignore it as if we were doing
helm upgrade -i
Right now I'm getting an error when running my chart deployment:
Copy code
Updating (poc):

     Type                                  Name                  Status                  Info
     pulumi:pulumi:Stack                   eks-cluster-poc
 +   ├─           aws-k8s-cni           created
 +   │  └─ kubernetes:core:ServiceAccount  kube-system/aws-node  **creating failed**     1 error
 ~   └─           splunk-forwarder      updated                 [diff: -version]

  kubernetes:core:ServiceAccount (kube-system/aws-node):
    error: Plan apply failed: serviceaccounts "aws-node" already exists
helm just says
and does a no-op
but pulumi is erroring out
@early-musician-41645 Is it the case here that you already have this installed separately from your Pulumi program, but then want the Pulumi program to indicate it wants to install it as well, and for that to succeed if it's already there (presumably updating it if needed to the state specified by the Pulumi program)? Any reason you want to specify it again here if it already available? In general (for all cloud providers not just Kubernetes) we tend to encourage a pattern of using
to look up a resource if already there, instead of attempting to recreate it. I suspect there's a reason why that doesn't make sense in your scenario, but curious to understand more.
No, I think you're right - this was created outside of Pulumi. Do you have a
example I can use?
Copy code
import * as k8s  from "@pulumi/kubernetes";

const serviceaccount = k8s.core.v1.ServiceAccount.get("aws-node", "kube-system/aws-node");
export const serviceaccountSercrets = serviceaccount.secrets;
(actually - not 100% sure that's the right second argument to pass - but I think it is - I don't have a cluster available right now with that service account to try this out on)