Skip to content

Commit

Permalink
Merge pull request #38 from pdettori/chart
Browse files Browse the repository at this point in the history
✨ add action to publish helm chart with release
  • Loading branch information
pdettori authored Jun 13, 2023
2 parents 81d52a0 + c3c3ab5 commit 602600b
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 46 deletions.
33 changes: 30 additions & 3 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,34 @@ on:
tags:
- 'v*'

permissions:
contents: write
packages: write
env:
REGISTRY: ghcr.io
OPERATOR_IMAGE: kubestellar/kubeflex/manager
IMAGE_NAME: ${{ github.repository }}/chart
CHART_PATH: ./chart

jobs:
goreleaser:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: actions/setup-go@v4
with:
go-version: v1.19

- name: Delete non-semver tags
run: 'git tag -d $(git tag -l | grep -v "^v")'

- name: Set LDFLAGS
run: echo LDFLAGS="$(make ldflags)" >> $GITHUB_ENV

- name: Run GoReleaser on tag
uses: goreleaser/goreleaser-action@v4
with:
Expand All @@ -34,3 +43,21 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
KO_TOKEN: ${{ secrets.TOKEN }}

- name: Set up Helm
uses: azure/setup-helm@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Login to registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Package and push chart
run: |
make chart IMG=${{ env.REGISTRY }}/${{ env.OPERATOR_IMAGE }}:${{github.ref_name}}
helm package ${{ env.CHART_PATH }} --destination . --version ${{github.ref_name}}
helm push ./*.tgz oci://${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
41 changes: 0 additions & 41 deletions .github/workflows/helm.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ undeploy: ## Undeploy manager from the K8s cluster specified in ~/.kube/config.
.PHONY: chart
chart: manifests kustomize
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
$(KUSTOMIZE) build config/default > charts/kubeflex/templates/operator.yaml
$(KUSTOMIZE) build config/default > chart/templates/operator.yaml

##@ Build Dependencies

Expand Down
8 changes: 7 additions & 1 deletion docs/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ kubectl debug -n ${NAMESPACE} -it ${NAME} --image=busybox:1.28 --target=${CONTAI

### Getting all the command args for a process

```
```shell
cat /proc/<pid>/cmdline | sed -e "s/\x00/ /g"; echo
```

### Install the kubeflex operator with the OCI helm chart

```shell
helm install test -n kubeflex-system --create-namespace oci://ghcr.io/kubestellar/kubeflex/chart/kubeflex-operator --version v0.1.0
```

0 comments on commit 602600b

Please sign in to comment.