forked from o-ran-sc/aiml-fw-aimlfw-dep
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Installation changes for modelmgmtservice component, review comments
Issue-Id: AIMLFW-70 Change-Id: I13b8e9efc01beb73942d67d8219af1ff9249635c Signed-off-by: SANDEEP KUMAR JAISAWAL <[email protected]>
- Loading branch information
Showing
8 changed files
with
285 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
85 changes: 85 additions & 0 deletions
85
aimlfw-common/Common-Template/helm/aimlfw-common/templates/_modelmgmtservice.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
# ================================================================================== | ||
# | ||
# Copyright (c) 2023 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 "modelmgmtservice.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 "modelmgmtservice.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 "modelmgmtservice.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Common labels | ||
*/}} | ||
{{- define "modelmgmtservice.labels" -}} | ||
helm.sh/chart: {{ include "modelmgmtservice.chart" . }} | ||
{{ include "modelmgmtservice.selectorLabels" . }} | ||
{{- if .Chart.AppVersion }} | ||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
{{- end }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- end }} | ||
|
||
{{/* | ||
Selector labels | ||
*/}} | ||
{{- define "modelmgmtservice.selectorLabels" -}} | ||
app.kubernetes.io/name: {{ include "modelmgmtservice.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create the name of the service account to use | ||
*/}} | ||
{{- define "modelmgmtservice.serviceAccountName" -}} | ||
{{- if .Values.serviceAccount.create }} | ||
{{- default (include "modelmgmtservice.fullname" .) .Values.serviceAccount.name }} | ||
{{- else }} | ||
{{- default "default" .Values.serviceAccount.name }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{- define "common.serviceport.modelmgmtservice.http" -}}8082{{- end -}} | ||
{{- define "common.serviceport.modelmgmtservice.targetport" -}}8082{{- end -}} | ||
{{- define "common.servicehost.modelmgmtservice.http" -}}modelmgmtservice.traininghost{{- end -}} | ||
{{- define "common.serviceport.modelmgmtservice.external" -}}32006{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# ================================================================================== | ||
# | ||
# Copyright (c) 2023 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: modelmgmtservice | ||
description: Helm chart for modelmgmtservice | ||
type: application | ||
version: 1.0.0 | ||
appVersion: "1.0.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# ================================================================================== | ||
# | ||
# Copyright (c) 2023 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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# ================================================================================== | ||
# | ||
# Copyright (c) 2023 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: modelmgmtservice-configmap | ||
namespace: {{ include "common.namespace.platform" . }} | ||
|
||
data: | ||
# Configuration values can be set as key-value properties | ||
MMES_URL: 0.0.0.0:8082 | ||
S3_URL: http://leofs.kubeflow:8080 | ||
S3_ACCESS_KEY: leofs | ||
S3_REGION: oranaiml | ||
MODEL_FILE_POSTFIX: _model.zip | ||
INFO_FILE_POSTFIX: _info.json | ||
LOG_FILE_NAME: mmes.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# ================================================================================== | ||
# | ||
# Copyright (c) 2023 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 "modelmgmtservice.fullname" . }} | ||
namespace: {{ include "common.namespace.platform" . }} | ||
labels: | ||
{{- include "modelmgmtservice.labels" . | nindent 4 }} | ||
spec: | ||
selector: | ||
matchLabels: | ||
{{- include "modelmgmtservice.selectorLabels" . | nindent 6 }} | ||
template: | ||
metadata: | ||
{{- with .Values.podAnnotations }} | ||
annotations: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
labels: | ||
{{- include "modelmgmtservice.selectorLabels" . | nindent 8 }} | ||
spec: | ||
{{- with .Values.imagePullSecrets }} | ||
imagePullSecrets: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
securityContext: | ||
{{- toYaml .Values.podSecurityContext | nindent 8 }} | ||
containers: | ||
- name: {{ .Chart.Name }} | ||
image: "{{ .Values.modelmgmtservice.image.repository }}:{{ .Values.modelmgmtservice.image.tag | default .Chart.AppVersion }}" | ||
imagePullPolicy: {{ .Values.modelmgmtservice.image.pullPolicy }} | ||
ports: | ||
- name: serviceport | ||
containerPort: {{ include "common.serviceport.modelmgmtservice.http" . }} | ||
protocol: TCP | ||
envFrom: | ||
- configMapRef: | ||
name: modelmgmtservice-configmap | ||
env: | ||
- name: S3_SECRET_KEY | ||
valueFrom: | ||
secretKeyRef: | ||
name: leofs-secret | ||
key: password |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# ================================================================================== | ||
# | ||
# Copyright (c) 2023 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 "modelmgmtservice.fullname" . }} | ||
namespace: {{ include "common.namespace.platform" . }} | ||
labels: {{ include "modelmgmtservice.labels" . | nindent 4 }} | ||
spec: | ||
type: NodePort | ||
ports: | ||
- port: {{ include "common.serviceport.modelmgmtservice.http" . }} | ||
targetPort: | ||
{{ include "common.serviceport.modelmgmtservice.targetport" . }} | ||
nodePort: {{ include "common.serviceport.modelmgmtservice.external" . }} | ||
protocol: TCP | ||
name: serviceport | ||
selector: {{ include "modelmgmtservice.selectorLabels" . | nindent 4 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# ================================================================================== | ||
# | ||
# Copyright (c) 2023 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 modelmgmtservice component. | ||
|
||
image: | ||
repository: modelmgmtservice | ||
pullPolicy: IfNotPresent | ||
# Overrides the image tag whose default is the chart appVersion. | ||
tag: "1.0.0" |