Skip to content

Commit

Permalink
Merge pull request #4 from krancour/helm-3.7
Browse files Browse the repository at this point in the history
updating for helm 3.7
  • Loading branch information
krancour authored Aug 31, 2021
2 parents 2a8590b + 6cb5ee4 commit e0d6e41
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .brigade/brigade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const releaseTagRegex = /^refs\/tags\/(v[0-9]+(?:\.[0-9]+)*(?:\-.+)?)$/

const goImg = "brigadecore/go-tools:v0.1.0"
const kanikoImg = "brigadecore/kaniko:v0.2.0"
const helmImg = "brigadecore/helm-tools:v0.1.0"
const helmImg = "brigadecore/helm-tools:v0.2.0"
const localPath = "/workspaces/brigade-noisy-neighbor"

// MakeTargetJob is just a job wrapper around a make target.
Expand Down
10 changes: 3 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ ifneq ($(SKIP_DOCKER),true)
-w /workspaces/brigade-noisy-neighbor \
$(KANIKO_IMAGE)

HELM_IMAGE := brigadecore/helm-tools:v0.1.0
HELM_IMAGE := brigadecore/helm-tools:v0.2.0

HELM_DOCKER_CMD := docker run \
-it \
Expand Down Expand Up @@ -73,8 +73,6 @@ ifdef HELM_ORG
HELM_ORG := $(HELM_ORG)/
endif

HELM_CHART_NAME := $(HELM_REGISTRY)$(HELM_ORG)brigade-noisy-neighbor

ifdef VERSION
MUTABLE_DOCKER_TAG := latest
else
Expand Down Expand Up @@ -153,10 +151,8 @@ publish-chart:
helm registry login $(HELM_REGISTRY) -u $(HELM_USERNAME) -p $${HELM_PASSWORD} && \
cd charts/brigade-noisy-neighbor && \
helm dep up && \
sed -i "s/^version:.*/version: $(VERSION)/" Chart.yaml && \
sed -i "s/^appVersion:.*/appVersion: $(VERSION)/" Chart.yaml && \
helm chart save . $(HELM_CHART_NAME):$(VERSION) && \
helm chart push $(HELM_CHART_NAME):$(VERSION) \
helm package . --version $(VERSION) --app-version $(VERSION) && \
helm push brigade-noisy-neighbor-$(VERSION).tgz oci://$(HELM_REGISTRY)$(HELM_ORG) \
'

################################################################################
Expand Down
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,26 +49,25 @@ $ brig role grant EVENT_CREATOR

For now, we're using the [GitHub Container Registry](https://ghcr.io) (which is
an [OCI registry](https://helm.sh/docs/topics/registries/)) to host our Helm
chart. Helm 3 has _experimental_ support for OCI registries. In the event that
the Helm 3 dependency proves troublesome for users, or in the event that this
chart. Helm 3.7 has _experimental_ support for OCI registries. In the event that
the Helm 3.7 dependency proves troublesome for users, or in the event that this
experimental feature goes away, or isn't working like we'd hope, we will revisit
this choice before going GA.

To install Brigade Noisy Neighbor, begin by pulling the chart from GCR and
exporting it to some location on your local system. Here, we export it to
`~/charts`:
First, be sure you are using
[Helm 3.7.0-rc.1](https://github.com/helm/helm/releases/tag/v3.7.0-rc.1) and
enable experimental OCI support:

```console
$ export HELM_EXPERIMENTAL_OCI=1
$ helm chart pull ghcr.io/brigadecore/brigade-noisy-neighbor:v0.1.0
$ helm chart export ghcr.io/brigadecore/brigade-noisy-neighbor:v0.1.0 -d ~/charts
```

Use the following command to extract the full set of configuration options from
the chart. Here we're storing a copy at `~/brigade-noisy-neighbor-values.yaml`:

```console
$ helm inspect values ~/charts/brigade-noisy-neighbor > ~/brigade-noisy-neighbor-values.yaml
$ helm inspect values oci://ghcr.io/brigadecore/brigade-noisy-neighbor \
--version v0.2.0 > ~/brigade-noisy-neighbor-values.yaml
```

Edit the configuration (`~/brigade-noisy-neighbor-values.yaml` in this example).
Expand All @@ -86,7 +85,9 @@ At minimum, you will need to make the following changes:
Install Brigade Noisy Neighbor, referencing your edited configuration:

```console
$ helm install brigade-noisy-neighbor ~/charts/brigade-noisy-neighbor \
$ helm install brigade-noisy-neighbor \
oci://ghcr.io/brigadecore/brigade-noisy-neighbor \
--version v0.2.0 \
--create-namespace \
--namespace brigade-noisy-neighbor \
--values ~/brigade-noisy-neighbor-values.yaml \
Expand Down

0 comments on commit e0d6e41

Please sign in to comment.