Skip to content

Commit 2d90e01

Browse files
carloryjonathan-innisengedaamdependabot[bot]DerekFrank
authored
feat: support llmaz model (#2)
* chore: Ensure we can stand up multiple partitions with kwok (kubernetes-sigs#2283) * chore: Inject resources into Kwok through a patch (kubernetes-sigs#2285) * chore: Update NodeClaim E2E test to only replace one status condition (kubernetes-sigs#2284) * chore: Avoid validating admission policy for clusters older then 1.30 (kubernetes-sigs#2289) * chore(deps): bump the go-deps group with 2 updates (kubernetes-sigs#2295) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore: bump go version to 1.24.4 (kubernetes-sigs#2298) * chore: Only log that the command succeeded when it actually did (kubernetes-sigs#2302) * fix: Fix bug with MarkForDeletion before creating replacements (kubernetes-sigs#2300) * perf: Refactor the eviction queue to be multithreaded (kubernetes-sigs#2252) * docs: Add Bizfly Cloud provider (kubernetes-sigs#2303) * feat: support llmaz model Co-authored-by: Kante Yin <[email protected]> Signed-off-by: carlory <[email protected]> * feat: add ci support Signed-off-by: carlory <[email protected]> --------- Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: carlory <[email protected]> Co-authored-by: Jonathan Innis <[email protected]> Co-authored-by: Amanuel Engeda <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Derek Frank <[email protected]> Co-authored-by: Lê Minh Quân <[email protected]> Co-authored-by: Kante Yin <[email protected]>
1 parent 7d6d9ba commit 2d90e01

File tree

29 files changed

+1401
-310
lines changed

29 files changed

+1401
-310
lines changed

.github/actions/install-prometheus/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ kubelet:
4141
scrape: enabled
4242
prometheus:
4343
prometheusSpec:
44+
maximumStartupDurationSeconds: 60
4445
tolerations:
4546
- key: CriticalAddonsOnly
4647
operator: Exists

.github/workflows/aws.yaml

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
name: Build and Push AWS Karpenter Provider Image
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
- release-*
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
14+
env:
15+
KO_DOCKER_REPO: docker.io/inftyai/karpenter-provider-aws
16+
17+
steps:
18+
- name: Checkout forked karpenter
19+
uses: actions/checkout@v4
20+
21+
- name: Set up Go 1.24
22+
uses: actions/setup-go@v5
23+
with:
24+
go-version: "1.24"
25+
26+
- name: Generate commit info and image tag
27+
id: tag
28+
run: |
29+
BRANCH="${GITHUB_REF##*/}"
30+
COMMIT=$(git rev-parse HEAD)
31+
TIMESTAMP=$(git show -s --format=%ct "$COMMIT")
32+
VERSION_DATE=$(date -u -d "@$TIMESTAMP" +'%Y%m%d%H%M%S')
33+
PSEUDO_VERSION="v0.0.0-${VERSION_DATE}-${COMMIT:0:12}"
34+
35+
if [[ "$BRANCH" == "main" ]]; then
36+
TAG="latest"
37+
IMAGE_TAG="latest"
38+
elif [[ "$BRANCH" == release-* ]]; then
39+
TAG="${BRANCH#release-}" # e.g. v0.36.2
40+
IMAGE_TAG="${TAG#v}" # e.g. 0.36.2
41+
else
42+
TAG="fork-${PSEUDO_VERSION}"
43+
IMAGE_TAG="${TAG}" # keep full tag
44+
fi
45+
46+
{
47+
echo "commit=$COMMIT"
48+
echo "version=$PSEUDO_VERSION"
49+
echo "tag=$TAG"
50+
echo "image_tag=$IMAGE_TAG"
51+
} >> "$GITHUB_OUTPUT"
52+
echo "✅ Using image tag: $IMAGE_TAG"
53+
54+
- name: Clone karpenter-provider-aws
55+
run: |
56+
git clone https://github.com/aws/karpenter-provider-aws.git
57+
cd karpenter-provider-aws
58+
59+
TAG="${{ steps.tag.outputs.tag }}"
60+
if [[ "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
61+
echo "🔄 Attempting to checkout provider tag: $TAG"
62+
if git rev-parse "refs/tags/$TAG" >/dev/null 2>&1; then
63+
git checkout "tags/$TAG" -b "build-from-tag-$TAG"
64+
else
65+
echo "❌ Tag '$TAG' not found in karpenter-provider-aws repo."
66+
exit 1
67+
fi
68+
else
69+
echo "🔄 Checking out provider branch: main"
70+
git checkout main
71+
fi
72+
73+
- name: Replace karpenter module with forked commit version
74+
run: |
75+
cd karpenter-provider-aws
76+
go mod edit -replace sigs.k8s.io/karpenter=github.com/InftyAI/karpenter@${{ steps.tag.outputs.version }}
77+
go mod tidy
78+
79+
- name: Install build tools via make toolchain
80+
run: |
81+
cd karpenter-provider-aws
82+
make toolchain
83+
84+
- name: Login to DockerHub
85+
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 #v3
86+
with:
87+
username: ${{ secrets.DOCKERHUB_USERNAME }}
88+
password: ${{ secrets.DOCKERHUB_TOKEN }}
89+
90+
- name: Build and push image using ko
91+
run: |
92+
cd karpenter-provider-aws
93+
ko build --bare \
94+
--tags ${{ steps.tag.outputs.image_tag }} \
95+
github.com/aws/karpenter-provider-aws/cmd/controller
96+
97+
- name: Show pushed image
98+
run: |
99+
echo "✅ Image pushed to:"
100+
echo "${{ env.KO_DOCKER_REPO }}:${{ steps.tag.outputs.image_tag }}"

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ help: ## Display help
1515
presubmit: verify test licenses vulncheck ## Run all steps required for code to be checked in
1616

1717
install-kwok: ## Install kwok provider
18-
UNINSTALL_KWOK=false ./hack/install-kwok.sh
18+
./hack/install-kwok.sh
1919

2020
uninstall-kwok: ## Uninstall kwok provider
21-
UNINSTALL_KWOK=true ./hack/install-kwok.sh
21+
UNINSTALL=true ./hack/install-kwok.sh
2222

2323
build-with-kind: # build with kind assumes the image will be uploaded directly onto the kind control plane, without an image repository
2424
$(eval CONTROLLER_IMG=$(shell $(WITH_GOFLAGS) KO_DOCKER_REPO="$(KWOK_REPO)" ko build sigs.k8s.io/karpenter/kwok))
@@ -29,7 +29,7 @@ build: ## Build the Karpenter KWOK controller images using ko build
2929
$(eval CONTROLLER_IMG=$(shell $(WITH_GOFLAGS) KO_DOCKER_REPO="$(KWOK_REPO)" ko build -B sigs.k8s.io/karpenter/kwok))
3030
$(eval IMG_REPOSITORY=$(shell echo $(CONTROLLER_IMG) | cut -d "@" -f 1 | cut -d ":" -f 1))
3131
$(eval IMG_TAG=$(shell echo $(CONTROLLER_IMG) | cut -d "@" -f 1 | cut -d ":" -f 2 -s))
32-
$(eval IMG_DIGEST=$(shell echo $(CONTROLLER_IMG) | cut -d "@" -f 2))
32+
$(eval IMG_DIGEST=$(shell echo $(CONTROLLER_IMG) | grep -q "@" && echo $(CONTROLLER_IMG) | cut -d "@" -f 2 || echo ""))
3333

3434
apply-with-kind: verify build-with-kind ## Deploy the kwok controller from the current state of your git repository into your ~/.kube/config cluster
3535
kubectl apply -f kwok/charts/crds

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Karpenter is a multi-cloud project with implementations by the following cloud p
2020
- [AWS](https://github.com/aws/karpenter-provider-aws)
2121
- [Azure](https://github.com/Azure/karpenter-provider-azure)
2222
- [AlibabaCloud](https://github.com/cloudpilot-ai/karpenter-provider-alibabacloud)
23+
- [Bizfly Cloud](https://github.com/bizflycloud/karpenter-provider-bizflycloud)
2324
- [Cluster API](https://github.com/kubernetes-sigs/karpenter-provider-cluster-api)
2425
- [GCP](https://github.com/cloudpilot-ai/karpenter-provider-gcp)
2526
- [Proxmox](https://github.com/sergelogvinov/karpenter-provider-proxmox)

go.mod

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module sigs.k8s.io/karpenter
22

3-
go 1.24.2
3+
go 1.24.4
44

55
require (
66
github.com/Pallinder/go-randomdata v1.2.0
@@ -9,6 +9,7 @@ require (
99
github.com/docker/docker v28.2.2+incompatible
1010
github.com/go-logr/logr v1.4.3
1111
github.com/imdario/mergo v0.3.16
12+
github.com/inftyai/llmaz v0.1.3
1213
github.com/mitchellh/hashstructure/v2 v2.0.2
1314
github.com/onsi/ginkgo/v2 v2.23.4
1415
github.com/onsi/gomega v1.37.0
@@ -18,8 +19,8 @@ require (
1819
github.com/samber/lo v1.50.0
1920
go.uber.org/multierr v1.11.0
2021
go.uber.org/zap v1.27.0
21-
golang.org/x/text v0.25.0
22-
golang.org/x/time v0.11.0
22+
golang.org/x/text v0.26.0
23+
golang.org/x/time v0.12.0
2324
k8s.io/api v0.32.3
2425
k8s.io/apiextensions-apiserver v0.32.3
2526
k8s.io/apimachinery v0.32.3
@@ -36,12 +37,12 @@ require (
3637
github.com/beorn7/perks v1.0.1 // indirect
3738
github.com/cespare/xxhash/v2 v2.3.0 // indirect
3839
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
39-
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
40+
github.com/emicklei/go-restful/v3 v3.12.0 // indirect
4041
github.com/evanphx/json-patch/v5 v5.9.11 // indirect
4142
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
4243
github.com/go-logr/zapr v1.3.0
4344
github.com/go-openapi/jsonpointer v0.21.0 // indirect
44-
github.com/go-openapi/jsonreference v0.20.2 // indirect
45+
github.com/go-openapi/jsonreference v0.21.0 // indirect
4546
github.com/go-openapi/swag v0.23.0 // indirect
4647
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
4748
github.com/gogo/protobuf v1.3.2 // indirect
@@ -65,19 +66,19 @@ require (
6566
github.com/spf13/cobra v1.8.1 // indirect
6667
github.com/spf13/pflag v1.0.6 // indirect
6768
github.com/x448/float16 v0.8.4 // indirect
68-
golang.org/x/net v0.38.0 // indirect
69+
golang.org/x/net v0.40.0 // indirect
6970
golang.org/x/oauth2 v0.24.0 // indirect
70-
golang.org/x/sys v0.32.0 // indirect
71-
golang.org/x/term v0.30.0 // indirect
72-
golang.org/x/tools v0.31.0 // indirect
71+
golang.org/x/sys v0.33.0 // indirect
72+
golang.org/x/term v0.32.0 // indirect
73+
golang.org/x/tools v0.33.0 // indirect
7374
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
7475
google.golang.org/protobuf v1.36.6 // indirect
7576
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
7677
gopkg.in/inf.v0 v0.9.1 // indirect
7778
gopkg.in/yaml.v3 v3.0.1 // indirect
7879
k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f // indirect
7980
sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect
80-
sigs.k8s.io/structured-merge-diff/v4 v4.4.2 // indirect
81+
sigs.k8s.io/structured-merge-diff/v4 v4.7.0 // indirect
8182
sigs.k8s.io/yaml v1.4.0
8283
)
8384

@@ -86,7 +87,8 @@ require (
8687
github.com/google/btree v1.1.3 // indirect
8788
github.com/rogpeppe/go-internal v1.13.1 // indirect
8889
go.uber.org/automaxprocs v1.6.0 // indirect
89-
golang.org/x/sync v0.14.0 // indirect
90+
golang.org/x/sync v0.15.0 // indirect
91+
sigs.k8s.io/lws v0.5.1 // indirect
9092
)
9193

9294
retract (

0 commit comments

Comments
 (0)