-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (47 loc) · 1.79 KB
/
k8s-monitoring-deploy.yaml
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
name: k8s-monitoring-deploy
on:
workflow_dispatch:
push:
branches:
- main
paths:
- k8sevents-values.yaml
- kubeletstats-values.yaml
env:
AWS_REGION: us-east-1
CLUSTER_NAME: raas-us1
permissions:
id-token: write # This is required for requesting the JWT
jobs:
k8s-monitoring-deploy:
# don't run when creating the repo from this template
if: github.run_number != 1
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Clone the repository
uses: actions/checkout@v4
- name: AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{secrets.AWS_GH_EKS_ROLE_US1}}
role-session-name: ci-run-${{ github.run_id }}
aws-region: ${{ env.AWS_REGION }}
- name: kubeconfig
run: |
aws eks update-kubeconfig --name ${{ env.CLUSTER_NAME }} --region ${{ env.AWS_REGION }} --kubeconfig ./kubeconfig
echo 'KUBE_CONFIG_DATA<<EOF' >> $GITHUB_ENV
echo $(cat ./kubeconfig | base64) >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
- name: k8s manifest deploy
uses: koslib/helm-eks-action@master
env:
KUBE_CONFIG_DATA: ${{ env.KUBE_CONFIG_DATA }}
with:
command: |
helm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-charts
helm repo update
helm upgrade -n ${{vars.K8S_NAMESPACE}} --install ${{vars.K8S_NAMESPACE}}-otelcol-kubeletstats open-telemetry/opentelemetry-collector -f kubeletstats-values.yaml --wait --debug
helm upgrade -n ${{vars.K8S_NAMESPACE}} --install ${{vars.K8S_NAMESPACE}}-otelcol-k8sevents open-telemetry/opentelemetry-collector -f k8sevents-values.yaml --wait --debug