-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
2,696 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Go Test | ||
on: | ||
push: | ||
paths: | ||
- 'test/datadog/**' | ||
- 'charts/datadog/**' | ||
pull_request: | ||
paths: | ||
- 'test/datadog/**' | ||
- 'charts/datadog/**' | ||
env: | ||
GO111MODULE: "on" | ||
PROJECTNAME: "helm-charts" | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.20 | ||
id: go | ||
- name: Set up Helm | ||
uses: azure/setup-helm@v3.5 | ||
with: | ||
version: v3.10.1 | ||
- name: Add Datadog Helm repo | ||
run: | | ||
helm repo add Promotheus https://prometheus-community.github.io/helm-charts | ||
helm repo add datadog https://helm.datadoghq.com | ||
helm repo update | ||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v1 | ||
- name: run Go tests | ||
run: | | ||
helm dependency build ./charts/datadog | ||
make unit-test | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
180 changes: 180 additions & 0 deletions
180
test/datadog/baseline/agent-clusterchecks-deployment_default.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,180 @@ | ||
--- | ||
# Source: datadog/templates/agent-clusterchecks-deployment.yaml | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: datadog-clusterchecks | ||
namespace: datadog-agent | ||
labels: | ||
helm.sh/chart: 'datadog-3.40.0' | ||
app.kubernetes.io/name: "datadog" | ||
app.kubernetes.io/instance: "datadog" | ||
app.kubernetes.io/managed-by: Helm | ||
app.kubernetes.io/version: "7" | ||
app.kubernetes.io/component: clusterchecks-agent | ||
|
||
spec: | ||
replicas: 2 | ||
revisionHistoryLimit: 10 | ||
strategy: | ||
rollingUpdate: | ||
maxSurge: 1 | ||
maxUnavailable: 0 | ||
type: RollingUpdate | ||
selector: | ||
matchLabels: | ||
app: datadog-clusterchecks | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: "datadog" | ||
app.kubernetes.io/instance: "datadog" | ||
app.kubernetes.io/managed-by: Helm | ||
app.kubernetes.io/component: clusterchecks-agent | ||
app: datadog-clusterchecks | ||
|
||
name: datadog-clusterchecks | ||
annotations: | ||
checksum/clusteragent_token: bf153e7c2829cb9288258a823fbe4ee03a9674774143653ba1e00d3236bab247 | ||
checksum/install_info: 4c6adc06986cb86f043bbf55310f5478d1ec9f0815ffeec050977d9f4546a28a | ||
spec: | ||
serviceAccountName: datadog-cluster-checks | ||
automountServiceAccountToken: true | ||
imagePullSecrets: | ||
[] | ||
initContainers: | ||
- name: init-volume | ||
image: "gcr.io/datadoghq/agent:7.48.0" | ||
imagePullPolicy: IfNotPresent | ||
command: ["bash", "-c"] | ||
args: | ||
- cp -r /etc/datadog-agent /opt | ||
volumeMounts: | ||
- name: config | ||
mountPath: /opt/datadog-agent | ||
readOnly: false # Need RW for writing agent config files | ||
resources: | ||
{} | ||
- name: init-config | ||
image: "gcr.io/datadoghq/agent:7.48.0" | ||
imagePullPolicy: IfNotPresent | ||
command: ["bash", "-c"] | ||
args: | ||
- for script in $(find /etc/cont-init.d/ -type f -name '*.sh' | sort) ; do bash $script ; done | ||
volumeMounts: | ||
- name: config | ||
mountPath: /etc/datadog-agent | ||
readOnly: false # Need RW for writing datadog.yaml config file | ||
resources: | ||
{} | ||
containers: | ||
- name: agent | ||
image: "gcr.io/datadoghq/agent:7.48.0" | ||
command: ["bash", "-c"] | ||
args: | ||
- rm -rf /etc/datadog-agent/conf.d && touch /etc/datadog-agent/datadog.yaml && exec agent run | ||
imagePullPolicy: IfNotPresent | ||
env: | ||
- name: DD_API_KEY | ||
valueFrom: | ||
secretKeyRef: | ||
name: "datadog-secret" | ||
key: api-key | ||
- name: KUBERNETES | ||
value: "yes" | ||
- name: DD_LOG_LEVEL | ||
value: "INFO" | ||
- name: DD_EXTRA_CONFIG_PROVIDERS | ||
value: "clusterchecks" | ||
- name: DD_HEALTH_PORT | ||
value: "5557" | ||
# Cluster checks (cluster-agent communication) | ||
- name: DD_CLUSTER_AGENT_ENABLED | ||
value: "true" | ||
- name: DD_CLUSTER_AGENT_KUBERNETES_SERVICE_NAME | ||
value: datadog-cluster-agent | ||
- name: DD_CLUSTER_AGENT_AUTH_TOKEN | ||
valueFrom: | ||
secretKeyRef: | ||
name: datadog-cluster-agent | ||
key: token | ||
# Safely run alongside the daemonset | ||
- name: DD_ENABLE_METADATA_COLLECTION | ||
value: "false" | ||
# Expose CLC stats | ||
- name: DD_CLC_RUNNER_ENABLED | ||
value: "true" | ||
- name: DD_CLC_RUNNER_HOST | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: status.podIP | ||
- name: DD_CLC_RUNNER_ID | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.name | ||
# Remove unused features | ||
- name: DD_USE_DOGSTATSD | ||
value: "false" | ||
- name: DD_PROCESS_AGENT_ENABLED | ||
value: "false" | ||
- name: DD_LOGS_ENABLED | ||
value: "false" | ||
- name: DD_APM_ENABLED | ||
value: "false" | ||
- name: DD_REMOTE_CONFIGURATION_ENABLED | ||
value: "false" | ||
- name: DD_HOSTNAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: spec.nodeName | ||
|
||
|
||
resources: | ||
{} | ||
volumeMounts: | ||
- name: installinfo | ||
subPath: install_info | ||
mountPath: /etc/datadog-agent/install_info | ||
readOnly: true | ||
- name: config | ||
mountPath: /etc/datadog-agent | ||
readOnly: false # Need RW for config path | ||
livenessProbe: | ||
failureThreshold: 6 | ||
httpGet: | ||
path: /live | ||
port: 5557 | ||
scheme: HTTP | ||
initialDelaySeconds: 15 | ||
periodSeconds: 15 | ||
successThreshold: 1 | ||
timeoutSeconds: 5 | ||
readinessProbe: | ||
failureThreshold: 6 | ||
httpGet: | ||
path: /ready | ||
port: 5557 | ||
scheme: HTTP | ||
initialDelaySeconds: 15 | ||
periodSeconds: 15 | ||
successThreshold: 1 | ||
timeoutSeconds: 5 | ||
volumes: | ||
- name: installinfo | ||
configMap: | ||
name: datadog-installinfo | ||
- name: config | ||
emptyDir: {} | ||
affinity: | ||
# Prefer scheduling the runners on different nodes if possible | ||
# for better checks stability in case of node failure. | ||
podAntiAffinity: | ||
preferredDuringSchedulingIgnoredDuringExecution: | ||
- weight: 50 | ||
podAffinityTerm: | ||
labelSelector: | ||
matchLabels: | ||
app: datadog-clusterchecks | ||
topologyKey: kubernetes.io/hostname | ||
nodeSelector: | ||
kubernetes.io/os: linux |
Oops, something went wrong.