Skip to content

Commit

Permalink
[stable/datadog] Make metricsProvider service port configurable (helm…
Browse files Browse the repository at this point in the history
…#20279)

* [stable/datadog] Make metricsProvider service port configurable via values

Signed-off-by: Ivan Ilichev <ivan.ilichev@datadoghq.com>

* Update stable/datadog/ci/cluster-agent-metrics-server-service-port-values.yaml

Co-Authored-By: Cedric Lamoriniere <cedric.lamoriniere@datadoghq.com>
Signed-off-by: Ivan Ilichev <ivan.ilichev@datadoghq.com>

* Fix lint error - too many blank lines

Signed-off-by: Ivan Ilichev <ivan.ilichev@datadoghq.com>

* Fix liveness and readiness probe

Signed-off-by: Ivan Ilichev <ivan.ilichev@datadoghq.com>

Co-authored-by: Cedric Lamoriniere <cedric.lamoriniere@datadoghq.com>
  • Loading branch information
2 people authored and k8s-ci-robot committed Jan 22, 2020
1 parent bd0cd0a commit 9292d70
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 5 deletions.
2 changes: 1 addition & 1 deletion stable/datadog/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: datadog
version: 1.39.3
version: 1.39.4
appVersion: "7"
description: DataDog Agent
keywords:
Expand Down
1 change: 1 addition & 0 deletions stable/datadog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ helm install --name <RELEASE_NAME> \
| `clusterAgent.image.pullSecrets` | Image pull secrets | `nil` |
| `clusterAgent.metricsProvider.enabled` | Enable Datadog metrics as a source for HPA scaling | `false` |
| `clusterAgent.metricsProvider.service.type` | The type of service to use for the clusterAgent metrics server | `ClusterIP` |
| `clusterAgent.metricsProvider.service.port` | The port for service to use for the clusterAgent metrics server | `443` . |
| `clusterAgent.clusterChecks.enabled` | Enable Cluster Checks on both the Cluster Agent and the Agent daemonset | `false` |
| `clusterAgent.confd` | Additional check configurations (static and Autodiscovery) | `nil` |
| `clusterAgent.podAnnotations` | Annotations to add to the Cluster Agent Pod(s) | `nil` |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
clusterAgent:
enabled: true

metricsProvider:
enabled: true

service:
port: 4443
2 changes: 1 addition & 1 deletion stable/datadog/templates/agent-services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ spec:
selector:
app: {{ template "datadog.fullname" . }}-cluster-agent
ports:
- port: 443
- port: {{ .Values.clusterAgent.metricsProvider.service.port }}
name: metricsapi
protocol: TCP
{{ end }}
8 changes: 5 additions & 3 deletions stable/datadog/templates/cluster-agent-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ spec:
name: agentport
protocol: TCP
{{- if .Values.clusterAgent.metricsProvider.enabled }}
- containerPort: 443
- containerPort: {{ .Values.clusterAgent.metricsProvider.service.port }}
name: metricsapi
protocol: TCP
{{- end }}
Expand All @@ -91,6 +91,8 @@ spec:
secretKeyRef:
name: {{ template "datadog.appKeySecretName" . }}
key: app-key
- name: DD_EXTERNAL_METRICS_PROVIDER_PORT
value: {{ .Values.clusterAgent.metricsProvider.service.port | quote }}
{{- end }}
{{- if .Values.clusterAgent.clusterChecks.enabled }}
- name: DD_CLUSTER_CHECKS_ENABLED
Expand Down Expand Up @@ -150,7 +152,7 @@ spec:
{{- else if .Values.clusterAgent.metricsProvider.enabled }}
livenessProbe:
httpGet:
port: 443
port: {{ .Values.clusterAgent.metricsProvider.service.port }}
path: /healthz
scheme: HTTPS
{{- end }}
Expand All @@ -160,7 +162,7 @@ spec:
{{- else if .Values.clusterAgent.metricsProvider.enabled}}
readinessProbe:
httpGet:
port: 443
port: {{ .Values.clusterAgent.metricsProvider.service.port }}
path: /healthz
scheme: HTTPS
{{- end }}
Expand Down
3 changes: 3 additions & 0 deletions stable/datadog/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,9 @@ clusterAgent:
##
#
type: ClusterIP
## @param port - int - optional
##
port: 443

## @param clusterChecks - object - required
## Enable the Cluster Checks feature on both the cluster-agents and the daemonset
Expand Down

0 comments on commit 9292d70

Please sign in to comment.