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

intermittent "invalid version slug" error digitalocean.KubernetesCluster #437

Open
orcutt989 opened this issue Jun 2, 2023 · 3 comments
Labels
awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). kind/bug Some behavior is incorrect or out of spec

Comments

@orcutt989
Copy link

orcutt989 commented Jun 2, 2023

What happened?

I can stand up a new cluster with the following code (note version: "latest")

const cluster = new digitalocean.KubernetesCluster("do-cluster", {
  region: digitalocean.Region.NYC1,
  version: "latest",
  autoUpgrade: true,
  nodePool: {
      name: "default",
      size: "s-2vcpu-2gb",
      autoScale: true,
      minNodes: 1,
      maxNodes: 3
  },
});

but when I try to process updates on the cluster I get "invalid version slug" and have to change latest to an actual DO k8s version slug

Expected Behavior

I would hope i could leave latest and it might somehow keep the version it was stood up with, or pin it to latest.

Steps to reproduce

see above

Output of pulumi about

pulumi about
CLI
Version      3.68.0
Go Version   go1.20.4
Go Compiler  gc

Plugins
NAME          VERSION
aws           5.41.0
aws           5.31.0
aws           4.38.1
awsx          1.0.2
digitalocean  4.19.3
docker        3.6.1
eks           1.0.2
eks           0.41.2
eks           0.33.0
kubernetes    3.28.1
nodejs        unknown

Host
OS       darwin
Version  13.3.1
Arch     x86_64

This project is written in nodejs: executable='/usr/local/bin/node' version='v18.11.0'

Dependencies:
NAME                       VERSION
@pulumi/eks                1.0.2
@pulumi/kubernetes         3.28.1
@pulumi/pulumi             3.68.0
@types/node                20.2.3
latest-version             7.0.0
tezos-pulumi               2.0.0
@pulumi/awsx               1.0.2
@pulumi/aws                5.41.0
@pulumi/digitalocean       4.19.3
dotenv                     16.0.3
yaml                       2.3.0
@oxheadalpha/tezos-pulumi  1.1.1

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).

@orcutt989 orcutt989 added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Jun 2, 2023
@AaronFriel
Copy link
Member

AaronFriel commented Jun 6, 2023

Hey @orcutt989, thanks for reporting this. I have a workaround for the API error, but it looks like the upstream provider we use doesn't handle the version property well, as you'll see below. Let me know if this workaround helps unblock your program though.

Using the ignoreChanges resource option will prevent you from seeing the API error and keep the resource using the latest version returned by their API:

const cluster = new digitalocean.KubernetesCluster("do-cluster", {
  region: digitalocean.Region.NYC1,
  version: "latest",
  autoUpgrade: true,
  nodePool: {
      name: "default",
      size: "s-2vcpu-2gb",
      autoScale: true,
      minNodes: 1,
      maxNodes: 3
  },
}, {
  ignoreChanges: ["version"]
});

However, it looks like per this issue, changing the input version does not update the cluster:

For the API error and not supporting "latest", I've opened this issue as well:

@AaronFriel AaronFriel added awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). and removed needs-triage Needs attention from the triage team labels Jun 12, 2023
@AaronFriel
Copy link
Member

@orcutt989 per the issue filed upstream (#997) this may be intended behavior of the provider.

@orcutt989
Copy link
Author

If that's true then I feel like "latest" should not work on first run and should be disabled. This violates idempotency and immutable practices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

2 participants