.github/workflows/iac-pipeline-create.yml: fixed setup observability-agent

This commit is contained in:
Haitao Pan 2023-12-27 16:31:36 +08:00
parent dae2b336c5
commit 511374c75e
2 changed files with 32 additions and 10 deletions

View File

@ -73,8 +73,8 @@ jobs:
uses: open-source-solution-design/Modern-Container-Application-Reference-Architecture/.github/workflows/use-setup-observability-agent.yml@main
with:
domain: 'svc.ink'
cluster_name: 'monitor'
ssh_host_name: 'monitor'
cluster_name: 'devops'
ssh_host_name: 'devops'
secrets:
GCP_CREDENTIALS_JSON: ${{ secrets.GCP_CREDENTIALS_JSON }}
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
@ -102,9 +102,9 @@ jobs:
setup-sit-cluster-observability-agent:
uses: open-source-solution-design/Modern-Container-Application-Reference-Architecture/.github/workflows/use-setup-observability-agent.yml@main
with:
domain: 'svc.ink'
cluster_name: 'monitor'
ssh_host_name: 'monitor'
cluster_name: 'sit'
ssh_host_name: 'sit'
domain: 'svc-sit.ink'
secrets:
GCP_CREDENTIALS_JSON: ${{ secrets.GCP_CREDENTIALS_JSON }}
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
@ -132,9 +132,9 @@ jobs:
setup-uat-cluster-observability-agent:
uses: open-source-solution-design/Modern-Container-Application-Reference-Architecture/.github/workflows/use-setup-observability-agent.yml@main
with:
domain: 'svc.ink'
cluster_name: 'monitor'
ssh_host_name: 'monitor'
cluster_name: 'uat'
ssh_host_name: 'uat'
domain: 'svc-uat.ink'
secrets:
GCP_CREDENTIALS_JSON: ${{ secrets.GCP_CREDENTIALS_JSON }}
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
@ -163,8 +163,8 @@ jobs:
uses: open-source-solution-design/Modern-Container-Application-Reference-Architecture/.github/workflows/use-setup-observability-agent.yml@main
with:
domain: 'svc.ink'
cluster_name: 'monitor'
ssh_host_name: 'monitor'
cluster_name: 'prod'
ssh_host_name: 'prod'
secrets:
GCP_CREDENTIALS_JSON: ${{ secrets.GCP_CREDENTIALS_JSON }}
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}

View File

@ -0,0 +1,22 @@
#!/bin/bash
cat > prometheus-values.yaml << EOF
global:
imageRegistry: "artifact.onwalk.net/base"
prometheus:
enabled: false
defaultRules:
create: false
grafana:
enabled: false
prometheus-windows-exporter:
enabled: false
alertmanager:
enabled: false
EOF
node_name=`kubectl get nodes | awk 'NR>1 {print $1}'`
kubectl create namespace monitoring || echo true
kubectl label nodes $node prometheus=true --overwrite || echo true
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo update
helm upgrade --install prometheus-agent prometheus-community/kube-prometheus-stack -n monitoring -f prometheus-values.yaml