Skip to content

Commit

Permalink
Merge pull request #22 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 committed Aug 31, 2021
2 parents 691a558 + f48af09 commit e20c709
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 18 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-bitbucket-gateway"

// MakeTargetJob is just a job wrapper around a make target.
Expand Down
8 changes: 3 additions & 5 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-bitbucket-gateway \
$(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 @@ -153,10 +153,8 @@ publish-chart:
helm registry login $(HELM_REGISTRY) -u $(HELM_USERNAME) -p $${HELM_PASSWORD} && \
cd charts/brigade-bitbucket-gateway && \
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-bitbucket-gateway-$(VERSION).tgz oci://$(HELM_REGISTRY)$(HELM_ORG) \
'

################################################################################
Expand Down
27 changes: 15 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,17 @@ gateways._

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 fetch the Brigade Bitbucket Gateway chart from the registry:
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-bitbucket-gateway:v2.0.0-alpha.1
helm chart export ghcr.io/brigadecore/brigade-bitbucket-gateway:v2.0.0-alpha.1 -d ~/charts
$ export HELM_EXPERIMENTAL_OCI=1
```

As this chart requires custom configuration as described above to function
Expand All @@ -80,24 +80,27 @@ Use the following command to extract the full set of configuration options into
a file you can modify:

```console
$ helm inspect values ~/charts/brigade-bitbucket-gateway > my-values.yaml
$ helm inspect values oci://ghcr.io/brigadecore/brigade-bitbucket-gateway \
--version v2.0.0-alpha.2 > ~/brigade-bitbucket-gateway-values.yaml
```

Edit `my-values.yaml`, making the following changes:
Edit `~/brigade-bitbucket-gateway-values.yaml`, making the following changes:

* `brigade.apiAddress`: Address of the Brigade API server, beginning with
`https://`

* `brigade.apiToken`: Service account token from step 2

Save your changes to `my-values.yaml` and use the following command to install
the gateway using the above customizations:
Save your changes to `~/brigade-bitbucket-gateway-values.yaml` and use the
following command to install the gateway using the above customizations:

```console
$ helm install brigade-bitbucket-gateway ~/charts/brigade-bitbucket-gateway \
$ helm install brigade-bitbucket-gateway \
oci://ghcr.io/brigadecore/brigade-bitbucket-gateway \
--version v2.0.0-alpha.2 \
--create-namespace \
--namespace brigade-bitbucket-gateway \
--values my-values.yaml
--values ~/brigade-bitbucket-gateway-values.yaml
```

### 3. (RECOMMENDED) Create a DNS Entry
Expand Down

0 comments on commit e20c709

Please sign in to comment.