Commit 686f95f2 by Guangbo Chen

Add rancher datadog configs

parent 67f59f3c
......@@ -8,7 +8,7 @@ keywords:
- alerting
- metric
home: https://www.datadoghq.com
icon: https://datadog-live.imgix.net/img/dd_logo_70x75.png
icon: file://../dd_logo_70x75.png
sources:
- https://app.datadoghq.com/account/settings#agent/kubernetes
- https://github.com/DataDog/datadog-agent
......
labels:
io.cattle.role: cluster # options are cluster/project
rancher_min_version: 2.3.0
questions:
#image configurations
- variable: defaultImage
......@@ -63,7 +64,14 @@ questions:
required: true
label: Datadog Metrics App Key
group: "Cluster Agent"
show_if: "clusterAgent.enabled=true&&clusterAgent.metricsProvider.enabled=true"
show_if: "clusterAgent.enabled=true&&clusterAgent.metricsProvider.enabled=true&&datadog.appKeyExistingSecret="
- variable: datadog.appKeyExistingSecret
default: ""
description: "If set, use the secret with a provided name instead of creating a new appKey secret."
type: secret
label: Select Existing Datadog App Key(Secret)
group: "Cluster Agent"
show_if: "clusterAgent.enabled=true&&clusterAgent.metricsProvider.enabled=true&&datadog.appKey="
#datadog agent configurations
- variable: datadog.apiKey
default: ""
......@@ -72,6 +80,14 @@ questions:
label: Datadog API Key
group: "Agent Configuration"
required: true
show_if: "datadog.apiKeyExistingSecret="
- variable: datadog.apiKeyExistingSecret
default: ""
description: "If set, use the secret with a provided name instead of creating a new apiKey secret."
type: secret
label: Select Existing Datadog API Key(Secret)
group: "Agent Configuration"
show_if: "datadog.apiKey="
- variable: datadog.site
default: "datadoghq.com"
description: "The site of the Datadog intake to send Agent data to"
......
{{- if and .Values.clusterAgent.enabled .Values.clusterAgent.clusterChecks.enabled .Values.clusterchecksDeployment.enabled -}}
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "datadog.fullname" . }}-clusterchecks
......@@ -9,6 +9,9 @@ metadata:
release: {{ .Release.Name | quote }}
heritage: {{ .Release.Service | quote }}
spec:
selector:
matchLabels:
app: {{ template "datadog.fullname" . }}-clusterchecks
replicas: {{ .Values.clusterchecksDeployment.replicas }}
template:
metadata:
......
......@@ -13,10 +13,12 @@ spec:
selector:
matchLabels:
app: {{ template "datadog.fullname" . }}-cluster-agent
release: {{ .Release.Name | quote }}
template:
metadata:
labels:
app: {{ template "datadog.fullname" . }}-cluster-agent
release: {{ .Release.Name | quote }}
name: {{ template "datadog.fullname" . }}-cluster-agent
annotations:
ad.datadoghq.com/{{ .Values.clusterAgent.containerName }}.check_names: '["prometheus"]'
......
......@@ -102,6 +102,22 @@
- name: DD_EXTRA_CONFIG_PROVIDERS
value: "clusterchecks"
{{- end }}
{{- if .Values.datadog.httpProxy }}
- name: DD_PROXY_HTTP
value: {{ .Values.datadog.httpProxy | quote }}
{{- end }}
{{- if .Values.datadog.httpsProxy }}
- name: DD_PROXY_HTTPS
value: {{ .Values.datadog.httpsProxy | quote }}
{{- end }}
{{- if .Values.datadog.noProxy }}
- name: DD_PROXY_NO_PROXY
value: {{ .Values.datadog.noProxy | quote }}
{{- end }}
{{- if .Values.datadog.apmNonLocalTraffic }}
- name: DD_APM_NON_LOCAL_TRAFFIC
value: {{ .Values.datadog.apmNonLocalTraffic | quote }}
{{- end }}
{{- if .Values.daemonset.containers.agent.env }}
{{ toYaml .Values.daemonset.containers.agent.env | indent 4 }}
{{- end }}
......
......@@ -137,6 +137,22 @@
- name: DD_EXTRA_CONFIG_PROVIDERS
value: "clusterchecks"
{{- end }}
{{- if .Values.datadog.httpProxy }}
- name: DD_PROXY_HTTP
value: {{ .Values.datadog.httpProxy | quote }}
{{- end }}
{{- if .Values.datadog.httpsProxy }}
- name: DD_PROXY_HTTPS
value: {{ .Values.datadog.httpsProxy | quote }}
{{- end }}
{{- if .Values.datadog.noProxy }}
- name: DD_PROXY_NO_PROXY
value: {{ .Values.datadog.noProxy | quote }}
{{- end }}
{{- if .Values.datadog.apmNonLocalTraffic }}
- name: DD_APM_NON_LOCAL_TRAFFIC
value: {{ .Values.datadog.apmNonLocalTraffic | quote }}
{{- end }}
{{- if .Values.datadog.env }}
{{ toYaml .Values.datadog.env | indent 4 }}
{{- end }}
......
{{- if .Values.daemonset.enabled }}
{{- if (or (.Values.datadog.apiKeyExistingSecret) (.Values.datadog.apiKey)) }}
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: {{ template "datadog.fullname" . }}
......@@ -10,6 +10,9 @@ metadata:
release: {{ .Release.Name | quote }}
heritage: {{ .Release.Service | quote }}
spec:
selector:
matchLabels:
app: {{ template "datadog.fullname" . }}
template:
metadata:
labels:
......@@ -119,6 +122,12 @@ spec:
{{- end }}
{{- if .Values.daemonset.tolerations }}
tolerations:
{{- if .Values.daemonset.rkeETCDControlPlane }}
- key: "node-role.kubernetes.io/etcd"
value: "true"
- key: "node-role.kubernetes.io/controlplane"
value: "true"
{{- end }}
{{ toYaml .Values.daemonset.tolerations | indent 8 }}
{{- end }}
{{- if .Values.daemonset.affinity }}
......
{{- if .Values.deployment.enabled }}
{{- if (or (.Values.datadog.apiKeyExistingSecret) (.Values.datadog.apiKey)) }}
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "datadog.fullname" . }}
......@@ -10,6 +10,10 @@ metadata:
release: {{ .Release.Name | quote }}
heritage: {{ .Release.Service | quote }}
spec:
selector:
matchLabels:
app: {{ template "datadog.fullname" . }}
type: deployment
replicas: {{ .Values.deployment.replicas }}
template:
metadata:
......
......@@ -11,7 +11,8 @@ image:
## Define the repository to use:
## use "datadog/agent" for Datadog Agent 6
## use "datadog/dogstatsd" for Standalone Datadog Agent DogStatsD6
repository: datadog/agent
# repository: datadog/agent
repository: ranchercharts/datadog-agent
## @param tag - string - required
......@@ -193,7 +194,7 @@ datadog:
## Note: /etc/passwd is automatically mounted to allow username resolution.
## ref: https://docs.datadoghq.com/graphing/infrastructure/process/#kubernetes-daemonset
#
# processAentEnabled: false
# processAgentEnabled: false
## @param env - list of object - optional
## The dd-agent supports many environment variables
......@@ -294,7 +295,8 @@ clusterAgent:
containerName: cluster-agent
image:
repository: datadog/cluster-agent
# repository: datadog/cluster-agent
repository: ranchercharts/datadog-cluster-agent
tag: 1.3.2
pullPolicy: IfNotPresent
......@@ -394,6 +396,9 @@ kubeStateMetrics:
enabled: true
kube-state-metrics:
image:
repository: ranchercharts/coreos-kube-state-metrics
tag: v1.7.2
rbac:
## @param created - boolean - required
## If true, create & use RBAC resources
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment