|
1 | 1 | # THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT. |
2 | 2 | # |
3 | | -# Generated on 2026-01-28T15:12:29Z by kres edff623. |
| 3 | +# Generated on 2026-01-30T11:12:05Z by kres e27c601c-dirty. |
4 | 4 |
|
5 | 5 | # common variables |
6 | 6 |
|
@@ -36,6 +36,9 @@ GOTOOLCHAIN ?= local |
36 | 36 | GOEXPERIMENT ?= |
37 | 37 | GO_BUILDFLAGS += -tags $(GO_BUILDTAGS) |
38 | 38 | TESTPKGS ?= ./... |
| 39 | +HELMREPO ?= $(REGISTRY)/$(USERNAME)/charts |
| 40 | +COSIGN_ARGS ?= |
| 41 | +HELMDOCS_VERSION ?= v1.14.2 |
39 | 42 | KRES_IMAGE ?= ghcr.io/siderolabs/kres:latest |
40 | 43 | CONFORMANCE_IMAGE ?= ghcr.io/siderolabs/conform:latest |
41 | 44 |
|
@@ -76,6 +79,7 @@ COMMON_ARGS += --build-arg=DEEPCOPY_VERSION="$(DEEPCOPY_VERSION)" |
76 | 79 | COMMON_ARGS += --build-arg=GOLANGCILINT_VERSION="$(GOLANGCILINT_VERSION)" |
77 | 80 | COMMON_ARGS += --build-arg=GOFUMPT_VERSION="$(GOFUMPT_VERSION)" |
78 | 81 | COMMON_ARGS += --build-arg=TESTPKGS="$(TESTPKGS)" |
| 82 | +COMMON_ARGS += --build-arg=HELMDOCS_VERSION="$(HELMDOCS_VERSION)" |
79 | 83 | TOOLCHAIN ?= docker.io/golang:1.25-alpine |
80 | 84 |
|
81 | 85 | # help menu |
|
144 | 148 | GO_LDFLAGS += -s |
145 | 149 | endif |
146 | 150 |
|
147 | | -all: unit-tests kres image-kres lint |
| 151 | +all: unit-tests kres image-kres helm lint |
148 | 152 |
|
149 | 153 | $(ARTIFACTS): ## Creates artifacts directory. |
150 | 154 | @mkdir -p $(ARTIFACTS) |
@@ -177,6 +181,7 @@ check-dirty: |
177 | 181 |
|
178 | 182 | generate: ## Generate .proto definitions. |
179 | 183 | @$(MAKE) local-$@ DEST=./ |
| 184 | + @sed -i "s/appVersion: .*/appVersion: \"$$(cat internal/version/data/tag)\"/" test/test-helm-chart/Chart.yaml |
180 | 185 |
|
181 | 186 | lint-golangci-lint: ## Runs golangci-lint linter. |
182 | 187 | @$(MAKE) target-$@ |
@@ -255,6 +260,44 @@ lint-fmt: lint-golangci-lint-fmt ## Run all linter formatters and fix up the so |
255 | 260 | image-kres: ## Builds image for kres. |
256 | 261 | @$(MAKE) registry-$@ IMAGE_NAME="kres" |
257 | 262 |
|
| 263 | +.PHONY: helm |
| 264 | +helm: $(ARTIFACTS) ## Package helm chart |
| 265 | + @helm package test/test-helm-chart -d $(ARTIFACTS) |
| 266 | + |
| 267 | +.PHONY: helm-release |
| 268 | +helm-release: helm ## Release helm chart |
| 269 | + @helm push $(ARTIFACTS)/test-helm-chart-*.tgz oci://$(HELMREPO) 2>&1 | tee $(ARTIFACTS)/.digest |
| 270 | + @cosign sign --yes $(COSIGN_ARGS) $(HELMREPO)/test-helm-chart@$$(cat $(ARTIFACTS)/.digest | awk -F "[, ]+" '/Digest/{print $$NF}') |
| 271 | + |
| 272 | +.PHONY: chart-lint |
| 273 | +chart-lint: ## Lint helm chart |
| 274 | + @helm lint test/test-helm-chart |
| 275 | + |
| 276 | +.PHONY: helm-plugin-install |
| 277 | +helm-plugin-install: ## Install helm plugins |
| 278 | + -helm plugin install https://github.com/helm-unittest/helm-unittest.git --verify=false --version=v1.0.3 |
| 279 | + -helm plugin install https://github.com/losisin/helm-values-schema-json.git --verify=false --version=v2.3.1 |
| 280 | + |
| 281 | +.PHONY: kuttl-plugin-install |
| 282 | +kuttl-plugin-install: ## Install kubectl kuttl plugin |
| 283 | + kubectl krew install kuttl |
| 284 | + |
| 285 | +.PHONY: chart-e2e |
| 286 | +chart-e2e: ## Run helm chart e2e tests |
| 287 | + export KUBECONFIG=$(shell pwd)/$(ARTIFACTS)/kubeconfig && cd test/e2e && kubectl kuttl test |
| 288 | + |
| 289 | +.PHONY: chart-unittest |
| 290 | +chart-unittest: $(ARTIFACTS) ## Run helm chart unit tests |
| 291 | + @helm unittest test/test-helm-chart --output-type junit --output-file $(ARTIFACTS)/helm-unittest-report.xml |
| 292 | + |
| 293 | +.PHONY: chart-gen-schema |
| 294 | +chart-gen-schema: ## Generate helm chart schema |
| 295 | + @helm schema --use-helm-docs --draft=7 --indent=2 --values=test/test-helm-chart/values.yaml --output=test/test-helm-chart/values.schema.json |
| 296 | + |
| 297 | +.PHONY: helm-docs |
| 298 | +helm-docs: ## Runs helm-docs and generates chart documentation |
| 299 | + @$(MAKE) local-$@ DEST=. |
| 300 | + |
258 | 301 | .PHONY: rekres |
259 | 302 | rekres: |
260 | 303 | @docker pull $(KRES_IMAGE) |
|
0 commit comments