Skip to content

Commit 4169c9a

Browse files
Merge pull request #194 from superstreamlabs/qa
Qa
2 parents f775b39 + 608d4e0 commit 4169c9a

File tree

15 files changed

+797
-5
lines changed

15 files changed

+797
-5
lines changed

charts/superstream/Chart.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ annotations:
55
dataPlaneVersion: "1.1.938"
66
autoScalerVersion: "1.1.902"
77
artifacthub.io/changes: |-
8-
- kind: changed
9-
description: Bump Superstream-Data-Plane to 1.1.938
8+
- kind: added
9+
description: Add Datadog Agent
1010
name: superstream
1111
description: Superstream Official Helm chart
1212
home: https://superstream.ai
@@ -30,7 +30,7 @@ type: application
3030
# This is the chart version. This version number should be incremented each time you make changes
3131
# to the chart and its templates, including the app version.
3232
# Versions are expected to follow Semantic Versioning (https://semver.org/)
33-
version: 0.9.46
33+
version: 0.9.47
3434
# This is the version number of the application being deployed. This version number should be
3535
# incremented each time you make changes to the application. Versions are not expected to
3636
# follow Semantic Versioning. They should reflect the version the application is using.
@@ -42,3 +42,5 @@ dependencies:
4242
version: 1.2.10
4343
- name: telegraf
4444
version: 1.8.55
45+
- name: datadog
46+
version: 1.0.0
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
apiVersion: v2
2+
name: datadog
3+
version: 1.0.0
4+
appVersion: 7.71.1
5+
deprecated: false
6+
description: Datadog Agent for monitoring and APM
7+
keywords:
8+
- datadog
9+
- monitoring
10+
- apm
11+
- agent
12+
home: https://www.datadoghq.com/
13+
sources:
14+
- https://github.com/DataDog/datadog-agent
15+
maintainers:
16+
- name: Superstream Labs
17+
18+
icon: https://imgix.datadoghq.com/img/dd_logo_70x75.png
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
1. Get the application URL by running these commands:
2+
{{- if .Values.service.enabled }}
3+
{{- range $key, $value := .Values.service.ports }}
4+
export SERVICE_PORT={{ $value.port }}
5+
{{- end }}
6+
echo http://{{ .Release.Name }}.{{ .Release.Namespace }}.svc.cluster.local:$SERVICE_PORT
7+
{{- else }}
8+
echo "No service defined"
9+
{{- end }}
10+
11+
2. Check the status of your deployment:
12+
kubectl get pods -l app=datadog -n {{ .Release.Namespace }}
13+
14+
3. View logs:
15+
kubectl logs -l app=datadog -n {{ .Release.Namespace }}
16+
17+
4. Datadog Agent is now running and collecting metrics and traces.
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
{{/*
2+
Expand the name of the chart.
3+
*/}}
4+
{{- define "datadog.name" -}}
5+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
6+
{{- end }}
7+
8+
{{/*
9+
Create a default fully qualified app name.
10+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
11+
If release name contains chart name it will be used as a full name.
12+
*/}}
13+
{{- define "datadog.fullname" -}}
14+
{{- if .Values.fullnameOverride }}
15+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
16+
{{- else }}
17+
{{- $name := default .Chart.Name .Values.nameOverride }}
18+
{{- if contains $name .Release.Name }}
19+
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
20+
{{- else }}
21+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
22+
{{- end }}
23+
{{- end }}
24+
{{- end }}
25+
26+
{{/*
27+
Create chart name and version as used by the chart label.
28+
*/}}
29+
{{- define "datadog.chart" -}}
30+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
31+
{{- end }}
32+
33+
{{/*
34+
Common labels
35+
*/}}
36+
{{- define "datadog.labels" -}}
37+
helm.sh/chart: {{ include "datadog.chart" . }}
38+
{{ include "datadog.selectorLabels" . }}
39+
{{- if .Chart.AppVersion }}
40+
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
41+
{{- end }}
42+
app.kubernetes.io/managed-by: {{ .Release.Service }}
43+
{{- end }}
44+
45+
{{/*
46+
Selector labels
47+
*/}}
48+
{{- define "datadog.selectorLabels" -}}
49+
app.kubernetes.io/name: {{ include "datadog.name" . }}
50+
app.kubernetes.io/instance: {{ .Release.Name }}
51+
app.kubernetes.io/component: agent
52+
{{- end }}
53+
54+
{{/*
55+
Create the name of the service account to use
56+
*/}}
57+
{{- define "datadog.serviceAccountName" -}}
58+
{{- if .Values.serviceAccount.create }}
59+
{{- default (include "datadog.fullname" .) .Values.serviceAccount.name }}
60+
{{- else }}
61+
{{- default "default" .Values.serviceAccount.name }}
62+
{{- end }}
63+
{{- end }}
64+
65+
{{/*
66+
Create the name of the service to use
67+
*/}}
68+
{{- define "datadog.serviceName" -}}
69+
{{- include "datadog.fullname" . }}-agent
70+
{{- end }}
71+
72+
{{/*
73+
Create the name for cluster-scoped resources (ClusterRole, ClusterRoleBinding)
74+
This includes both release name and namespace to avoid conflicts when multiple releases are installed
75+
*/}}
76+
{{- define "datadog.clusterResourceName" -}}
77+
{{- if .Values.rbac.clusterResourceNameOverride }}
78+
{{- .Values.rbac.clusterResourceNameOverride | trunc 63 | trimSuffix "-" }}
79+
{{- else }}
80+
{{- $name := default .Chart.Name .Values.nameOverride }}
81+
{{- printf "%s-%s-%s" .Release.Namespace .Release.Name $name | trunc 63 | trimSuffix "-" }}
82+
{{- end }}
83+
{{- end }}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{{- if and .Values.enabled .Values.rbac.create .Values.rbac.clusterWide -}}
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: ClusterRole
4+
metadata:
5+
name: {{ include "datadog.clusterResourceName" . }}
6+
labels:
7+
{{- include "datadog.labels" . | nindent 4 }}
8+
rules:
9+
- apiGroups: [""]
10+
resources:
11+
- services
12+
- events
13+
- endpoints
14+
- pods
15+
- nodes
16+
- namespaces
17+
- componentstatuses
18+
verbs:
19+
- get
20+
- list
21+
- watch
22+
- nonResourceURLs:
23+
- "/version"
24+
- "/healthz"
25+
- "/metrics"
26+
verbs:
27+
- get
28+
- apiGroups: [""]
29+
resources:
30+
- nodes/metrics
31+
- nodes/spec
32+
- nodes/proxy
33+
- nodes/stats
34+
verbs:
35+
- get
36+
{{- end }}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{{- if and .Values.enabled .Values.rbac.create .Values.rbac.clusterWide -}}
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: ClusterRoleBinding
4+
metadata:
5+
name: {{ include "datadog.clusterResourceName" . }}
6+
labels:
7+
{{- include "datadog.labels" . | nindent 4 }}
8+
roleRef:
9+
apiGroup: rbac.authorization.k8s.io
10+
kind: ClusterRole
11+
name: {{ include "datadog.clusterResourceName" . }}
12+
subjects:
13+
- kind: ServiceAccount
14+
name: {{ include "datadog.serviceAccountName" . }}
15+
namespace: {{ .Release.Namespace }}
16+
{{- end }}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{{- if .Values.enabled -}}
2+
apiVersion: v1
3+
kind: ConfigMap
4+
metadata:
5+
name: {{ include "datadog.fullname" . }}-config
6+
namespace: {{ .Release.Namespace }}
7+
labels:
8+
{{- include "datadog.labels" . | nindent 4 }}
9+
data:
10+
kubelet.yaml: |
11+
init_config: {}
12+
instances:
13+
- cadvisor_port: 0
14+
metrics_endpoint: ""
15+
16+
datadog-agent-logs.yaml: |
17+
logs:
18+
- type: file
19+
path: /var/log/datadog/agent.log
20+
service: datadog-agent
21+
source: datadog-agent
22+
{{- end }}
23+

0 commit comments

Comments
 (0)