-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: OB-36454 update values file to new conventions and add and upda…
…te tests - Update values file to give more descriptive names and add comments for clarity - Add new examples for prometheus labels
- Loading branch information
1 parent
74bbf39
commit d643670
Showing
8 changed files
with
235 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
examples/agent/pod_metrics/sample-pod-prometheus-labels-no.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: prometheus-example-app-promlabel-no | ||
name: prometheus-example-app-promlabel-no | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: prometheus-example-app-promlabel-no | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: prometheus-example-app-promlabel-no | ||
annotations: | ||
prometheus.io/scrape: false, | ||
prometheus.io/path: '/metrics' | ||
prometheus.io/port: '8080' | ||
spec: | ||
containers: | ||
- name: prometheus-example-app-promlabel-no | ||
image: quay.io/brancz/prometheus-example-app:v0.3.0 | ||
ports: | ||
- name: web | ||
containerPort: 8080 | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: prometheus-example-app-promlabel-no-service | ||
spec: | ||
selector: | ||
app.kubernetes.io/name: prometheus-example-app-promlabel-no | ||
ports: | ||
- protocol: TCP | ||
port: 8080 # Exposed service port | ||
targetPort: 8080 | ||
name: metrics | ||
--- | ||
apiVersion: batch/v1 | ||
kind: CronJob | ||
metadata: | ||
name: caller-cronjob | ||
spec: | ||
schedule: "*/1 * * * *" # Runs every minute | ||
jobTemplate: | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: caller | ||
image: curlimages/curl:latest # A lightweight curl image | ||
env: | ||
- name: SLEEP_TIME | ||
value: "10" # Sleep time in seconds | ||
- name: LOOP_COUNT | ||
value: "36" # Number of iterations | ||
command: | ||
- /bin/sh | ||
- -c | ||
- | | ||
for i in $(seq 1 $LOOP_COUNT); do | ||
curl http://prometheus-example-app-promlabel-no-service:8080; # Adjust the URL and port as necessary | ||
# Second call on even numbers | ||
if [ $((i % 2)) -eq 0 ]; then | ||
curl http://prometheus-example-app-promlabel-no-service:8080/err; # Second target service | ||
echo "Second call on even #$i made." | ||
fi | ||
sleep $SLEEP_TIME; | ||
done | ||
restartPolicy: OnFailure |
Oops, something went wrong.