File tree Expand file tree Collapse file tree 6 files changed +159
-0
lines changed Expand file tree Collapse file tree 6 files changed +159
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ name : Updatecli
3
+
4
+ on :
5
+ workflow_dispatch :
6
+ schedule :
7
+ # Run at 1:00 every Sunday Night
8
+ - cron : ' 0 1 * * 1'
9
+
10
+ permissions :
11
+ contents : " write"
12
+ pull-requests : " write"
13
+
14
+ jobs :
15
+ updatecli :
16
+ runs-on : " ubuntu-latest"
17
+ steps :
18
+ - name : Checkout
19
+ uses : actions/checkout@v2
20
+
21
+ - name : Install Updatecli in the runner
22
+ uses : updatecli/updatecli-action@v2
23
+
24
+ - name : Run Updatecli in apply mode
25
+ run : |
26
+ updatecli apply --config updatecli/updatecli.d --values updatecli/values.yaml
27
+ env :
28
+ GITHUB_TOKEN : " ${{ secrets.GITHUB_TOKEN }}"
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ NAMESPACE=tracing
3
+ CHART_VERSION=0.107.0
4
+ APPLICATION=" opentelemetry-collector"
5
+ ENVIRONMENT=` kubectl config current-context | cut -d- -f1`
6
+ DEPLOY=false
7
+ TEMPLATE=false
8
+
9
+ while getopts " dt" arg; do
10
+ case $arg in
11
+ d)
12
+ echo " -d was triggered, Deploying"
13
+ DEPLOY=true
14
+ ;;
15
+ t)
16
+ echo " -t was triggered, Rendering template"
17
+ TEMPLATE=true
18
+ ;;
19
+ * )
20
+ echo " Showing differences"
21
+ ;;
22
+ esac
23
+ done
24
+
25
+ echo " Environment is ${ENVIRONMENT} "
26
+
27
+ if [ ${DEPLOY} == " true" ]
28
+ then
29
+ ACTION=" Upgrading"
30
+ COMMAND=" upgrade"
31
+ FLAGS=" --atomic --wait --timeout 300s --install ${APPLICATION} "
32
+ elif [ ${TEMPLATE} == true ]
33
+ then
34
+ ACTION=" Rendering template"
35
+ COMMAND=" template ${APPLICATION} "
36
+ FLAGS=" "
37
+ else
38
+ ACTION=" Showing differences of"
39
+ COMMAND=" diff upgrade --install ${APPLICATION} "
40
+ FLAGS=" -C 1"
41
+ fi
42
+
43
+ echo " ${ACTION} ${APPLICATION} in namespace ${NAMESPACE} ..."
44
+
45
+ # Adddd helm repository
46
+ helm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-charts
47
+ helm repo update
48
+
49
+ # install opentelemetry chart
50
+ helm ${COMMAND} \
51
+ ${OTEL_PROCESSOR} \
52
+ --namespace=${NAMESPACE} \
53
+ ${FLAGS} \
54
+ -f values.yaml \
55
+ -f values.${ENVIRONMENT} .yaml \
56
+ open-telemetry/opentelemetry-collector --version ${CHART_VERSION}
Original file line number Diff line number Diff line change
1
+ tolerations :
2
+ - key : dedicated
3
+ operator : Equal
4
+ value : observability-prod-nodes
5
+ effect : NoSchedule
6
+
7
+ affinity :
8
+ nodeAffinity :
9
+ requiredDuringSchedulingIgnoredDuringExecution :
10
+ nodeSelectorTerms :
11
+ - matchExpressions :
12
+ - key : instancegroup
13
+ operator : In
14
+ values :
15
+ - observability-prod-nodes
Original file line number Diff line number Diff line change
1
+ mode : deployment
2
+ replicaCount : 2
3
+
4
+ image :
5
+ repository : otel/opentelemetry-collector-contrib
6
+
7
+ command :
8
+ name : otelcol-contrib
Original file line number Diff line number Diff line change
1
+ ---
2
+ name : Bump OpenTelemetry-Collector chart version
3
+
4
+ pipelineid : " opentelemetry-collector"
5
+
6
+ scms :
7
+ default :
8
+ kind : github
9
+ spec :
10
+ user : " {{ .github.user }}"
11
+ email : " {{ .github.email }}"
12
+ owner : " {{ .github.owner }}"
13
+ repository : " {{ .github.repository }}"
14
+ token : " {{ requiredEnv .github.token }}"
15
+ username : " {{ .github.username }}"
16
+ branch : " {{ .github.branch }}"
17
+
18
+ sources :
19
+ chartLatestRelease :
20
+ kind : helmchart
21
+ spec :
22
+ url : https://open-telemetry.github.io/opentelemetry-helm-charts
23
+ name : opentelemetry-collector
24
+
25
+ targets :
26
+ chartVersion :
27
+ sourceid : chartLatestRelease
28
+ name : Update Chart Version for OpenTelemetry Collector to {{ source "chartLatestRelease" }}
29
+ kind : file
30
+ spec :
31
+ file : opentelemetry-collector/deploy.sh
32
+ matchpattern : " CHART_VERSION=.*"
33
+ replacepattern : ' CHART_VERSION={{ source "chartLatestRelease" }}'
34
+ scmid : default
35
+
36
+ actions :
37
+ default :
38
+ kind : github/pullrequest
39
+ scmid : default
40
+ title : Bump OpenTelemetry Collector chart version to {{ source "chartLatestRelease" }}
41
+ spec :
42
+ labels :
43
+ - dependencies
44
+ - observability
Original file line number Diff line number Diff line change
1
+ github :
2
+ user : " treezio"
3
+
4
+ username : " treezio"
5
+ token : " GITHUB_TOKEN"
6
+ branch : " main"
7
+ owner : " treezio"
8
+ repository : " updatecli-gitops"
You can’t perform that action at this time.
0 commit comments