This commit is contained in:
commit
5dbf090cea
1 changed files with 27 additions and 0 deletions
27
.forgejo/workflows/deploy.yaml
Normal file
27
.forgejo/workflows/deploy.yaml
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
name: Deployment
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
|
||||||
|
env:
|
||||||
|
KSM_VERSION: "6.1.0"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
container:
|
||||||
|
runs-on: docker
|
||||||
|
container: fleaz/kubeci
|
||||||
|
steps:
|
||||||
|
- name: "Setup k8s context"
|
||||||
|
run: |
|
||||||
|
echo "${{secrets.KUBE_API_CRT}}" > /tmp/ca.pem
|
||||||
|
kubectl config set-cluster k3s --server=${{secrets.KUBE_HOST}} --certificate-authority=/tmp/ca.pem
|
||||||
|
kubectl config set-credentials forgejo --token="${{secrets.KUBE_API_TOKEN}}"
|
||||||
|
kubectl config set-context k3s --cluster k3s --user forgejo --namespace default
|
||||||
|
kubectl config use-context k3s
|
||||||
|
- name: "Deploy"
|
||||||
|
run: |
|
||||||
|
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
|
||||||
|
helm repo update prometheus-community
|
||||||
|
helm upgrade --install ksm prometheus-community/kube-state-metrics \
|
||||||
|
--namespace ksm-system \
|
||||||
|
--version "${KSM_VERSION}"
|
Loading…
Add table
Add a link
Reference in a new issue