diff --git a/.brigade/brigade.ts b/.brigade/brigade.ts index 0b4ab85..dcf384b 100644 --- a/.brigade/brigade.ts +++ b/.brigade/brigade.ts @@ -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-github-gateway" // MakeTargetJob is just a job wrapper around a make target. diff --git a/Makefile b/Makefile index cc23ef9..72ce1f4 100644 --- a/Makefile +++ b/Makefile @@ -38,7 +38,7 @@ ifneq ($(SKIP_DOCKER),true) -w /workspaces/brigade-github-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 \ @@ -157,10 +157,8 @@ publish-chart: helm registry login $(HELM_REGISTRY) -u $(HELM_USERNAME) -p $${HELM_PASSWORD} && \ cd charts/brigade-github-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_PREFIX)brigade-github-gateway:$(VERSION) && \ - helm chart push $(HELM_CHART_PREFIX)brigade-github-gateway:$(VERSION) \ + helm package . --version $(VERSION) --app-version $(VERSION) && \ + helm push brigade-github-gateway-$(VERSION).tgz oci://$(HELM_REGISTRY)$(HELM_ORG) \ ' ################################################################################ diff --git a/README.md b/README.md index 629a341..4f88984 100644 --- a/README.md +++ b/README.md @@ -133,17 +133,17 @@ that prevents the gateway from using this token for impersonating other 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 Brigade users, or in the event that +chart. Helm 3.7 has _experimental_ support for OCI registries. In the event that +the Helm 3.7 dependency proves troublesome for Brigade 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 GitHub 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-github-gateway:v0.2.0 - helm chart export ghcr.io/brigadecore/brigade-github-gateway:v0.2.0 -d ~/charts +$ export HELM_EXPERIMENTAL_OCI=1 ``` As this chart requires custom configuration as described above to function @@ -153,10 +153,11 @@ Use the following command to extract the full set of configuration options into a file you can modify: ```console -$ helm inspect values ~/charts/brigade-github-gateway > my-values.yaml +$ helm inspect values oci://ghcr.io/brigadecore/brigade-github-gateway \ + --version v0.3.0 > ~/brigade-github-gateway-values.yaml ``` -Edit `my-values.yaml`, making the following changes: +Edit `~/brigade-github-gateway-values.yaml`, making the following changes: * `brigade.apiAddress`: Address of the Brigade API server, beginning with `https://` @@ -174,14 +175,16 @@ Edit `my-values.yaml`, making the following changes: * `sharedSecret`: Shared secret from step 1 -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-github-gateway-values.yaml` and use the +following command to install the gateway using the above customizations: ```console -$ helm install brigade-github-gateway ~/charts/brigade-github-gateway \ +$ helm install brigade-github-gateway \ + oci://ghcr.io/brigadecore/brigade-github-gateway \ + --version v0.3.0 \ --create-namespace \ --namespace brigade-github-gateway \ - --values my-values.yaml + --values ~/brigade-github-gateway-values.yaml ``` ### 4. (RECOMMENDED) Create a DNS Entry