From: tganesh2k Date: Thu, 17 Nov 2022 09:34:37 +0000 (+0530) Subject: Added Kubeflow and leofs common template files for installing aimlfw. X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=433ba382c000c996099a60cbdaec9c37776f8603;p=aiml-fw%2Faimlfw-dep.git Added Kubeflow and leofs common template files for installing aimlfw. Issue-Id: AIMLFW-4 Signed-off-by: tganesh2k Change-Id: Idb7748635d875577e8193163ea032aaefb15b8b7 --- diff --git a/aimlfw-common/Common-Template/helm/aimlfw-common/templates/_leofs.tpl b/aimlfw-common/Common-Template/helm/aimlfw-common/templates/_leofs.tpl new file mode 100644 index 0000000..4ffb9ba --- /dev/null +++ b/aimlfw-common/Common-Template/helm/aimlfw-common/templates/_leofs.tpl @@ -0,0 +1,83 @@ +# ================================================================================== +# +# 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. +# +# ================================================================================== + +{{/* +Expand the name of the chart. +*/}} +{{- define "leofs.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 "leofs.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 "leofs.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "leofs.labels" -}} +helm.sh/chart: {{ include "leofs.chart" . }} +{{ include "leofs.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "leofs.selectorLabels" -}} +app.kubernetes.io/name: {{ include "leofs.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "leofs.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "leofs.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} + +{{- define "common.serviceport.leofs.http" -}}8080{{- end -}} +{{- define "common.serviceport.leofs.external" -}}32080{{- end -}} diff --git a/aimlfw-common/Common-Template/helm/aimlfw-common/templates/_namespace.tpl b/aimlfw-common/Common-Template/helm/aimlfw-common/templates/_namespace.tpl new file mode 100644 index 0000000..5ac915e --- /dev/null +++ b/aimlfw-common/Common-Template/helm/aimlfw-common/templates/_namespace.tpl @@ -0,0 +1,20 @@ +# ================================================================================== +# +# 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. +# +# ================================================================================== + +{{- define "common.namespace.platform" -}}traininghost{{- end -}} +{{- define "common.namespace.kubeflow" -}}kubeflow{{- end -}}