-
Notifications
You must be signed in to change notification settings - Fork 7
/
dns-lookup.yaml
39 lines (39 loc) · 1.02 KB
/
dns-lookup.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
# $ oc process -p INTERVAL=1 -p NAME=<NAME-TO-LOOKUP> -f dns-lookup.yaml | oc create -f -
---
kind: Template
apiVersion: template.openshift.io/v1
metadata:
name: dnslookup
parameters:
- name: NAME
value: "_grpc._tcp.prometheus-operated.openshift-monitoring.svc.cluster.local"
- name: DEBUG
value: "-debug"
- name: INTERVAL
value: "6"
objects:
- kind: Pod
apiVersion: v1
metadata:
name: dnslookup
labels:
app: dnslookup
spec:
containers:
- name: debug
image: quay.io/openshift/origin-hello-openshift
imagePullPolicy: IfNotPresent
command:
- /bin/bash
- -c
args:
- trap 'kill -TERM $child' TERM; while :; do nslookup ${DEBUG} ${NAME}; echo "nslookup status $?"; sleep ${INTERVAL}; done | cat -n & child=$!; wait $child
securityContext:
allowPrivilegeEscalation: false
runAsNonRoot: true
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault
terminationGracePeriodSeconds: 0s