jsonnet-libs / k8s

Code generator for Jsonnet Kubernetes libraries.
Apache License 2.0
171 stars 98 forks source link

feat(libs/karpenter): add/remove versions #370

Closed hamishforbes closed 7 months ago

hamishforbes commented 10 months ago

Karpenter CRDs have changed significantly in 0.32 0.31 is the only version supporting downgrades from 0.32 and 0.33 is the latest!

hamishforbes commented 10 months ago

Not sure whats going on with the new versions here.

I can't seem to get it to generate functions for both the ec2NodeClass and the the nodeClaims / nodePools

It will generate them separately if i remove one or other from configuration, but not if they're all listed

Is this because they have the same version (v1beta1) but different name prefixes (karpenter.sh vs karpenter.k8s.aws)

As far as I can tell the version being the same is the only thing that's different from the older verions i.e in 0.27 awsnodetemplates.karpenter.k8s.aws is v1alpha1 but provisioners.karpenter.sh is v1alpha5

xvzf commented 10 months ago

Hey!

Sorry for the delay. I'll look into this and see if I can find a fix

Duologic commented 7 months ago

The directory structure doesn't properly implement the difference in prefixes, one overwrites the other. I think the past of least resistance is using separate output dirs.

Duologic commented 7 months ago

I've pushed two commits, first implements the directory structure, second removes few old versions (looking at https://karpenter.sh/docs/upgrading/compatibility/#compatibility-matrix).