From: SANDEEP KUMAR JAISAWAL Date: Thu, 17 Nov 2022 06:37:04 +0000 (+0530) Subject: Helm chart for data extraction X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=807f9b387465b4ab73eef240da7da04de27dd5a4;p=aiml-fw%2Faimlfw-dep.git Helm chart for data extraction Issue-id: AIMLWF-4 Signed-off-by: SANDEEP KUMAR JAISAWAL Change-Id: Ia6f73dce2b423908d65006bcb725684e7a6c576f --- diff --git a/helm/data-extraction/Chart.yaml b/helm/data-extraction/Chart.yaml new file mode 100644 index 0000000..a224fea --- /dev/null +++ b/helm/data-extraction/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: data-extraction +description: Helm chart for data extraction +type: application +version: 1.0.0 +appVersion: "1.0.0" diff --git a/helm/data-extraction/requirements.yaml b/helm/data-extraction/requirements.yaml new file mode 100644 index 0000000..9b38f1d --- /dev/null +++ b/helm/data-extraction/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/data-extraction/templates/configmap.yaml b/helm/data-extraction/templates/configmap.yaml new file mode 100644 index 0000000..e83b172 --- /dev/null +++ b/helm/data-extraction/templates/configmap.yaml @@ -0,0 +1,47 @@ +# ================================================================================== +# +# 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: data-extraction-configmap + namespace: {{ include "common.namespace.platform" . }} +data: + # Configuration values can be set as key-value properties + FS_API_HOST : "{{ include "common.servicehost.data-extraction" . }}" + FS_API_PORT : "{{ include "common.serviceport.data-extraction.http" . }}" + FS_DB_IP : "{{ include "common.servicehost.fs-db" . }}" + FS_DB_PORT : "{{ include "common.serviceport.fs-db" . }}" + FS_DB_USER : "{{ include "common.serviceuser.fs-db" . }}" + FS_DB_KEYSPACE_NAME : "{{ include "common.ksname.fs-db" . }}" + #InfluxDB Data Lake + Influx_DATALAKE_IP : {{ .Values.datalake.influxdb.host }} + Influx_DATALAKE_PORT : "{{ .Values.datalake.influxdb.port }}" + Influx_ORG_NAME : {{ .Values.datalake.influxdb.orgname }} + Influx_BUCKET_NAME : {{ .Values.datalake.influxdb.bucket }} + Influx_Token : {{ .Values.datalake.influxdb.token }} + + # Cassandra DB Datalake + Cassandra_DATALAKE_IP: "NOT USED" + Cassandra_DATALAKE_PORT: "NOT USED" + Cassandra_DATALAKE_USER: "NOT USED" + Cassandra_DATALAKE_PASSWORD: "NOT USED" + Cassandra_KEYSPACE_NAME: "NOT USED" + Cassandra_TABLE_NAME: "NOT USED" + Cassandra_CONS_LEVEL: 'ONE' + + PYTHONUNBUFFERED: "0" diff --git a/helm/data-extraction/templates/deployment.yaml b/helm/data-extraction/templates/deployment.yaml new file mode 100644 index 0000000..bf424a3 --- /dev/null +++ b/helm/data-extraction/templates/deployment.yaml @@ -0,0 +1,75 @@ +# ================================================================================== +# +# 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 "data-extraction.fullname" . }} + namespace: {{ include "common.namespace.platform" . }} + labels: + {{- include "data-extraction.labels" . | nindent 4 }} +spec: + selector: + matchLabels: + {{- include "data-extraction.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "data-extraction.selectorLabels" . | nindent 8 }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.dataextraction.image.repository }}:{{ .Values.dataextraction.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.dataextraction.image.pullPolicy }} + env: + - name: FS_DB_PASSWORD + valueFrom: + secretKeyRef: + name: cassandra + key: cassandra-password + ports: + - name: serviceport + containerPort: {{ include "common.serviceport.data-extraction.http" . }} + protocol: TCP + workingDir: /home/app/dataextraction + command: ["python3"] + args: [main.py] + # command: ["sleep"] + # args: [infinity] + # livenessProbe: + # httpGet: + # path: /trainingjobs/latest + # port: serviceport + # readinessProbe: + # httpGet: + # path: /trainingjobs/latest + # port: serviceport + envFrom: + - configMapRef: + name: data-extraction-configmap diff --git a/helm/data-extraction/templates/service.yaml b/helm/data-extraction/templates/service.yaml new file mode 100644 index 0000000..7472aaa --- /dev/null +++ b/helm/data-extraction/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 "data-extraction.fullname" . }} + namespace: {{ include "common.namespace.platform" . }} + labels: + {{- include "data-extraction.labels" . | nindent 4 }} +spec: + type: NodePort + ports: + - port: {{ include "common.serviceport.data-extraction.http" . }} + targetPort: {{ include "common.serviceport.data-extraction.http" . }} + nodePort: {{ include "common.serviceport.data-extraction.http" . }} + protocol: TCP + name: serviceport + selector: + {{- include "data-extraction.selectorLabels" . | nindent 4 }} diff --git a/helm/data-extraction/values.yaml b/helm/data-extraction/values.yaml new file mode 100644 index 0000000..cfc0e59 --- /dev/null +++ b/helm/data-extraction/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 data-extraction component. + +image: + repository: data-extraction + pullPolicy: IfNotPresent + # Overrides the image tag whose default is the chart appVersion. + tag: "latest"