Closed LucasBrazi06 closed 1 year ago
Running Helm template works fine but not via Pulumi:
helm repo add argo https://argoproj.github.io/argo-helm
helm repo update
helm template argo-cd argo/argo-cd -n argo
By using this command helm template argo-cd argo/argo-cd -n argo --kube-version 1.20
I can reproduce the same issue.
I uninstalled Helm from my Mac and tried pulumi up
and it seems working meaning that you are using your own Helm to generate the template.
If you pass the --kube-version
param to Helm with the value of the cluster linked to the Chart, it'll work I think!
Hello @LucasBrazi06, I may be wrong but it seems that you’re using version 3.20.2 of this provider which doesn’t try to automatically fill in .Capabilities in Helm Charts. This ability has been released in version 3.21.1 of this provider. You should try upgrading it.
@yann-soubeyrand Thanks a million for the info!!!
Now I'm getting mad on how to use this new plugin version.
I managed to install it via this command: pulumi plugin install resource kubernetes 3.21.1
.
But calling pulumi up
still uses the version 3.20.2!!!
Same result even if I change the '@pulumi/eks' to V1.0.0 in the package.json file.
I'm still searching how to force Pulumi to use this plugin version...
You were right in trying to change the package version in the package.json
file. However, this is not the right package :wink: Do you have direct dependency on @pulumi/pulumi-kubernetes
or does it come transitively as a dependency of @pulumi/eks
? I’m not used to the Typescript ecosystem, but it seems that you can use an override section in the second case: https://www.stefanjudis.com/today-i-learned/how-to-override-your-dependencys-dependencies/.
Do you have direct dependency on
@pulumi/pulumi-kubernetes
Not a direct dep:
When I create the Pulumi project in Typescript, all the libs are up to date with their latest versions! When I force them to the latest, Pulumi does not manage to transpile anymore!
I will try to override the dependent lib as you advised! Thanks for the tips! I'll let you know.
EKS has now got a 1.0.0 version available. This might also upgrade the version of @pulumi/kubernetes for you
EKS has now got a 1.0.0 version available. This might also upgrade the version of @pulumi/kubernetes for you
Thanks for your advise!
I had seen this upgrade but unfortunately not backward compatible (I commented out the ArgoCD deployment):
Diagnostics:
pulumi:pulumi:Stack (e-mobility-ca-prod):
error: TypeError: Cannot read properties of undefined (reading 'map')
at /Users/serge/dev/personal/ev-kubernetes/pulumi/e-mobility/node_modules/@pulumi/yaml/yaml.ts:2993:14
at processTicksAndRejections (node:internal/process/task_queues:95:5)
error: TypeError: Cannot read properties of undefined (reading 'map')
at /Users/serge/dev/personal/ev-kubernetes/pulumi/e-mobility/node_modules/@pulumi/yaml/yaml.ts:2993:14
at processTicksAndRejections (node:internal/process/task_queues:95:5)
It fails on Yaml parsing like this one:
new k8s.yaml.ConfigFile(
'app-docker',
{
file: `src/assets/yaml/container-registry/${containerRegistry}.yaml`,
transformations: [
(yamlDocument: any) => {
if (yamlDocument.metadata) {
yamlDocument.metadata.namespace = namespace
} else {
yamlDocument.metadata = { namespace }
}
}
]
},
{
provider: cluster.provider
},
);
No problem with the version 0.42.7 of '@pulumi/eks' lib.
@LucasBrazi06 were you able to fix this issue? Just in case it helps, I was able to get around this issue by explicitly specifying the version of the package when creating the kubernetes provider. I am not using Typescript, but I assume you are creating a new provider with the kubeconfig of the cluster you're trying to deploy ArgoCD to. You can specify the version of the package as a pulumi resource option. Setting this to 3.23.0 allowed me to deploy the latest version of ArgoCD to a 1.23 k8s cluster. Hope that helps
@LucasBrazi06 were you able to fix this issue? Just in case it helps, I was able to get around this issue by explicitly specifying the version of the package when creating the kubernetes provider. I am not using Typescript, but I assume you are creating a new provider with the kubeconfig of the cluster you're trying to deploy ArgoCD to. You can specify the version of the package as a pulumi resource option. Setting this to 3.23.0 allowed me to deploy the latest version of ArgoCD to a 1.23 k8s cluster. Hope that helps
@dlee-rt Thanks for your help!!! I'm still having the issue.
The provider is created by Pulumi when I created the EKS cluster:
And I use it to deploy ArgoCD:
Maybe you can share me the code to do so even if it's not TypeScript?
Sure, I am doing something similar where I create an EKS cluster, grab the kubeconfig from the new cluster resource using an Apply function, then pass that kubeconfig to a newly defined kubernetes provider that I use to deploy ArgoCD. Please check the snippet below and let me know if you have any follow up questions (code is in Go):
kubeconfig := eksCluster.Kubeconfig.ApplyT(func(k interface{}) (string, error) {
data, err := json.Marshal(k)
if err != nil {
return "", err
}
return string(data), nil
}).(pulumi.StringOutput)
kubeProvider, err := kubernetes.NewProvider(ctx, "k8s-cluster", &kubernetes.ProviderArgs{
Kubeconfig: kubeconfig,
}, pulumi.Version("3.23.0"))
if err != nil {
return err
}
It looks like this bug was fixed according to https://github.com/pulumi/pulumi-kubernetes/issues/2249#issuecomment-1328002550
What happened?
Got an issue in deploying the argo-cd helm chart! Seems failing checking the Kubernetes version: argocd: >= 1.22.0-0 and got Kubernetes 1.20.0 I don't know where it got the version 1.20.0 as on EKS I have 1.24!
Steps to reproduce
Expected Behavior
Deploy the chart :-)
Actual Behavior
Got this error:
Output of
pulumi about
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).