Initial installation script for kfadapter module. 55/9655/1
authorsmahana123 <s.mahana@samsung.com>
Wed, 16 Nov 2022 06:02:59 +0000 (11:32 +0530)
committersmahana123 <s.mahana@samsung.com>
Wed, 16 Nov 2022 06:07:41 +0000 (11:37 +0530)
Issue-Id: AIMLFW-4

Signed-off-by: smahana123 <s.mahana@samsung.com>
Change-Id: I70f780e901e3d3becb699d1a60eb09f74da94bfb

helm/kfadapter/Chart.yaml [new file with mode: 0644]
helm/kfadapter/requirements.yaml [new file with mode: 0644]
helm/kfadapter/templates/configmap.yaml [new file with mode: 0644]
helm/kfadapter/templates/deployment.yaml [new file with mode: 0644]
helm/kfadapter/templates/service.yaml [new file with mode: 0644]
helm/kfadapter/values.yaml [new file with mode: 0644]

diff --git a/helm/kfadapter/Chart.yaml b/helm/kfadapter/Chart.yaml
new file mode 100644 (file)
index 0000000..2e2edd2
--- /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: kfadapter
+description: Helm chart for kubeflow adapter
+type: application
+version: 1.0.0
+appVersion: "1.0.0"
diff --git a/helm/kfadapter/requirements.yaml b/helm/kfadapter/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/kfadapter/templates/configmap.yaml b/helm/kfadapter/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..eeb3d5a
--- /dev/null
@@ -0,0 +1,31 @@
+# ==================================================================================
+#
+#       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: kfadapter-configmap
+  namespace: {{ include "common.namespace.platform" . }}
+data:
+  # Configuration values can be set as key-value properties
+  KUBEFLOW_HOST: ml-pipeline-ui.kubeflow
+  KUBEFLOW_PORT: "80"
+  KF_NAMESPACE: "ric"
+  KF_ADAPTER_PORT: "{{ include "common.serviceport.kfadapter.http" . }}"
+  TRAININGMGR_HOST: {{ include "common.servicehost.tm.http" . }}
+  TRAININGMGR_PORT: "{{ include "common.serviceport.tm.http" . }}"
+  PYTHONUNBUFFERED: "0"
diff --git a/helm/kfadapter/templates/deployment.yaml b/helm/kfadapter/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..a575c57
--- /dev/null
@@ -0,0 +1,58 @@
+# ==================================================================================
+#
+#       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 "kfadapter.fullname" . }}
+  namespace: {{ include "common.namespace.platform" . }}
+  labels:
+    {{- include "kfadapter.labels" . | nindent 4 }}
+spec:
+  selector:
+    matchLabels:
+      {{- include "kfadapter.selectorLabels" . | nindent 6 }}
+  template:
+    metadata:
+      {{- with .Values.podAnnotations }}
+      annotations:
+        {{- toYaml . | nindent 8 }}
+      {{- end }}
+      labels:
+        {{- include "kfadapter.selectorLabels" . | nindent 8 }}
+    spec:
+      {{- with .Values.imagePullSecrets }}
+      imagePullSecrets:
+        {{- toYaml . | nindent 8 }}
+      {{- end }}
+      
+      securityContext:
+        {{- toYaml .Values.podSecurityContext | nindent 8 }}
+      containers:
+        - name: {{ .Chart.Name }}
+          image: "{{ .Values.kfadapter.image.repository }}:{{ .Values.kfadapter.image.tag | default .Chart.AppVersion }}"
+          imagePullPolicy: {{ .Values.kfadapter.image.pullPolicy }}
+          ports:
+            - name: serviceport
+              containerPort: {{ include "common.serviceport.kfadapter.http" .  }}
+              protocol: TCP
+          workingDir: /home/app/kfadapter/
+          command: ["python3"]
+          args: [kfadapter_main.py]
+          envFrom:
+            - configMapRef:
+                name: kfadapter-configmap
diff --git a/helm/kfadapter/templates/service.yaml b/helm/kfadapter/templates/service.yaml
new file mode 100644 (file)
index 0000000..709c9dc
--- /dev/null
@@ -0,0 +1,33 @@
+# ==================================================================================
+#
+#       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 "kfadapter.fullname" . }}
+  namespace: {{ include "common.namespace.platform" . }}
+  labels:
+    {{- include "kfadapter.labels" . | nindent 4 }}
+spec:
+  type: ClusterIP
+  ports:
+    - port: {{ include "common.serviceport.kfadapter.http" .  }}
+      targetPort: {{ include "common.serviceport.kfadapter.http" .  }}
+      protocol: TCP
+      name: serviceport
+  selector:
+    {{- include "kfadapter.selectorLabels" . | nindent 4 }}
diff --git a/helm/kfadapter/values.yaml b/helm/kfadapter/values.yaml
new file mode 100644 (file)
index 0000000..811e1af
--- /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 kfadapter component.
+
+image:
+  repository: kfadapter
+  pullPolicy: IfNotPresent
+  # Overrides the image tag whose default is the chart appVersion.
+  tag: "latest"