Skip to content

Commit

Permalink
use helm in deployment, use checksum
Browse files Browse the repository at this point in the history
  • Loading branch information
hans-m-song committed Apr 15, 2024
1 parent a0038a2 commit 0dcdb50
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 13 deletions.
19 changes: 10 additions & 9 deletions .github/workflows/_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ on:
NEW_RELIC_DEPLOYMENT_ENTITY_GUID:
required: true

env:
STATUS_COLOR: 255

jobs:
notify:
runs-on: self-hosted
Expand All @@ -30,13 +27,17 @@ jobs:
environment: production

steps:
- name: Rollout deployment
uses: axatol/actions/rollout-kubernetes-deployment@release
- name: Upgrade helm chart
id: deploy
with:
deployment-name: huisheng
namespace: huisheng
wait: true
run: |
helm repo add huisheng https://huisheng.charts.axatol.xyz
helm repo update
helm upgrade huisheng huisheng/huisheng \
--install \
--create-namespace \
--namespace huisheng \
--atomic \
--reuse-values
- name: Create deployment marker
if: success()
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/push-to-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ on:
workflow_dispatch:

jobs:
build-image:
build:
uses: ./.github/workflows/_build.yml
with:
publish: true

restart-deployment:
needs: build-image
deploy:
needs: build
uses: ./.github/workflows/_deploy.yml
secrets:
DISCORD_GITHUB_ACTIONS_WEBHOOK_URL: ${{ secrets.DISCORD_GITHUB_ACTIONS_WEBHOOK_URL }}
Expand Down
2 changes: 1 addition & 1 deletion charts/huisheng/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: huisheng
description: Huisheng
type: application

version: 0.0.2
version: 0.0.3
appVersion: 0.0.1

home: https://github.com/hans-m-song/huisheng
Expand Down
2 changes: 2 additions & 0 deletions charts/huisheng/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ spec:
template:
metadata:
labels: {{ include "huisheng.selectorLabels" . | nindent 8 }}
annotations:
credentials/checksum: {{ include (print $.Template.BasePath "/credentials.yaml") . | sha256sum }}
spec:
containers:
- name: huisheng
Expand Down

0 comments on commit 0dcdb50

Please sign in to comment.