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

Deploy swck snapshot charts #112

Merged
merged 1 commit into from
Mar 22, 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
20 changes: 15 additions & 5 deletions .github/workflows/publish-helm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ on:

env:
HUB: ghcr.io/apache/skywalking-kubernetes
VERSION: 0.0.0-${{ github.sha }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a snapshot, could we have a version prefix?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a snapshot, could we have a version prefix?

like this -snapshot?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a snapshot, could we have a version prefix?

We never have this suffix in all our existing snapshot Docker images, do we want to add it from now?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prefix, I mean, such as 4.5.0-xxxx

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prefix, I mean, such as 4.5.0-xxxx

Sure. the rationale here I use 0.0.0-xxx is that, to mimic the same version style as our existing snapshot Docker images, whose version is simply <sha>, without a version prefix like 9.5.0-<sha>, when we want to use a snapshot of a particular commit in the main branch, we don't have to find out what version is it currently, we can just copy the commit sha and use it 0.0.0-<sha>.

The 0.0.0- prefix is just to adhere the version format of Helm Chart, it must be \d+.\d+.\d-\w+ style.


jobs:
publish:
Expand All @@ -32,6 +33,15 @@ jobs:
packages: write
timeout-minutes: 20
name: Publish Snapshot Helm Chart
strategy:
matrix:
chart:
- path: chart/adapter
name: skywalking-helm-swck-adapter
- path: chart/operator
name: skywalking-helm-swck-operator
- path: chart/skywalking
name: skywalking-helm
steps:
- uses: actions/checkout@v3
- name: Log in to the Container registry
Expand All @@ -40,9 +50,9 @@ jobs:
registry: ${{ env.HUB }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy Helm Chart
- name: Deploy SkyWalking Helm Chart
run: |
sed -i "s/^version: .*/version: 0.0.0-${{ github.sha }}/" chart/skywalking/Chart.yaml
helm dep up chart/skywalking
helm package chart/skywalking
helm push skywalking-helm-*.tgz oci://${{ env.HUB }}
sed -i "s/^version: .*/version: $VERSION/" ${{ matrix.chart.path }}/Chart.yaml
helm dep up ${{ matrix.chart.path }}
helm package ${{ matrix.chart.path }}
helm push ${{ matrix.chart.name }}-$VERSION.tgz oci://${{ env.HUB }}
2 changes: 1 addition & 1 deletion chart/adapter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.

apiVersion: v2
name: skywalking-swck-adapter
name: skywalking-helm-swck-adapter
home: https://github.com/apache/skywalking-swck/tree/master/adapter
version: 0.7.0
description: Provide custom metrics coming from SkyWalking OAP cluster for autoscaling by Kubernetes HPA
Expand Down
2 changes: 1 addition & 1 deletion chart/operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.

apiVersion: v2
name: skywalking-swck-operator
name: skywalking-helm-swck-operator
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will publish these to hub.docker.io, and to make it clear this is a Helm Chart, not a Docker image, I change the names to be prefixed with skywalking-helm-*, and will ask infra team to create the repositories with the same name prefix

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, this is a helm for swck?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, this is a helm for swck?

Yes, as the title indicates. swck contains two Helm Charts actually, namely, operator and adapter

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't dockerhub directly know that this is a chart type?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't dockerhub directly know that this is a chart type?

Of course it knows, I meant I want to make it clear for our users.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@innerpeacez I think here is about avoiding confusion of another existing repo, https://hub.docker.com/r/apache/skywalking-swck

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

got it.

home: https://github.com/apache/skywalking-swck/tree/master/operator
version: 0.7.0
description: Provision and maintain SkyWalking backend components
Expand Down