Skip to content

Commit

Permalink
Adds configurable helm chart version to Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
reederc42 authored Apr 11, 2024
1 parent fcb152b commit 15cd856
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
12 changes: 8 additions & 4 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@

* Docker-compatible container cli, such as nerdctl or docker
* Make, if not building natively or with linker flags
* Go 1.19 or greater, to optionally build Trident natively
* Go 1.21 or greater, to optionally build Trident natively

### Multi-Platform

* Make
* Docker
* Go 1.19 or greater, to optionally build Trident binaries natively
* Go 1.21 or greater, to optionally build Trident binaries natively
* jq

## Makefile Parameters
Expand All @@ -32,7 +32,7 @@ Container registry used to tag images and manifests, and optionally to push imag

`GO_IMAGE`

Default: `golang:1.19`
Default: `golang:1.21`

Container image used by default `$GO_SHELL` to run binary build scripts.

Expand All @@ -52,11 +52,15 @@ Default: `alpine/helm:3.6.1`

Container image used by default `$HELM_CMD` to package helm chart.

`HELM_CHART_VERSION`

If defined, overrides the default chart version

`DOCKER_CLI`

Default: `docker`

docker-compatible cli, such as nerdctl or docker, used to run containers and tag single-platform images.
Docker-compatible cli, such as nerdctl or docker, used to run containers and tag single-platform images.

`BUILD_CLI`

Expand Down
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ GOFLAGS ?=
# HELM_IMAGE helm image used in default HELM_CMD
HELM_IMAGE ?= alpine/helm:3.6.1

# HELM_CHART_VERSION overrides the default chart version
HELM_CHART_VERSION ?=

# DOCKER_CLI the docker-compatible cli used to run and tag images
DOCKER_CLI ?= docker

Expand Down Expand Up @@ -363,7 +366,9 @@ operator_manifest: operator_images
# packages helm chart
chart:
@cp README.md ./helm/trident-operator/
@$(HELM_CMD) package ./helm/trident-operator $(if $(HELM_PGP_KEY),--sign --key "$(HELM_PGP_KEY)" --keyring "$(HELM_PGP_KEYRING)")
@$(HELM_CMD) package ./helm/trident-operator \
$(if $(HELM_PGP_KEY),--sign --key "$(HELM_PGP_KEY)" --keyring "$(HELM_PGP_KEYRING)") \
$(if $(HELM_CHART_VERSION),--version "$(HELM_CHART_VERSION)")
@rm -f ./helm/trident-operator/README.md

# builds installer bundle. Skips binaries that have not been built.
Expand Down

0 comments on commit 15cd856

Please sign in to comment.