Skip to content

Instantly share code, notes, and snippets.

@mseiwald
Last active October 24, 2019 11:53
Show Gist options
  • Save mseiwald/b8eb5b6e223fb813d6c1198f73bbc75e to your computer and use it in GitHub Desktop.
Save mseiwald/b8eb5b6e223fb813d6c1198f73bbc75e to your computer and use it in GitHub Desktop.
apiVersion: apps/v1
kind: Deployment
metadata:
name: hw-tracing-app1-dd
spec:
replicas: 1
selector:
matchLabels:
app: hw-tracing-app1-dd
template:
metadata:
labels:
app: hw-tracing-app1-dd
annotations:
service-discovery.datadoghq.com/hw-tracing-app1-dd.check_names: '["jmx"]'
service-discovery.datadoghq.com/hw-tracing-app1-dd.init_configs: '[{}]'
service-discovery.datadoghq.com/hw-tracing-app1-dd.instances: '[{"host": "%%host%%", "jmx_url": "service:jmx:rmi:///jndi/rmi://%%host%%:8086/jmxrmi"}]'
spec:
containers:
- image: <IMAGE_TAG>
name: hw-tracing-app1-dd
ports:
- containerPort: 8080
protocol: TCP
- name: jmx
containerPort: 8086
protocol: TCP
readinessProbe:
httpGet:
path: /ok
port: 8080
initialDelaySeconds: 10
periodSeconds: 10
env:
- name: DD_TRACE_ANALYTICS_ENABLED
value: "true"
- name: DD_AGENT_HOST
valueFrom:
fieldRef:
fieldPath: status.hostIP
- name: DOGSTATSD_HOST_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
resources:
requests:
memory: "400Mi"
cpu: "250m"
limits:
memory: "600Mi"
cpu: "500m"
---
apiVersion: v1
kind: Service
metadata:
name: hw-tracing-app1-dd
spec:
externalTrafficPolicy: Cluster
ports:
- port: 8080
protocol: TCP
selector:
app: hw-tracing-app1-dd
type: LoadBalancer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment