Skip to content

Commit

Permalink
flip helm chart to OCI://
Browse files Browse the repository at this point in the history
  • Loading branch information
dmolik committed Aug 27, 2024
1 parent 3f1c4c7 commit 1303421
Show file tree
Hide file tree
Showing 15 changed files with 41 additions and 1,095 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,23 @@ jobs:
asset_name: install.yaml
tag: ${{ github.ref }}
overwrite: true
publish-helm:
runs-on: ubuntu-latest
needs: publish
name: Publish Helm Chart
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.22
check-latest: true
- name: Log in to the Container registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Package and Upload Helm Chart
run: make publish-helm V=1
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ go.work
blank.yaml
cilium/
manager
valkey-operator-chart/
valkey-operator-chart-*.tgz
25 changes: 19 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -182,24 +182,27 @@ KUSTOMIZE ?= $(LOCALBIN)/kustomize-$(KUSTOMIZE_VERSION)
CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen-$(CONTROLLER_TOOLS_VERSION)
ENVTEST ?= $(LOCALBIN)/setup-envtest-$(ENVTEST_VERSION)
GOLANGCI_LINT = $(LOCALBIN)/golangci-lint-$(GOLANGCI_LINT_VERSION)
HELMIFY := $(LOCALBIN)/helmify-$(HELMIFY_VERSION)
HELM := $(LOCALBIN)/helm

## Tool Versions
KUSTOMIZE_VERSION ?= v5.4.1
CONTROLLER_TOOLS_VERSION ?= v0.16.0
ENVTEST_VERSION ?= release-0.18
GOLANGCI_LINT_VERSION ?= v1.57.2
HELMIFY_VERSION ?= v0.4.13

######################### Helmify
HELMIFY ?= $(LOCALBIN)/helmify

.PHONY: helmify
helmify: $(HELMIFY) ## Download helmify locally if necessary.
$(HELMIFY): $(LOCALBIN)
test -s $(LOCALBIN)/helmify || GOBIN=$(LOCALBIN) go install github.com/arttor/helmify/cmd/[email protected]
helm-gen: manifests kustomize helmify ## Generate Helm chart from Kustomize manifests
$Q$(KUSTOMIZE) build config/default | $(HELMIFY) -crd-dir valkey-operator-chart

helm: manifests kustomize helmify ## Generate Helm chart from Kustomize manifests
$Q$(KUSTOMIZE) build config/default | $(HELMIFY) -crd-dir config/chart
helm-package: helm-gen ## Package Helm chart
$Q$(HELM) package valkey-operator-chart --app-version $(VERSION) --version $(VERSION)

helm-publish: helm-package ## Publish Helm chart
$Q$(HELM) push valkey-operator-chart-$(VERSION).tgz oci://ghcr.io/hyperspike

.PHONY: minikube tunnel registry-proxy prometheus-proxy
minikube: ## Spool up a local minikube cluster for development
Expand Down Expand Up @@ -243,6 +246,16 @@ golangci-lint: $(GOLANGCI_LINT) ## Download golangci-lint locally if necessary.
$(GOLANGCI_LINT): $(LOCALBIN)
$(call go-install-tool,$(GOLANGCI_LINT),github.com/golangci/golangci-lint/cmd/golangci-lint,${GOLANGCI_LINT_VERSION})

.PHONY: helmify
helmify: $(HELMIFY) ## Download helmify locally if necessary.
$(HELMIFY): $(LOCALBIN)
$(call go-install-tool,$(GOLANGCI_LINT),github.com/artttor/helmify/cmd/helmify,${HELMIFY_VERSION})

.PHONY: helm
helm: $(HELM) ## Download helm locally if necessary.
$(HELM): $(LOCALBIN)
$(call go-install-tool,$(HELM),helm.sh/helm/v3/cmd/helm,latest)

# go-install-tool will 'go install' any package with custom target and name of binary, if it doesn't exist
# $1 - target path with name of binary (ideally with version)
# $2 - package url which can be installed
Expand Down
23 changes: 0 additions & 23 deletions config/chart/.helmignore

This file was deleted.

21 changes: 0 additions & 21 deletions config/chart/Chart.yaml

This file was deleted.

Loading

0 comments on commit 1303421

Please sign in to comment.