Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ add action to publish helm chart with release #38

Merged
merged 3 commits into from
Jun 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
```