From ba5fb773e8de9c402a46f6035ede46114ffba2a5 Mon Sep 17 00:00:00 2001 From: smahana123 Date: Wed, 16 Nov 2022 12:03:29 +0530 Subject: [PATCH] Installation script for leofs DB. Issue-Id: AIMLFW-4 Signed-off-by: smahana123 Change-Id: I7120bd9af7f3b3334a7030a37ae1c809f32ea9ae --- helm/leofs/Chart.yaml | 23 ++++++++++++++ helm/leofs/requirements.yaml | 21 +++++++++++++ helm/leofs/templates/deployment.yaml | 60 ++++++++++++++++++++++++++++++++++++ helm/leofs/templates/service.yaml | 34 ++++++++++++++++++++ helm/leofs/values.yaml | 24 +++++++++++++++ 5 files changed, 162 insertions(+) create mode 100644 helm/leofs/Chart.yaml create mode 100644 helm/leofs/requirements.yaml create mode 100644 helm/leofs/templates/deployment.yaml create mode 100644 helm/leofs/templates/service.yaml create mode 100644 helm/leofs/values.yaml diff --git a/helm/leofs/Chart.yaml b/helm/leofs/Chart.yaml new file mode 100644 index 0000000..fd42fb1 --- /dev/null +++ b/helm/leofs/Chart.yaml @@ -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 index 0000000..9b38f1d --- /dev/null +++ b/helm/leofs/requirements.yaml @@ -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 index 0000000..6f1b901 --- /dev/null +++ b/helm/leofs/templates/deployment.yaml @@ -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 index 0000000..15aeed9 --- /dev/null +++ b/helm/leofs/templates/service.yaml @@ -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 index 0000000..aa28ef8 --- /dev/null +++ b/helm/leofs/values.yaml @@ -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" -- 2.16.6