Skip to content

Commit dd59b3d

Browse files
committed
Require Kubernetes 1.37 or later
Signed-off-by: Ryan Djurovich <git@ryan0x44.com>
1 parent 4450874 commit dd59b3d

4 files changed

Lines changed: 7 additions & 4 deletions

File tree

Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ CURRENT_DIR := $(abspath $(dir $(firstword $(MAKEFILE_LIST))))
66
CHARTS := $(patsubst %/Chart.yaml,%,$(wildcard charts/*/Chart.yaml))
77
JSON_FILES := $(shell find manifests -name '*.json' -type f 2>/dev/null | sort)
88
PODPLANE_GIT_CACHE_DIR ?= $(HOME)/.podplane/cache/deps/git
9+
KUBE_VERSION := 1.37.0
910

1011
.DEFAULT_GOAL := help
1112

@@ -61,7 +62,7 @@ lint: deps ## Run helm lint on every chart
6162
extra_args=""; \
6263
values_file="tests/values/$$(basename $$chart).yaml"; \
6364
if [ -f "$$values_file" ]; then extra_args="-f $$values_file"; fi; \
64-
helm lint $$chart $$extra_args || exit 1; \
65+
helm lint --kube-version $(KUBE_VERSION) $$chart $$extra_args || exit 1; \
6566
done
6667

6768
render: deps ## Run helm template on every chart
@@ -70,7 +71,7 @@ render: deps ## Run helm template on every chart
7071
extra_args=""; \
7172
values_file="tests/values/$$(basename $$chart).yaml"; \
7273
if [ -f "$$values_file" ]; then extra_args="-f $$values_file"; fi; \
73-
helm template $$chart $$extra_args >/dev/null || exit 1; \
74+
helm template --kube-version $(KUBE_VERSION) $$chart $$extra_args >/dev/null || exit 1; \
7475
done
7576

7677
validate: render ## Alias for render
@@ -84,7 +85,7 @@ precommit: check ## Fast local pre-commit check: JSON fmt + helm lint (no networ
8485
extra_args=""; \
8586
values_file="tests/values/$$(basename $$chart).yaml"; \
8687
if [ -f "$$values_file" ]; then extra_args="-f $$values_file"; fi; \
87-
helm lint --quiet $$chart $$extra_args >/dev/null || { helm lint $$chart $$extra_args; exit 1; }; \
88+
helm lint --quiet --kube-version $(KUBE_VERSION) $$chart $$extra_args >/dev/null || { helm lint --kube-version $(KUBE_VERSION) $$chart $$extra_args; exit 1; }; \
8889
done
8990
@go vet ./...
9091
@echo "precommit ok"

charts/cluster-api/Chart.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ description: Cluster API core controller for Podplane
88
type: application
99
version: "1.0.0"
1010
appVersion: "v1.12.10"
11+
kubeVersion: ">=1.37.0-0"

charts/podplane-operator/Chart.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ description: Podplane operator with SecretProviderBinding controller and aggrega
88
type: application
99
version: "1.0.0"
1010
appVersion: "0.4.3"
11+
kubeVersion: ">=1.37.0-0"

scripts/manifests/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ func sharedMetadata(components []string) (metadata, error) {
326326
// chartImages renders a chart and extracts normalized images from pod specs.
327327
func chartImages(chartPath string) ([]string, error) {
328328
chartName := filepath.Base(chartPath)
329-
args := []string{"template", chartPath}
329+
args := []string{"template", chartPath, "--kube-version", "1.37.0"}
330330
valuesPath := filepath.Join("tests", "values", chartName+".yaml")
331331
if _, err := os.Stat(valuesPath); err == nil {
332332
args = append(args, "-f", valuesPath)

0 commit comments

Comments
 (0)