aboutsummaryrefslogtreecommitdiffstats
path: root/kud/deployment_infra/helm/qat-device-plugin
diff options
context:
space:
mode:
Diffstat (limited to 'kud/deployment_infra/helm/qat-device-plugin')
-rw-r--r--kud/deployment_infra/helm/qat-device-plugin/.helmignore23
-rw-r--r--kud/deployment_infra/helm/qat-device-plugin/Chart.yaml25
-rw-r--r--kud/deployment_infra/helm/qat-device-plugin/templates/_helpers.tpl52
-rw-r--r--kud/deployment_infra/helm/qat-device-plugin/templates/config.yaml8
-rw-r--r--kud/deployment_infra/helm/qat-device-plugin/templates/daemonset.yaml60
-rw-r--r--kud/deployment_infra/helm/qat-device-plugin/templates/drivers/daemonset.yaml70
-rw-r--r--kud/deployment_infra/helm/qat-device-plugin/values.yaml49
7 files changed, 287 insertions, 0 deletions
diff --git a/kud/deployment_infra/helm/qat-device-plugin/.helmignore b/kud/deployment_infra/helm/qat-device-plugin/.helmignore
new file mode 100644
index 00000000..0e8a0eb3
--- /dev/null
+++ b/kud/deployment_infra/helm/qat-device-plugin/.helmignore
@@ -0,0 +1,23 @@
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*.orig
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
+.vscode/
diff --git a/kud/deployment_infra/helm/qat-device-plugin/Chart.yaml b/kud/deployment_infra/helm/qat-device-plugin/Chart.yaml
new file mode 100644
index 00000000..1697abb0
--- /dev/null
+++ b/kud/deployment_infra/helm/qat-device-plugin/Chart.yaml
@@ -0,0 +1,25 @@
+# Copyright 2021 Intel Corporation, Inc
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+apiVersion: v2
+appVersion: 0.19.0-kerneldrv
+description: |
+ A device plugin that provides support for Intel QuickAssist
+ Technology (QAT) devices under Kubernetes.
+home: https://github.com/intel/intel-device-plugins-for-kubernetes
+name: qat-device-plugin
+sources:
+ - https://github.com/intel/intel-device-plugins-for-kubernetes
+type: application
+version: 0.1.0
diff --git a/kud/deployment_infra/helm/qat-device-plugin/templates/_helpers.tpl b/kud/deployment_infra/helm/qat-device-plugin/templates/_helpers.tpl
new file mode 100644
index 00000000..77889d5d
--- /dev/null
+++ b/kud/deployment_infra/helm/qat-device-plugin/templates/_helpers.tpl
@@ -0,0 +1,52 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "qat-device-plugin.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "qat-device-plugin.fullname" -}}
+{{- if .Values.fullnameOverride -}}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- if contains $name .Release.Name -}}
+{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "qat-device-plugin.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Common labels
+*/}}
+{{- define "qat-device-plugin.labels" -}}
+helm.sh/chart: {{ include "qat-device-plugin.chart" . }}
+{{ include "qat-device-plugin.selectorLabels" . }}
+{{- if .Chart.AppVersion }}
+app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
+{{- end }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+{{- end -}}
+
+{{/*
+Selector labels
+*/}}
+{{- define "qat-device-plugin.selectorLabels" -}}
+app.kubernetes.io/name: {{ include "qat-device-plugin.name" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+{{- end -}}
diff --git a/kud/deployment_infra/helm/qat-device-plugin/templates/config.yaml b/kud/deployment_infra/helm/qat-device-plugin/templates/config.yaml
new file mode 100644
index 00000000..24ffaa4a
--- /dev/null
+++ b/kud/deployment_infra/helm/qat-device-plugin/templates/config.yaml
@@ -0,0 +1,8 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ .Values.config.name }}
+ labels:
+ {{- include "qat-device-plugin.labels" . | nindent 4 }}
+data:
+ VERBOSITY: {{ .Values.config.logLevel | quote }}
diff --git a/kud/deployment_infra/helm/qat-device-plugin/templates/daemonset.yaml b/kud/deployment_infra/helm/qat-device-plugin/templates/daemonset.yaml
new file mode 100644
index 00000000..c94ff330
--- /dev/null
+++ b/kud/deployment_infra/helm/qat-device-plugin/templates/daemonset.yaml
@@ -0,0 +1,60 @@
+apiVersion: apps/v1
+kind: DaemonSet
+metadata:
+ name: {{ include "qat-device-plugin.fullname" . }}
+ labels:
+ {{- include "qat-device-plugin.labels" . | nindent 4 }}
+spec:
+ selector:
+ matchLabels:
+ {{- include "qat-device-plugin.selectorLabels" . | nindent 6 }}
+ template:
+ metadata:
+ labels:
+ {{- include "qat-device-plugin.selectorLabels" . | nindent 8 }}
+ spec:
+ {{- with .Values.imagePullSecrets }}
+ imagePullSecrets:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.nodeSelector }}
+ nodeSelector:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.tolerations }}
+ tolerations:
+ {{- toYaml . | nindent 6 }}
+ {{- end }}
+ containers:
+ - name: intel-qat-kernel-plugin
+ image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
+ imagePullPolicy: {{ .Values.image.pullPolicy }}
+ resources:
+ {{- toYaml .Values.resources | nindent 10 }}
+ securityContext:
+ {{- toYaml .Values.securityContext | nindent 10 }}
+ env:
+ - name: VERBOSITY
+ valueFrom:
+ configMapKeyRef:
+ name: {{ .Values.config.name }}
+ key: VERBOSITY
+ args: ["-mode", "kernel", "-v", "$(VERBOSITY)"]
+ volumeMounts:
+ - name: devfs
+ mountPath: /dev
+ - name: etcdir
+ mountPath: /etc
+ readOnly: true
+ - name: kubeletsockets
+ mountPath: /var/lib/kubelet/device-plugins
+ volumes:
+ - name: etcdir
+ hostPath:
+ path: /etc
+ - name: kubeletsockets
+ hostPath:
+ path: /var/lib/kubelet/device-plugins
+ - name: devfs
+ hostPath:
+ path: /dev
diff --git a/kud/deployment_infra/helm/qat-device-plugin/templates/drivers/daemonset.yaml b/kud/deployment_infra/helm/qat-device-plugin/templates/drivers/daemonset.yaml
new file mode 100644
index 00000000..7ba04047
--- /dev/null
+++ b/kud/deployment_infra/helm/qat-device-plugin/templates/drivers/daemonset.yaml
@@ -0,0 +1,70 @@
+apiVersion: apps/v1
+kind: DaemonSet
+metadata:
+ name: {{ include "qat-device-plugin.fullname" . }}-qat-driver-installer
+ labels:
+ {{- include "qat-device-plugin.labels" . | nindent 4 }}
+ role: qat-driver-installer
+spec:
+ selector:
+ matchLabels:
+ {{- include "qat-device-plugin.selectorLabels" . | nindent 6 }}
+ role: qat-driver-installer
+ template:
+ metadata:
+ labels:
+ {{- include "qat-device-plugin.selectorLabels" . | nindent 8 }}
+ role: qat-driver-installer
+ spec:
+ hostPID: true
+ {{- with .Values.qatDriver.imagePullSecrets }}
+ imagePullSecrets:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ securityContext:
+ {{- toYaml .Values.qatDriver.podSecurityContext | nindent 8 }}
+ initContainers:
+ - image: "{{ .Values.qatDriver.image.repository }}:{{ .Values.qatDriver.image.tag | default .Chart.AppVersion }}"
+ imagePullPolicy: {{ .Values.qatDriver.image.pullPolicy }}
+ name: qat-driver-installer
+ securityContext:
+ {{- toYaml .Values.qatDriver.securityContext | nindent 12 }}
+ resources:
+ {{- toYaml .Values.qatDriver.resources | nindent 12 }}
+ volumeMounts:
+ - name: qat-install-dir
+ mountPath: "/usr/local/qat"
+ - name: root-dir
+ mountPath: "/root"
+ - name: lib-modules-dir
+ mountPath: "/root/lib/modules"
+ - name: run-systemd-dir
+ mountPath: "/root/run/systemd/system"
+ containers:
+ - image: "gcr.io/google-containers/pause:3.2"
+ name: pause
+ volumes:
+ - name: qat-install-dir
+ hostPath:
+ path: "/opt/qat"
+ - name: root-dir
+ hostPath:
+ path: "/"
+ - name: lib-modules-dir
+ hostPath:
+ path: "/lib/modules"
+ - name: run-systemd-dir
+ hostPath:
+ path: "/run/systemd/system"
+ {{- with .Values.qatDriver.nodeSelector }}
+ nodeSelector:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.qatDriver.affinity }}
+ affinity:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.qatDriver.tolerations }}
+ tolerations:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
diff --git a/kud/deployment_infra/helm/qat-device-plugin/values.yaml b/kud/deployment_infra/helm/qat-device-plugin/values.yaml
new file mode 100644
index 00000000..459c36b1
--- /dev/null
+++ b/kud/deployment_infra/helm/qat-device-plugin/values.yaml
@@ -0,0 +1,49 @@
+config:
+ name: intel-qat-plugin-config
+
+ # logLevel sets the plugin's log level.
+ logLevel: 4
+
+imagePullSecrets: []
+
+image:
+ repository: integratedcloudnative/intel-qat-plugin
+ # Overrides the image tag whose default is the chart appVersion.
+ tag: ""
+
+nodeSelector:
+ feature.node.kubernetes.io/iommu-enabled: "true"
+ feature.node.kubernetes.io/custom-qat: "true"
+
+securityContext:
+ readOnlyRootFilesystem: true
+ privileged: true
+
+resources: {}
+
+affinity: {}
+
+tolerations: {}
+
+qatDriver:
+ image:
+ repository: integratedcloudnative/qat-driver-installer
+ pullPolicy: IfNotPresent
+ tag: latest
+ imagePullSecrets: []
+
+ podSecurityContext: {}
+ # fsGroup: 2000
+
+ securityContext:
+ privileged: true
+
+ nodeSelector:
+ feature.node.kubernetes.io/iommu-enabled: "true"
+ feature.node.kubernetes.io/custom-qat: "true"
+
+ resources: {}
+
+ affinity: {}
+
+ tolerations: {}