Skip to content

Commit

Permalink
feat(libs/karpenter): add/remove versions (#370)
Browse files Browse the repository at this point in the history
* feat: Add Karpenter 0.31, 0.32, 0.33

* fix(karpenter): Add the new CRD filenames

* fix: split into separate libs BREAKING CHANGE

* chore: drop unsupported versions

* chore: add latest two versions

---------

Co-authored-by: Duologic <[email protected]>
  • Loading branch information
hamishforbes and Duologic authored Mar 19, 2024
1 parent 81b00ff commit 4d83e33
Showing 1 changed file with 26 additions and 6 deletions.
32 changes: 26 additions & 6 deletions libs/karpenter/config.jsonnet
Original file line number Diff line number Diff line change
@@ -1,21 +1,41 @@
local config = import 'jsonnet/config.jsonnet';

local versions = [
{output: '0.16', version: '0.16.1', url: 'https://raw.githubusercontent.com/aws/karpenter/v0.16.1/charts/karpenter/crds' },
{output: '0.19', version: '0.19.0'},
{output: '0.27', version: '0.27.0'},
{ output: '0.27', version: '0.27.0' },
{ output: '0.31', version: '0.31.3' },
{ output: '0.32', version: '0.32.0' },
{ output: '0.33', version: '0.33.0' },
{ output: '0.34', version: '0.34.0' },
{ output: '0.35', version: '0.35.0' },
];
local getURL(v) =
if std.objectHas(v, 'url')
then v.url
else 'https://raw.githubusercontent.com/aws/karpenter/v%s/pkg/apis/crds' % v.version;

config.new(
name='karpenter',
specs=[
{
local url = if std.objectHas(v, 'url') then v.url else 'https://raw.githubusercontent.com/aws/karpenter/v%s/pkg/apis/crds' % v.version,
output: v.output,
prefix: '^(aws\\.k8s\\.karpenter|sh\\.karpenter)\\..*',
local url = getURL(v),
output: v.output + '/aws',
prefix: '^(aws\\.k8s\\.karpenter)\\..*',
crds: [
'%s/karpenter.k8s.aws_awsnodetemplates.yaml' % url,
'%s/karpenter.k8s.aws_ec2nodeclasses.yaml' % url,
],
localName: 'karpenter',
}
for v in versions
] + [
{
local url = getURL(v),
output: v.output + '/sh',
prefix: '^(sh\\.karpenter)\\..*',
crds: [
'%s/karpenter.sh_provisioners.yaml' % url,
'%s/karpenter.sh_nodepools.yaml' % url,
'%s/karpenter.sh_nodeclaims.yaml' % url,
],
localName: 'karpenter',
}
Expand Down

0 comments on commit 4d83e33

Please sign in to comment.