Installation script for leofs DB. 56/9656/1
authorsmahana123 <s.mahana@samsung.com>
Wed, 16 Nov 2022 06:33:29 +0000 (12:03 +0530)
committersmahana123 <s.mahana@samsung.com>
Wed, 16 Nov 2022 06:33:29 +0000 (12:03 +0530)
Issue-Id: AIMLFW-4

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

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

diff --git a/helm/leofs/Chart.yaml b/helm/leofs/Chart.yaml
new file mode 100644 (file)
index 0000000..fd42fb1
--- /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: leofs
+description: Helm chart for leofs db
+type: application
+version: 1.0.0
+appVersion: "1.0.0"
diff --git a/helm/leofs/requirements.yaml b/helm/leofs/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/leofs/templates/deployment.yaml b/helm/leofs/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..6f1b901
--- /dev/null
@@ -0,0 +1,60 @@
+# ==================================================================================
+#
+#       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 "leofs.fullname" . }}
+  namespace: {{ include "common.namespace.kubeflow" . }}
+  labels:
+    {{- include "leofs.labels" . | nindent 4 }}
+spec:
+  selector:
+    matchLabels:
+      {{- include "leofs.selectorLabels" . | nindent 6 }}
+  template:
+    metadata:
+      {{- with .Values.podAnnotations }}
+      annotations:
+        {{- toYaml . | nindent 8 }}
+      {{- end }}
+      labels:
+        {{- include "leofs.selectorLabels" . | nindent 8 }}
+    spec:
+      {{- with .Values.imagePullSecrets }}
+      imagePullSecrets:
+        {{- toYaml . | nindent 8 }}
+      {{- end }}
+      
+      securityContext:
+        {{- toYaml .Values.podSecurityContext | nindent 8 }}
+      containers:
+        - name: {{ .Chart.Name }}
+          image: "{{ .Values.leofs.image.repository }}:{{ .Values.leofs.image.tag | default .Chart.AppVersion }}"
+          imagePullPolicy: {{ .Values.leofs.image.pullPolicy }}
+          env:
+            - name: LEOFS_PASSWORD
+              valueFrom:
+                secretKeyRef:
+                  name: leofs-secret
+                  key: password
+          ports:
+            - name: serviceport
+              containerPort: {{ include "common.serviceport.leofs.http" .  }}
+              protocol: TCP
+          workingDir: /root/deb
+          command: ["/sbin/init"]
diff --git a/helm/leofs/templates/service.yaml b/helm/leofs/templates/service.yaml
new file mode 100644 (file)
index 0000000..15aeed9
--- /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 "leofs.fullname" . }}
+  namespace: {{ include "common.namespace.kubeflow" . }}
+  labels:
+    {{- include "leofs.labels" . | nindent 4 }}
+spec:
+  type: NodePort
+  ports:
+    - port: {{ include "common.serviceport.leofs.http" .  }}
+      targetPort: {{ include "common.serviceport.leofs.http" .  }}
+      nodePort: {{ include "common.serviceport.leofs.external" .  }}
+      protocol: TCP
+      name: serviceport
+  selector:
+    {{- include "leofs.selectorLabels" . | nindent 4 }}
diff --git a/helm/leofs/values.yaml b/helm/leofs/values.yaml
new file mode 100644 (file)
index 0000000..aa28ef8
--- /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 leofs component.
+
+image:
+  repository: leofs
+  pullPolicy: IfNotPresent
+  # Overrides the image tag whose default is the chart appVersion.
+  tag: "latest"