Commit 686f95f2 by Guangbo Chen

Add rancher datadog configs

parent 67f59f3c
...@@ -8,7 +8,7 @@ keywords: ...@@ -8,7 +8,7 @@ keywords:
- alerting - alerting
- metric - metric
home: https://www.datadoghq.com home: https://www.datadoghq.com
icon: https://datadog-live.imgix.net/img/dd_logo_70x75.png icon: file://../dd_logo_70x75.png
sources: sources:
- https://app.datadoghq.com/account/settings#agent/kubernetes - https://app.datadoghq.com/account/settings#agent/kubernetes
- https://github.com/DataDog/datadog-agent - https://github.com/DataDog/datadog-agent
......
labels: labels:
io.cattle.role: cluster # options are cluster/project io.cattle.role: cluster # options are cluster/project
rancher_min_version: 2.3.0
questions: questions:
#image configurations #image configurations
- variable: defaultImage - variable: defaultImage
...@@ -63,7 +64,14 @@ questions: ...@@ -63,7 +64,14 @@ questions:
required: true required: true
label: Datadog Metrics App Key label: Datadog Metrics App Key
group: "Cluster Agent" 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 #datadog agent configurations
- variable: datadog.apiKey - variable: datadog.apiKey
default: "" default: ""
...@@ -72,6 +80,14 @@ questions: ...@@ -72,6 +80,14 @@ questions:
label: Datadog API Key label: Datadog API Key
group: "Agent Configuration" group: "Agent Configuration"
required: true 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 - variable: datadog.site
default: "datadoghq.com" default: "datadoghq.com"
description: "The site of the Datadog intake to send Agent data to" description: "The site of the Datadog intake to send Agent data to"
......
{{- if and .Values.clusterAgent.enabled .Values.clusterAgent.clusterChecks.enabled .Values.clusterchecksDeployment.enabled -}} {{- if and .Values.clusterAgent.enabled .Values.clusterAgent.clusterChecks.enabled .Values.clusterchecksDeployment.enabled -}}
apiVersion: extensions/v1beta1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: {{ template "datadog.fullname" . }}-clusterchecks name: {{ template "datadog.fullname" . }}-clusterchecks
...@@ -9,6 +9,9 @@ metadata: ...@@ -9,6 +9,9 @@ metadata:
release: {{ .Release.Name | quote }} release: {{ .Release.Name | quote }}
heritage: {{ .Release.Service | quote }} heritage: {{ .Release.Service | quote }}
spec: spec:
selector:
matchLabels:
app: {{ template "datadog.fullname" . }}-clusterchecks
replicas: {{ .Values.clusterchecksDeployment.replicas }} replicas: {{ .Values.clusterchecksDeployment.replicas }}
template: template:
metadata: metadata:
......
...@@ -13,10 +13,12 @@ spec: ...@@ -13,10 +13,12 @@ spec:
selector: selector:
matchLabels: matchLabels:
app: {{ template "datadog.fullname" . }}-cluster-agent app: {{ template "datadog.fullname" . }}-cluster-agent
release: {{ .Release.Name | quote }}
template: template:
metadata: metadata:
labels: labels:
app: {{ template "datadog.fullname" . }}-cluster-agent app: {{ template "datadog.fullname" . }}-cluster-agent
release: {{ .Release.Name | quote }}
name: {{ template "datadog.fullname" . }}-cluster-agent name: {{ template "datadog.fullname" . }}-cluster-agent
annotations: annotations:
ad.datadoghq.com/{{ .Values.clusterAgent.containerName }}.check_names: '["prometheus"]' ad.datadoghq.com/{{ .Values.clusterAgent.containerName }}.check_names: '["prometheus"]'
......
...@@ -102,6 +102,22 @@ ...@@ -102,6 +102,22 @@
- name: DD_EXTRA_CONFIG_PROVIDERS - name: DD_EXTRA_CONFIG_PROVIDERS
value: "clusterchecks" value: "clusterchecks"
{{- end }} {{- 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 }} {{- if .Values.daemonset.containers.agent.env }}
{{ toYaml .Values.daemonset.containers.agent.env | indent 4 }} {{ toYaml .Values.daemonset.containers.agent.env | indent 4 }}
{{- end }} {{- end }}
......
...@@ -137,6 +137,22 @@ ...@@ -137,6 +137,22 @@
- name: DD_EXTRA_CONFIG_PROVIDERS - name: DD_EXTRA_CONFIG_PROVIDERS
value: "clusterchecks" value: "clusterchecks"
{{- end }} {{- 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 }} {{- if .Values.datadog.env }}
{{ toYaml .Values.datadog.env | indent 4 }} {{ toYaml .Values.datadog.env | indent 4 }}
{{- end }} {{- end }}
......
{{- if .Values.daemonset.enabled }} {{- if .Values.daemonset.enabled }}
{{- if (or (.Values.datadog.apiKeyExistingSecret) (.Values.datadog.apiKey)) }} {{- if (or (.Values.datadog.apiKeyExistingSecret) (.Values.datadog.apiKey)) }}
apiVersion: extensions/v1beta1 apiVersion: apps/v1
kind: DaemonSet kind: DaemonSet
metadata: metadata:
name: {{ template "datadog.fullname" . }} name: {{ template "datadog.fullname" . }}
...@@ -10,6 +10,9 @@ metadata: ...@@ -10,6 +10,9 @@ metadata:
release: {{ .Release.Name | quote }} release: {{ .Release.Name | quote }}
heritage: {{ .Release.Service | quote }} heritage: {{ .Release.Service | quote }}
spec: spec:
selector:
matchLabels:
app: {{ template "datadog.fullname" . }}
template: template:
metadata: metadata:
labels: labels:
...@@ -119,6 +122,12 @@ spec: ...@@ -119,6 +122,12 @@ spec:
{{- end }} {{- end }}
{{- if .Values.daemonset.tolerations }} {{- if .Values.daemonset.tolerations }}
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 }} {{ toYaml .Values.daemonset.tolerations | indent 8 }}
{{- end }} {{- end }}
{{- if .Values.daemonset.affinity }} {{- if .Values.daemonset.affinity }}
......
{{- if .Values.deployment.enabled }} {{- if .Values.deployment.enabled }}
{{- if (or (.Values.datadog.apiKeyExistingSecret) (.Values.datadog.apiKey)) }} {{- if (or (.Values.datadog.apiKeyExistingSecret) (.Values.datadog.apiKey)) }}
apiVersion: extensions/v1beta1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: {{ template "datadog.fullname" . }} name: {{ template "datadog.fullname" . }}
...@@ -10,6 +10,10 @@ metadata: ...@@ -10,6 +10,10 @@ metadata:
release: {{ .Release.Name | quote }} release: {{ .Release.Name | quote }}
heritage: {{ .Release.Service | quote }} heritage: {{ .Release.Service | quote }}
spec: spec:
selector:
matchLabels:
app: {{ template "datadog.fullname" . }}
type: deployment
replicas: {{ .Values.deployment.replicas }} replicas: {{ .Values.deployment.replicas }}
template: template:
metadata: metadata:
......
...@@ -11,7 +11,8 @@ image: ...@@ -11,7 +11,8 @@ image:
## Define the repository to use: ## Define the repository to use:
## use "datadog/agent" for Datadog Agent 6 ## use "datadog/agent" for Datadog Agent 6
## use "datadog/dogstatsd" for Standalone Datadog Agent DogStatsD6 ## use "datadog/dogstatsd" for Standalone Datadog Agent DogStatsD6
repository: datadog/agent # repository: datadog/agent
repository: ranchercharts/datadog-agent
## @param tag - string - required ## @param tag - string - required
...@@ -193,7 +194,7 @@ datadog: ...@@ -193,7 +194,7 @@ datadog:
## Note: /etc/passwd is automatically mounted to allow username resolution. ## Note: /etc/passwd is automatically mounted to allow username resolution.
## ref: https://docs.datadoghq.com/graphing/infrastructure/process/#kubernetes-daemonset ## ref: https://docs.datadoghq.com/graphing/infrastructure/process/#kubernetes-daemonset
# #
# processAentEnabled: false # processAgentEnabled: false
## @param env - list of object - optional ## @param env - list of object - optional
## The dd-agent supports many environment variables ## The dd-agent supports many environment variables
...@@ -294,7 +295,8 @@ clusterAgent: ...@@ -294,7 +295,8 @@ clusterAgent:
containerName: cluster-agent containerName: cluster-agent
image: image:
repository: datadog/cluster-agent # repository: datadog/cluster-agent
repository: ranchercharts/datadog-cluster-agent
tag: 1.3.2 tag: 1.3.2
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
...@@ -394,6 +396,9 @@ kubeStateMetrics: ...@@ -394,6 +396,9 @@ kubeStateMetrics:
enabled: true enabled: true
kube-state-metrics: kube-state-metrics:
image:
repository: ranchercharts/coreos-kube-state-metrics
tag: v1.7.2
rbac: rbac:
## @param created - boolean - required ## @param created - boolean - required
## If true, create & use RBAC resources ## 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