-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (73 loc) · 2.72 KB
/
helm-upgrade.yml
File metadata and controls
83 lines (73 loc) · 2.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Helm Upgrade
on:
workflow_call:
inputs:
helm_release_namespace:
description: Kubernetes namespace corresponding to a Helm release, e.g. 'staging'.
required: true
type: string
helm_release_prefix:
description: The prefix used for the Helm release, e.g. 'slate-portal', 'slate-api'.
required: true
type: string
helm_working_directory:
description: The relative directory where Helm commands will execute.
required: false
default: "./resources/chart"
type: string
secrets:
gc_compute_zone:
description: The Google Cloud Compute Zone where the assets reside.
required: true
gc_gke_cluster:
description: The cluster name on the Google Kubernetes Engine (GKE).
required: true
gc_service_account:
description: The Google Cloud Service Account tied to the WIP.
required: true
gc_workload_identity_provider:
description: The Google Cloud Workload Identity Provider (WIP).
required: true
env:
HELM_SECRETS_BACKEND: vals
jobs:
upgrade:
name: Run Helm Upgrade on GKE
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Download Shared Workflow Properties
uses: actions/download-artifact@v4
with:
name: shared-workflow-props
- name: Apply Shared Workflow Properties
working-directory: .
run: |-
source workflow.properties
echo "GIT_REF=${gitRef}" >> $GITHUB_ENV
echo "RELEASE_VERSION=${releaseVersion}" >> $GITHUB_ENV
echo "HELM_RELEASE_NAMESPACE_SHORTHAND=${helmReleaseNamespaceShorthand}" >> $GITHUB_ENV
- name: Check out repo
uses: actions/checkout@v5
with:
fetch-depth: 0
path: .
ref: ${{ env.GIT_REF }}
- name: Set Up Tools
uses: slateci/github-actions/.github/actions/gcloud-helm-setup@v17
with:
cluster_name: ${{ secrets.gc_gke_cluster }}
location: ${{ secrets.gc_compute_zone }}
service_account: ${{ secrets.gc_service_account }}
workload_identity_provider: ${{ secrets.gc_workload_identity_provider }}
- name: Deploy the Helm chart
working-directory: ${{ inputs.helm_working_directory }}
run: |-
helm secrets upgrade ${{ inputs.helm_release_prefix }}-${{ env.HELM_RELEASE_NAMESPACE_SHORTHAND }} . \
-f ./vars/secrets.yml \
-f ./vars/values.yml \
-f ./vars/${{ env.HELM_RELEASE_NAMESPACE_SHORTHAND }}/secrets.yml \
-f ./vars/${{ env.HELM_RELEASE_NAMESPACE_SHORTHAND }}/values.yml \
-n ${{ inputs.helm_release_namespace }}