Skip to content

Commit af232e9

Browse files
committed
fix otel-operator demo
Signed-off-by: Jirka Kremser <jiri.kremser@gmail.com>
1 parent 2ccb129 commit af232e9

File tree

5 files changed

+21
-8
lines changed

5 files changed

+21
-8
lines changed

examples/metric-pull/podinfo-so.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ spec:
1111
scalerAddress: "keda-otel-scaler.keda.svc:4318"
1212
metricQuery: "avg(http_request_duration_seconds_count{path=delay, method=GET, status=200})"
1313
operationOverTime: "rate"
14-
targetValue: "10"
14+
targetValue: "2"
1515
clampMax: "600"
1616
minReplicaCount: 1
1717
maxReplicaCount: 3

examples/metric-pull/setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ kubectl rollout status -n keda --timeout=300s deploy/keda-otel-scaler
2727
kubectl rollout status --timeout=300s deploy/podinfo
2828

2929
# create scaled objects
30-
kubectl apply -f podinfo-so.yaml
30+
kubectl apply -f ${DIR}/podinfo-so.yaml
3131

3232
# create some traffic
3333
(hey -n 7000 -z 180s http://localhost:8181/delay/2 &> /dev/null)&

examples/otel-operator/setup.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#!/bin/bash
22
DIR="${DIR:-$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )}"
33

4-
export PR_BRANCH=
5-
export GH_PAT=
4+
#export PR_BRANCH=
5+
#export GH_PAT=
66

77
command -v figlet &> /dev/null && figlet OTel Operator + GitHub receiver
8-
[ -z "${PR_BRANCH}" ] && echo "Set BRANCH env variable to a branch name from which a PR is opened against kedify/otel-add-on repo" && exit 1
8+
[ -z "${PR_BRANCH}" ] && echo "Set PR_BRANCH env variable to a branch name from which a PR is opened against kedify/otel-add-on repo" && exit 1
99
[ -z "${GH_PAT}" ] && echo "Set GH_PAT env variable to a PAT token that has read permissions for content on kedify/otel-add-on repo" && exit 1
1010

1111
# setup helm repos
@@ -33,7 +33,7 @@ for d in \
3333
keda-operator-metrics-apiserver \
3434
otel-operator \
3535
keda-otel-scaler \
36-
otel-add-on-otc-collector ; do
36+
otel-add-on-collector ; do
3737
kubectl rollout status -n keda --timeout=600s deploy/${d}
3838
done
3939

examples/otel-operator/so.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,14 @@ spec:
1616
targetValue: "100"
1717
clampMin: "0"
1818
clampMax: "300"
19-
operationOverTime: "max"
19+
operationOverTime: "last_one"
2020
maxReplicaCount: 3
21+
minReplicaCount: 1
2122
advanced:
2223
horizontalPodAutoscalerConfig:
2324
behavior:
2425
scaleDown:
2526
stabilizationWindowSeconds: 1
2627
scaleUp:
2728
stabilizationWindowSeconds: 10
29+

helmchart/otel-add-on/templates/NOTES.txt

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ Following components were installed:
4141

4242
Architecture:
4343
{{- $char := "" -}}
44+
{{- $isAnySidecar := false -}}
4445
{{- $m := "" -}}
4546
{{- if .Values.otelOperator.enabled }}
4647
┏━━━━┓
@@ -72,9 +73,13 @@ Architecture:
7273
{{- printf "\n" -}}
7374
{{- range $collectors }}
7475
{{- $m = .mode -}}
75-
{{- if and .targetAllocatorEnabled (eq .mode "sidecar") -}}
76+
77+
{{- if eq .mode "sidecar" -}}
78+
{{- $isAnySidecar = true -}}
79+
{{- if .targetAllocatorEnabled -}}
7680
{{- $m = "statefulset" -}}
7781
{{- end -}}
82+
{{- end -}}
7883
{{- printf " │ %-13s│ " (printf "•%s" ($m | trunc 11)) -}}
7984
{{- end }}
8085
{{- printf "\n" -}}
@@ -108,3 +113,9 @@ Architecture:
108113
{{- if $collectors -}}{{- printf " " -}}{{- end -}}
109114
{{- printf " ╰─────────────────────╯ ╰╶╶╶╶╶╶╯\n" -}}
110115
{{- end }}
116+
117+
{{- if and $isAnySidecar (or (not .Values.otelOperator.admissionWebhooks.create) (eq .Values.otelOperator.manager.env.ENABLE_WEBHOOKS "false")) }}
118+
!!! WARNING !!!
119+
sidecar injection is not going to work without enabling the mutating webhooks,
120+
use helm ... -f https://raw.githubusercontent.com/kedify/otel-add-on/refs/heads/main/helmchart/otel-add-on/enable-operator-hooks-values.yaml
121+
{{- end }}

0 commit comments

Comments
 (0)