Helm chart for network-diag-app

Change-Id: I6bec9210ccb424cc940fb67c6091e4c545e267ad
diff --git a/network-diag-app/Chart.yaml b/network-diag-app/Chart.yaml
new file mode 100644
index 0000000..85bbf44
--- /dev/null
+++ b/network-diag-app/Chart.yaml
@@ -0,0 +1,8 @@
+# SPDX-FileCopyrightText: 2022-present Intel Corporation
+#
+# SPDX-License-Identifier: Apache-2.0
+
+apiVersion: v2
+appVersion: 0.0.4-dev
+name: network-diag-app
+version: 0.1.0
diff --git a/network-diag-app/templates/_helpers.tpl b/network-diag-app/templates/_helpers.tpl
new file mode 100644
index 0000000..c168c76
--- /dev/null
+++ b/network-diag-app/templates/_helpers.tpl
@@ -0,0 +1,59 @@
+{{- /*
+
+# Copyright 2022-present Intel Corporation
+#
+# SPDX-License-Identifier: Apache-2.0
+
+*/ -}}
+
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "network-test.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 "network-test.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 "network-test.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
+{{- end }}
+
+{{/*
+Common labels
+*/}}
+{{- define "network-test.labels" -}}
+helm.sh/chart: {{ include "network-test.chart" . }}
+{{ include "network-test.selectorLabels" . }}
+{{- if .Chart.AppVersion }}
+app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
+{{- end }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+{{- end }}
+
+{{/*
+Selector labels
+*/}}
+{{- define "network-test.selectorLabels" -}}
+app.kubernetes.io/name: {{ include "network-test.name" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+{{- end }}
diff --git a/network-diag-app/templates/deployment.yaml b/network-diag-app/templates/deployment.yaml
new file mode 100644
index 0000000..a2ea1cd
--- /dev/null
+++ b/network-diag-app/templates/deployment.yaml
@@ -0,0 +1,55 @@
+{{/*
+# Copyright 2022-present Intel Corporation
+#
+# SPDX-License-Identifier: Apache-2.0
+*/}}
+
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: {{ include "network-test.fullname" . }}
+  labels:
+    {{- include "network-test.labels" . | nindent 4 }}
+spec:
+  selector:
+    matchLabels:
+      {{- include "network-test.selectorLabels" . | nindent 6 }}
+  template:
+    metadata:
+      {{- with .Values.podAnnotations }}
+      annotations:
+        {{- toYaml . | nindent 8 }}
+      {{- end }}
+      labels:
+        {{- include "network-test.selectorLabels" . | nindent 8 }}
+    spec:
+      {{- with .Values.imagePullSecrets }}
+      imagePullSecrets:
+        {{- toYaml . | nindent 8 }}
+      {{- end }}
+      securityContext:
+        {{- toYaml .Values.podSecurityContext | nindent 8 }}
+      containers:
+        - name: {{ .Chart.Name }}
+          securityContext:
+            {{- toYaml .Values.securityContext | nindent 12 }}
+          image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
+          imagePullPolicy: {{ .Values.image.pullPolicy }}
+          ports:
+            - name: public
+              containerPort: {{ .Values.service.port }}
+              protocol: TCP
+          resources:
+            {{- toYaml .Values.resources | nindent 12 }}
+      {{- with .Values.nodeSelector }}
+      nodeSelector:
+        {{- toYaml . | nindent 8 }}
+      {{- end }}
+      {{- with .Values.affinity }}
+      affinity:
+        {{- toYaml . | nindent 8 }}
+      {{- end }}
+      {{- with .Values.tolerations }}
+      tolerations:
+        {{- toYaml . | nindent 8 }}
+      {{- end }}
diff --git a/network-diag-app/templates/service.yaml b/network-diag-app/templates/service.yaml
new file mode 100644
index 0000000..76d5255
--- /dev/null
+++ b/network-diag-app/templates/service.yaml
@@ -0,0 +1,20 @@
+{{/*
+# Copyright 2022-present Intel Corporation
+#
+# SPDX-License-Identifier: Apache-2.0
+*/}}
+
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "network-test.fullname" . }}
+  labels:
+    {{- include "network-test.labels" . | nindent 4 }}
+spec:
+  type: {{ .Values.service.type }}
+  ports:
+    - port: {{ .Values.service.port }}
+      protocol: TCP
+      name: http
+  selector:
+    {{- include "network-test.selectorLabels" . | nindent 4 }}
diff --git a/network-diag-app/values.yaml b/network-diag-app/values.yaml
new file mode 100644
index 0000000..d137810
--- /dev/null
+++ b/network-diag-app/values.yaml
@@ -0,0 +1,13 @@
+# Copyright 2022-present Intel Corporation
+#
+# SPDX-License-Identifier: Apache-2.0
+
+image:
+  repository: registry.aetherproject.org/aether-apps/network-diag-app
+  pullPolicy: Always
+  tag: master
+
+service:
+  name: network-diag-app
+  type: ClusterIP
+  port: 3333