forked from dynatrace-oss/dynatrace-gcp-monitor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdynatrace-gcp-function.yaml
92 lines (92 loc) · 3.06 KB
/
dynatrace-gcp-function.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
apiVersion: v1
kind: ServiceAccount
metadata:
name: dynatrace-gcp-function-sa
namespace: dynatrace
automountServiceAccountToken: false
---
apiVersion: v1
kind: ConfigMap
metadata:
name: dynatrace-gcp-function-config
namespace: dynatrace
data:
# coma separated list of GCP services, which should be queried for metrics and ingested into Dynatrace
GCP_SERVICES: "api,cloud_function,cloudsql_database,datastore_request,filestore_instance,gcs_bucket,https_lb_rule,internal_http_lb_rule,internal_tcp_lb_rule,internal_udp_lb_rule,tcp_lb_rule,udp_lb_rule,pubsub_snapshot,pubsub_subscription,pubsub_topic,pubsublite_topic_partition,k8s_pod,k8s_node,k8s_container,k8s_cluster,gce_instance"
# if true function will output lines of metrics into stdout
PRINT_METRIC_INGEST_INPUT: "false"
# if true function requires valid SSL certificates when communicating with Dynatrace cluster
# may be used to bypass SSL certificates errors when traffic is proxied through Active Gate with self-signed certificate
REQUIRE_VALID_CERTIFICATE: "true"
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: dynatrace-gcp-function
labels:
app: dynatrace-gcp-function
namespace: dynatrace
spec:
selector:
matchLabels:
app: dynatrace-gcp-function
replicas: 1
template:
metadata:
labels:
app: dynatrace-gcp-function
annotations:
"version" : "1"
spec:
serviceAccountName: dynatrace-gcp-function-sa
automountServiceAccountToken: false
containers:
- image: dynatrace/dynatrace-gcp-function
name: dynatrace-gcp-function
imagePullPolicy: Always
env:
- name: GCP_SERVICES
valueFrom:
configMapKeyRef:
name: dynatrace-gcp-function-config
key: GCP_SERVICES
- name: PRINT_METRIC_INGEST_INPUT
valueFrom:
configMapKeyRef:
name: dynatrace-gcp-function-config
key: PRINT_METRIC_INGEST_INPUT
- name: REQUIRE_VALID_CERTIFICATE
valueFrom:
configMapKeyRef:
name: dynatrace-gcp-function-config
key: REQUIRE_VALID_CERTIFICATE
- name: DYNATRACE_ACCESS_KEY_SECRET_NAME
value: DYNATRACE_ACCESS_KEY
- name: DYNATRACE_URL_SECRET_NAME
value: DYNATRACE_URL
- name: DYNATRACE_URL
valueFrom:
secretKeyRef:
name: dynatrace-gcp-function-secret
key: url
- name: DYNATRACE_ACCESS_KEY
valueFrom:
secretKeyRef:
name: dynatrace-gcp-function-secret
key: access-key
resources:
requests:
memory: "256Mi"
cpu: "200m"
limits:
memory: "512Mi"
cpu: "500m"
livenessProbe:
httpGet:
path: /health
port: 8080
startupProbe:
httpGet:
path: /health
port: 8080
initialDelaySeconds: 10