-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (35 loc) · 1.42 KB
/
deploy_alloy.yml
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
name: Deploy Alloy
on:
workflow_dispatch:
workflow_call:
secrets:
VM_HOST:
required: true
VM_USERNAME:
required: true
VM_PRIVATE_KEY:
required: true
VM_PORT:
required: true
jobs:
k8sDeploy:
name: k8sDeploy
runs-on: ubuntu-latest
environment: prod
steps:
- name: 'Deploy on k8s'
uses: appleboy/ssh-action@029f5b4aeeeb58fdfe1410a5d17f967dacf36262 #v1.0.3
with:
host: ${{ secrets.VM_HOST }}
username: ${{ secrets.VM_USERNAME }}
key: ${{ secrets.VM_PRIVATE_KEY }}
port: ${{ secrets.VM_PORT }}
fingerprint: ${{ secrets.HOST_FINGERPRINT }}
script: |
mkdir -p expenses-monitor/monitoring/alloy && cd expenses-monitor/monitoring/alloy
wget -O values.yaml https://raw.githubusercontent.com/and-mora/expenses-monitor/master/monitoring/alloy/values.yaml
wget -O Chart.yaml https://raw.githubusercontent.com/and-mora/expenses-monitor/master/monitoring/alloy/Chart.yaml
wget -O config.alloy https://raw.githubusercontent.com/and-mora/expenses-monitor/master/monitoring/alloy/config.alloy
kubectl create cm alloy-config --from-file=config.alloy --dry-run=client -o yaml -n monitoring | kubectl apply -f -
helm dependency build
helm upgrade --install alloy charts/* -f values.yaml --wait --timeout 300s -n monitoring