Helm Charts for Aiml-Dashboard and Aiml-Notebooks 64/9664/2
authorashishj1729 <jain.ashish@samsung.com>
Wed, 16 Nov 2022 08:19:03 +0000 (13:49 +0530)
committerAshish Jain <jain.ashish@samsung.com>
Wed, 16 Nov 2022 08:23:37 +0000 (08:23 +0000)
Issue-Id: AIMLFW-4

Signed-off-by: ashishj1729 <jain.ashish@samsung.com>
Change-Id: I25b494d96c2756aa594ff036ca02009c4cac2b98

helm/aiml-dashboard/Chart.yaml [new file with mode: 0644]
helm/aiml-dashboard/requirements.yaml [new file with mode: 0644]
helm/aiml-dashboard/templates/configmap.yaml [new file with mode: 0644]
helm/aiml-dashboard/templates/deployment.yaml [new file with mode: 0644]
helm/aiml-dashboard/templates/service.yaml [new file with mode: 0644]
helm/aiml-dashboard/values.yaml [new file with mode: 0644]
helm/aiml-notebook/Chart.yaml [new file with mode: 0644]
helm/aiml-notebook/requirements.yaml [new file with mode: 0644]
helm/aiml-notebook/templates/deployment.yaml [new file with mode: 0644]
helm/aiml-notebook/templates/service.yaml [new file with mode: 0644]
helm/aiml-notebook/values.yaml [new file with mode: 0644]

diff --git a/helm/aiml-dashboard/Chart.yaml b/helm/aiml-dashboard/Chart.yaml
new file mode 100644 (file)
index 0000000..d551fe2
--- /dev/null
@@ -0,0 +1,23 @@
+# ==================================================================================
+#
+#       Copyright (c) 2022 Samsung Electronics Co., Ltd. All Rights Reserved.
+#
+#   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: v1
+name: aiml-dashboard
+description: Helm chart for AIML Dashboard
+type: application
+version: 1.0.0
+appVersion: "1.0.0"
diff --git a/helm/aiml-dashboard/requirements.yaml b/helm/aiml-dashboard/requirements.yaml
new file mode 100644 (file)
index 0000000..9b38f1d
--- /dev/null
@@ -0,0 +1,21 @@
+# ==================================================================================
+#
+#       Copyright (c) 2022 Samsung Electronics Co., Ltd. All Rights Reserved.
+#
+#   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.
+#
+# ==================================================================================
+dependencies:
+  - name: aimlfw-common
+    version: 1.0.0
+    repository: "@local"
diff --git a/helm/aiml-dashboard/templates/configmap.yaml b/helm/aiml-dashboard/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..ed9bbb8
--- /dev/null
@@ -0,0 +1,29 @@
+# ==================================================================================
+#
+#       Copyright (c) 2022 Samsung Electronics Co., Ltd. All Rights Reserved.
+#
+#   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.
+#
+# ==================================================================================
+kind: ConfigMap
+apiVersion: v1
+metadata:
+  name: aiml-dashboard-configmap
+  namespace: {{ include "common.namespace.platform" . }}
+data:
+  # Configuration values can be set as key-value properties
+  REACT_APP_TM_HOST: {{ .Values.aimldashboard.host.tm_host }}
+  REACT_APP_TM_PORT: "{{ include "common.serviceport.aiml-dashboard.react-app-tm-port" .  }}"
+  REACT_APP_NOTEBOOK_HOST: {{ .Values.aimldashboard.host.notebook_host }}
+  REACT_APP_NOTEBOOK_PORT:  "{{ include "common.serviceport.aiml-dashboard.react-app-notebook-port" .  }}"
+  AIMLDASHBOARD_PORT: "{{ include "common.serviceport.aiml-dashboard.http" .  }}"  
diff --git a/helm/aiml-dashboard/templates/deployment.yaml b/helm/aiml-dashboard/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..11574c2
--- /dev/null
@@ -0,0 +1,61 @@
+# ==================================================================================
+#
+#       Copyright (c) 2022 Samsung Electronics Co., Ltd. All Rights Reserved.
+#
+#   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: apps/v1
+kind: Deployment
+metadata:
+  name: {{ include "aiml-dashboard.fullname" . }}
+  namespace: {{ include "common.namespace.platform" . }}
+  labels:
+    {{- include "aiml-dashboard.labels" . | nindent 4 }}
+spec:
+  selector:
+    matchLabels:
+      {{- include "aiml-dashboard.selectorLabels" . | nindent 6 }}
+  template:
+    metadata:
+      {{- with .Values.podAnnotations }}
+      annotations:
+        {{- toYaml . | nindent 8 }}
+      {{- end }}
+      labels:
+        {{- include "aiml-dashboard.selectorLabels" . | nindent 8 }}
+    spec:
+      {{- with .Values.imagePullSecrets }}
+      imagePullSecrets:
+        {{- toYaml . | nindent 8 }}
+      {{- end }}
+      
+      securityContext:
+        {{- toYaml .Values.podSecurityContext | nindent 8 }}
+      containers:
+        - name: {{ .Chart.Name }}
+          image: "{{ .Values.aimldashboard.image.repository }}:{{ .Values.aimldashboard.image.tag | default .Chart.AppVersion }}"
+          imagePullPolicy: {{ .Values.aimldashboard.image.pullPolicy }}
+          ports:
+            - name: serviceport
+              containerPort: {{ include "common.serviceport.aiml-dashboard.http" .  }}
+              protocol: TCP
+          command: ["/bin/sh", "-c"]
+          args: ["chmod +x npm_run_build.sh ; ./npm_run_build.sh"]
+          readinessProbe:
+            httpGet:
+              path: /
+              port: {{ include "common.serviceport.aiml-dashboard.http" .  }}
+          envFrom:
+            - configMapRef:
+                name: aiml-dashboard-configmap
diff --git a/helm/aiml-dashboard/templates/service.yaml b/helm/aiml-dashboard/templates/service.yaml
new file mode 100644 (file)
index 0000000..f72053f
--- /dev/null
@@ -0,0 +1,34 @@
+# ==================================================================================
+#
+#       Copyright (c) 2022 Samsung Electronics Co., Ltd. All Rights Reserved.
+#
+#   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: v1
+kind: Service
+metadata:
+  name: {{ include "aiml-dashboard.fullname" . }}
+  namespace: {{ include "common.namespace.platform" . }}
+  labels:
+    {{- include "aiml-dashboard.labels" . | nindent 4 }}
+spec:
+  type: NodePort
+  ports:
+    - port: {{ include "common.serviceport.aiml-dashboard.http" .  }}
+      targetPort: {{ include "common.serviceport.aiml-dashboard.http" .  }}
+      nodePort: {{ include "common.serviceport.aiml-dashboard.http" .  }}
+      protocol: TCP
+      name: serviceport
+  selector:
+    {{- include "aiml-dashboard.selectorLabels" . | nindent 4 }}
diff --git a/helm/aiml-dashboard/values.yaml b/helm/aiml-dashboard/values.yaml
new file mode 100644 (file)
index 0000000..782cd9a
--- /dev/null
@@ -0,0 +1,24 @@
+# ==================================================================================
+#
+#       Copyright (c) 2022 Samsung Electronics Co., Ltd. All Rights Reserved.
+#
+#   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.
+#
+# ==================================================================================
+# Default values for aiml-dashboard component.
+
+image:
+  repository: aiml-dashboard
+  pullPolicy: IfNotPresent
+  # Overrides the image tag whose default is the chart appVersion.
+  tag: "latest"
diff --git a/helm/aiml-notebook/Chart.yaml b/helm/aiml-notebook/Chart.yaml
new file mode 100644 (file)
index 0000000..a094b32
--- /dev/null
@@ -0,0 +1,23 @@
+# ==================================================================================
+#
+#       Copyright (c) 2022 Samsung Electronics Co., Ltd. All Rights Reserved.
+#
+#   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: v1
+name: aiml-notebook
+description: Helm chart for AIML Notebook
+type: application
+version: 1.0.0
+appVersion: "1.0.0"
diff --git a/helm/aiml-notebook/requirements.yaml b/helm/aiml-notebook/requirements.yaml
new file mode 100644 (file)
index 0000000..9b38f1d
--- /dev/null
@@ -0,0 +1,21 @@
+# ==================================================================================
+#
+#       Copyright (c) 2022 Samsung Electronics Co., Ltd. All Rights Reserved.
+#
+#   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.
+#
+# ==================================================================================
+dependencies:
+  - name: aimlfw-common
+    version: 1.0.0
+    repository: "@local"
diff --git a/helm/aiml-notebook/templates/deployment.yaml b/helm/aiml-notebook/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..efaa3e0
--- /dev/null
@@ -0,0 +1,54 @@
+# ==================================================================================
+#
+#       Copyright (c) 2022 Samsung Electronics Co., Ltd. All Rights Reserved.
+#
+#   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: apps/v1
+kind: Deployment
+metadata:
+  name: {{ include "aiml-notebook.fullname" . }}
+  namespace: {{ include "common.namespace.platform" . }}
+  labels:
+    {{- include "aiml-notebook.labels" . | nindent 4 }}
+spec:
+  selector:
+    matchLabels:
+      {{- include "aiml-notebook.selectorLabels" . | nindent 6 }}
+  template:
+    metadata:
+      {{- with .Values.podAnnotations }}
+      annotations:
+        {{- toYaml . | nindent 8 }}
+      {{- end }}
+      labels:
+        {{- include "aiml-notebook.selectorLabels" . | nindent 8 }}
+    spec:
+      {{- with .Values.imagePullSecrets }}
+      imagePullSecrets:
+        {{- toYaml . | nindent 8 }}
+      {{- end }}
+      
+      securityContext:
+        {{- toYaml .Values.podSecurityContext | nindent 8 }}
+      containers:
+        - name: {{ .Chart.Name }}
+          image: "{{ .Values.aimlnotebook.image.repository }}:{{ .Values.aimlnotebook.image.tag | default .Chart.AppVersion }}"
+          imagePullPolicy: {{ .Values.aimlnotebook.image.pullPolicy }}
+          ports:
+            - name: serviceport
+              containerPort: {{ include "common.serviceport.aiml-notebook.http" .  }}
+              protocol: TCP
+          command: ["start-notebook.sh"]
+          args: ["--NotebookApp.token=''", "--NotebookApp.password=''"]
diff --git a/helm/aiml-notebook/templates/service.yaml b/helm/aiml-notebook/templates/service.yaml
new file mode 100644 (file)
index 0000000..45c4e4c
--- /dev/null
@@ -0,0 +1,34 @@
+# ==================================================================================
+#
+#       Copyright (c) 2022 Samsung Electronics Co., Ltd. All Rights Reserved.
+#
+#   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: v1
+kind: Service
+metadata:
+  name: {{ include "aiml-notebook.fullname" . }}
+  namespace: {{ include "common.namespace.platform" . }}
+  labels:
+    {{- include "aiml-notebook.labels" . | nindent 4 }}
+spec:
+  type: NodePort
+  ports:
+    - port: {{ include "common.serviceport.aiml-notebook.http" .  }}
+      targetPort: {{ include "common.serviceport.aiml-notebook.targetport" .  }}
+      nodePort: {{ include "common.serviceport.aiml-notebook.external" .  }}
+      protocol: TCP
+      name: serviceport
+  selector:
+    {{- include "aiml-notebook.selectorLabels" . | nindent 4 }}
diff --git a/helm/aiml-notebook/values.yaml b/helm/aiml-notebook/values.yaml
new file mode 100644 (file)
index 0000000..bfe70f2
--- /dev/null
@@ -0,0 +1,24 @@
+# ==================================================================================
+#
+#       Copyright (c) 2022 Samsung Electronics Co., Ltd. All Rights Reserved.
+#
+#   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.
+#
+# ==================================================================================
+# Default values for aiml-notebook component.
+
+image:
+  repository: aiml-notebook
+  pullPolicy: IfNotPresent
+  # Overrides the image tag whose default is the chart appVersion.
+  tag: "latest"