diff --git a/chart/.helmignore b/chart/.helmignore new file mode 100644 index 0000000..4379e2b --- /dev/null +++ b/chart/.helmignore @@ -0,0 +1,26 @@ +# 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 +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ +# OWNERS file for Kubernetes +OWNERS +# helm-docs templates +*.gotmpl diff --git a/chart/Chart.yaml b/chart/Chart.yaml new file mode 100644 index 0000000..d0f56a4 --- /dev/null +++ b/chart/Chart.yaml @@ -0,0 +1,30 @@ +apiVersion: v2 +name: smarter-device-manager +description: smarter-device-manager chart for SMARTER edge devices +home: https://gitlab.com/smarter-project/smarter-device-manager/helm +version: 0.0.2 +appVersion: v1.20.11 +kubeVersion: ">=1.16.0-0" +keywords: + - kubernetes + - device + - hardware +sources: + - https://gitlab.com/smarter-project/smarter-device-manager +#dependencies: +# - name: smarter-common +# repository: https://gitlab.com/smarter-project/documentation +# version: 0.0.1 + +annotations: + artifacthub.io/changes: | + - Fix template + - Add annotations + artifacthub.io/license: Apache-2.0 + artifacthub.io/maintainers: | + - name: Alexandre Ferreira + email: alexandref75@gmail.com + artifacthub.io/prerelease: "false" + artifacthub.io/signKey: | + fingerprint: 82AD709FEC4ECA4C84B093889BDC9DE410CFC23B + url: https://keybase.io/alexandref75/pgp_keys.asc diff --git a/chart/README.md b/chart/README.md new file mode 100644 index 0000000..da05820 --- /dev/null +++ b/chart/README.md @@ -0,0 +1,8 @@ +# smarter-device-manager + +## TL;DR + +```console +helm install smarter-device-manager chart +``` + diff --git a/chart/templates/common.yaml b/chart/templates/common.yaml new file mode 100644 index 0000000..83b3c08 --- /dev/null +++ b/chart/templates/common.yaml @@ -0,0 +1,66 @@ +apiVersion: apps/v1 +kind: DaemonSet +metadata: + name: {{ .Values.application.appName }} + namespace: {{ .Values.application.namespace }} + labels: + name: {{ .Values.application.appName }} + role: agent +spec: + selector: + matchLabels: + name: {{ .Values.application.appName }} + updateStrategy: + type: RollingUpdate + template: + metadata: + labels: + name: {{ .Values.application.appName }} + annotations: + node.kubernetes.io/bootstrap-checkpoint: "true" + spec: + nodeSelector: + smarter-device-manager : enabled + tolerations: + - key: "smarter.type" + operator: "Equal" + value: "edge" + effect: "NoSchedule" + priorityClassName: "system-node-critical" + hostname: {{ .Values.application.appName }} + hostNetwork: true + dnsPolicy: ClusterFirstWithHostNet + containers: + - name: {{ .Values.application.appName }} + image: {{ .Values.image.repository }}:{{ default .Chart.AppVersion .Values.image.tag }} + imagePullPolicy: {{ .Values.pullPolicy }} + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: ["ALL"] + resources: + limits: + cpu: 100m + memory: 15Mi + requests: + cpu: 10m + memory: 15Mi + volumeMounts: + - name: device-plugin + mountPath: /var/lib/kubelet/device-plugins + - name: dev-dir + mountPath: /dev + - name: sys-dir + mountPath: /sys + volumes: + - name: device-plugin + hostPath: + path: /var/lib/kubelet/device-plugins + - name: dev-dir + hostPath: + path: /dev + - name: sys-dir + hostPath: + path: /sys + terminationGracePeriodSeconds: 30 + diff --git a/chart/values.yaml b/chart/values.yaml new file mode 100644 index 0000000..034ce39 --- /dev/null +++ b/chart/values.yaml @@ -0,0 +1,12 @@ +# + +application: + namespace: smarter + appName: smarter-device-manager + +image: + repository: registry.gitlab.com/arm-research/smarter/smarter-device-manager + #repository: registry.gitlab.com/smarter-project/smarter-device-manager + # @default -- chart.appVersion + tag: "" + pullPolicy: IfNotPresent