Skip to content

Commit 4f4a83a

Browse files
committed
add datadog-csi-driver helm chart
1 parent 6507937 commit 4f4a83a

File tree

8 files changed

+248
-0
lines changed

8 files changed

+248
-0
lines changed

charts/datadog-csi-driver/.helmignore

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/
+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Changelog
2+
3+
## 0.1.0
4+
5+
* Initial version

charts/datadog-csi-driver/Chart.yaml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
apiVersion: v1
2+
name: datadog-csi-driver
3+
description: Datadog CSI Driver helm chart
4+
5+
# A chart can be either an 'application' or a 'library' chart.
6+
#
7+
# Application charts are a collection of templates that can be packaged into versioned archives
8+
# to be deployed.
9+
#
10+
# Library charts provide useful utilities or functions for the chart developer. They're included as
11+
# a dependency of application charts to inject those utilities and functions into the rendering
12+
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
13+
type: application
14+
15+
# This is the chart version. This version number should be incremented each time you make changes
16+
# to the chart and its templates, including the app version.
17+
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18+
version: 0.1.0
19+
20+
# This is the version number of the application being deployed. This version number should be
21+
# incremented each time you make changes to the application. Versions are not expected to
22+
# follow Semantic Versioning. They should reflect the version the application is using.
23+
# It is recommended to use it with quotes.
24+
appVersion: "0.1.0"

charts/datadog-csi-driver/README.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# datadog-csi-driver
2+
3+
![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.0](https://img.shields.io/badge/AppVersion-0.1.0-informational?style=flat-square)
4+
5+
Datadog CSI Driver helm chart
6+
7+
## Values
8+
9+
| Key | Type | Default | Description |
10+
|-----|------|---------|-------------|
11+
| fullnameOverride | string | `""` | |
12+
| image.pullPolicy | string | `"IfNotPresent"` | CSI driver image pullPolicy |
13+
| image.pullSecrets | list | `[]` | CSI driver repository pullSecret (ex: specify docker registry credentials) |
14+
| image.repository | string | `nil` | Override default registry + image.name for CSI driver |
15+
| image.tag | string | `"latest"` | CSI driver image tag to use |
16+
| nameOverride | string | `""` | |
17+
18+
----------------------------------------------
19+
Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
{{/*
2+
Expand the name of the chart.
3+
*/}}
4+
{{- define "datadog-csi-driver.name" -}}
5+
{{- default .Chart.Name .Values.nameOverride | trunc 32 | 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-csi-driver.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+
Generate the DaemonSet name by appending "-node-server" to the name and truncating to 63 chars.
28+
*/}}
29+
{{- define "datadog-csi-driver.daemonsetName" -}}
30+
{{- printf "%s-node-server" (include "datadog-csi-driver.name" .) | trunc 63 | trimSuffix "-" -}}
31+
{{- end }}
32+
33+
34+
{{/*
35+
Create chart name and version as used by the chart label.
36+
*/}}
37+
{{- define "datadog-csi-driver.chart" -}}
38+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
39+
{{- end }}
40+
41+
{{/*
42+
Common labels
43+
*/}}
44+
{{- define "datadog-csi-driver.labels" -}}
45+
helm.sh/chart: {{ include "datadog-csi-driver.chart" . }}
46+
{{ include "datadog-csi-driver.selectorLabels" . }}
47+
{{- if .Chart.AppVersion }}
48+
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
49+
{{- end }}
50+
app.kubernetes.io/managed-by: {{ .Release.Service }}
51+
{{- end }}
52+
53+
{{/*
54+
Selector labels
55+
*/}}
56+
{{- define "datadog-csi-driver.selectorLabels" -}}
57+
app.kubernetes.io/name: {{ include "datadog-csi-driver.name" . }}
58+
app.kubernetes.io/instance: {{ .Release.Name }}
59+
{{- end }}
60+
61+
{{/*
62+
Create the name of the service account to use
63+
*/}}
64+
{{- define "datadog-csi-driver.serviceAccountName" -}}
65+
{{- if .Values.serviceAccount.create }}
66+
{{- default (include "datadog-csi-driver.fullname" .) .Values.serviceAccount.name }}
67+
{{- else }}
68+
{{- default "default" .Values.serviceAccount.name }}
69+
{{- end }}
70+
{{- end }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: storage.k8s.io/v1
2+
kind: CSIDriver
3+
metadata:
4+
name: k8s.csi.datadoghq.com
5+
spec:
6+
volumeLifecycleModes:
7+
- Persistent
8+
- Ephemeral
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
apiVersion: apps/v1
2+
kind: DaemonSet
3+
metadata:
4+
name: {{ include "datadog-csi-driver.daemonsetName" . }}
5+
namespace: {{ .Release.Namespace }}
6+
spec:
7+
selector:
8+
matchLabels:
9+
app: {{ include "datadog-csi-driver.daemonsetName" . }}
10+
template:
11+
metadata:
12+
labels:
13+
app: {{ include "datadog-csi-driver.daemonsetName" . }}
14+
admission.datadoghq.com/enabled: "false"
15+
spec:
16+
hostNetwork: true
17+
containers:
18+
- name: csi-node-driver
19+
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
20+
imagePullPolicy: {{ .Values.image.pullPolicy }}
21+
{{- if .Values.image.pullSecrets }}
22+
imagePullSecrets:
23+
{{ toYaml .Values.image.pullSecrets | indent 8 }}
24+
{{- end }}
25+
securityContext:
26+
privileged: true
27+
ports:
28+
- containerPort: 5000
29+
protocol: TCP
30+
args:
31+
- /dd-csi-driver
32+
volumeMounts:
33+
- name: plugin-dir
34+
mountPath: /csi
35+
- mountPath: /var/run/datadog
36+
name: dsdandapmsocket
37+
- mountPath: /var/lib/kubelet/pods
38+
mountPropagation: Bidirectional
39+
name: mountpoint-dir
40+
env:
41+
- name: NODE_ID
42+
valueFrom:
43+
fieldRef:
44+
fieldPath: spec.nodeName
45+
- name: csi-node-driver-registrar
46+
image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.0.1
47+
args:
48+
- "--csi-address=$(ADDRESS)"
49+
- "--kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)"
50+
env:
51+
- name: ADDRESS
52+
value: /csi/csi.sock
53+
- name: DRIVER_REG_SOCK_PATH
54+
value: /var/lib/kubelet/plugins/datadog.csi/driver/csi.sock
55+
volumeMounts:
56+
- name: plugin-dir
57+
mountPath: /csi # Match this to ADDRESS
58+
- name: registration-dir
59+
mountPath: /registration # This is where the registrar writes the registration information
60+
volumes:
61+
- name: plugin-dir
62+
hostPath:
63+
path: /var/lib/kubelet/plugins/datadog.csi/driver
64+
type: DirectoryOrCreate
65+
- name: registration-dir
66+
hostPath:
67+
path: /var/lib/kubelet/plugins_registry
68+
type: Directory
69+
- hostPath:
70+
path: /var/lib/kubelet/pods
71+
type: DirectoryOrCreate
72+
name: mountpoint-dir
73+
- hostPath:
74+
path: /var/run/datadog
75+
type: DirectoryOrCreate
76+
name: dsdandapmsocket

charts/datadog-csi-driver/values.yaml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Default values for datadog-csi-driver.
2+
# This is a YAML-formatted file.
3+
# Declare variables to be passed into your templates.
4+
5+
nameOverride: ""
6+
fullnameOverride: ""
7+
8+
## Define the Datadog CSI Driver image to work with
9+
image:
10+
# image.tag -- CSI driver image tag to use
11+
tag: latest # TODO: change to a static stable version
12+
13+
# image.repository -- Override default registry + image.name for CSI driver
14+
repository: # TODO: change to official repository when available
15+
16+
# image.pullPolicy -- CSI driver image pullPolicy
17+
pullPolicy: IfNotPresent
18+
19+
# image.pullSecrets -- CSI driver repository pullSecret (ex: specify docker registry credentials)
20+
21+
## See https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod
22+
pullSecrets: []
23+
# - name: "<REG_SECRET>"

0 commit comments

Comments
 (0)