diff --git a/charts/evi-fm-master-as-0.8.4/Chart.yaml b/charts/evi-fm-master-as-0.8.4/Chart.yaml new file mode 100644 index 0000000..9da250a --- /dev/null +++ b/charts/evi-fm-master-as-0.8.4/Chart.yaml @@ -0,0 +1,6 @@ +apiVersion: v2 +appVersion: 1.16.0 +description: A Helm chart for Kubernetes +name: evi-fm-master-as +type: application +version: 0.8.4 diff --git a/charts/evi-fm-master-as-0.8.4/configs/prod_fs_master.config b/charts/evi-fm-master-as-0.8.4/configs/prod_fs_master.config new file mode 100644 index 0000000..ff51311 --- /dev/null +++ b/charts/evi-fm-master-as-0.8.4/configs/prod_fs_master.config @@ -0,0 +1,33 @@ +[Local] +name=Master-as +minWorkerRequired=1 +logDir=. +logMaxFileSize=16777216 +logMaxFileCount=8 +logSeverity=2 +monitorWorkerHeartbeat=1 +defaultBatchingWait=0 +[HTTP] +address=0.0.0.0 +port=8080 +[Aggregator] +wakeupInterval=100 +[Database] +#address=tcp://127.0.0.1:6379 +address=redisAddr_placeholder:redisPort_placeholder # tcp://evi-redis-standalone-master.smartedge-apps:6379#tcp://127.0.0.1:6379 +dataSource=feature_storage +objectType=vehicle +timeBegin=1640657550000 +timeEnd=1640658570000 +allowedCaptureSourceIds=2 +[RedisSentinels] +useSentinel=0 +sentinelAddress=my-redis-redis-ha-announce-0 +sentinelPort=26379 +sentinelAddress=my-redis-redis-ha-announce-1 +sentinelPort=26379 +sentinelAddress=my-redis-redis-ha-announce-2 +sentinelPort=26379 +sentinelConnectionPoolSize=200 +sentinelMasterName=mymaster + diff --git a/charts/evi-fm-master-as-0.8.4/templates/Namespace.yaml b/charts/evi-fm-master-as-0.8.4/templates/Namespace.yaml new file mode 100644 index 0000000..6c078df --- /dev/null +++ b/charts/evi-fm-master-as-0.8.4/templates/Namespace.yaml @@ -0,0 +1,24 @@ +# INTEL CONFIDENTIAL +# +# Copyright (C) 2022 Intel Corporation. +# +# This software and the related documents are Intel copyrighted materials, and your use of +# them is governed by the express license under which they were provided to you (License). +# Unless the License provides otherwise, you may not use, modify, copy, publish, distribute, +# disclose or transmit this software or the related documents without Intel's prior written permission. +# +# This software and the related documents are provided as is, with no express or implied warranties, +# other than those that are expressly stated in the License. + +--- +{{- if .Values.global.namespace.create -}} +apiVersion: v1 +kind: Namespace +metadata: + name: {{ .Values.global.namespace.value }} +{{ if .Values.global.namespace.istioInjection.create }} + labels: + istio-injection: enabled +{{ end }} +{{- end -}} + diff --git a/charts/evi-fm-master-as-0.8.4/templates/_helpers.tpl b/charts/evi-fm-master-as-0.8.4/templates/_helpers.tpl new file mode 100644 index 0000000..faeff6f --- /dev/null +++ b/charts/evi-fm-master-as-0.8.4/templates/_helpers.tpl @@ -0,0 +1,75 @@ +# INTEL CONFIDENTIAL +# +# Copyright (C) 2022 Intel Corporation. +# +# This software and the related documents are Intel copyrighted materials, and your use of +# them is governed by the express license under which they were provided to you (License). +# Unless the License provides otherwise, you may not use, modify, copy, publish, distribute, +# disclose or transmit this software or the related documents without Intel's prior written permission. +# +# This software and the related documents are provided as is, with no express or implied warranties, +# other than those that are expressly stated in the License. + +--- +{{/* +Expand the name of the chart. +*/}} +{{- define "fm-master.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 "fm-master.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 "fm-master.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "fm-master.labels" -}} +helm.sh/chart: {{ include "fm-master.chart" . }} +{{ include "fm-master.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "fm-master.selectorLabels" -}} +app.kubernetes.io/name: {{ include "fm-master.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "fm-master.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "fm-master.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/charts/evi-fm-master-as-0.8.4/templates/configmap.yaml b/charts/evi-fm-master-as-0.8.4/templates/configmap.yaml new file mode 100644 index 0000000..07d3130 --- /dev/null +++ b/charts/evi-fm-master-as-0.8.4/templates/configmap.yaml @@ -0,0 +1,21 @@ +# INTEL CONFIDENTIAL +# +# Copyright (C) 2022 Intel Corporation. +# +# This software and the related documents are Intel copyrighted materials, and your use of +# them is governed by the express license under which they were provided to you (License). +# Unless the License provides otherwise, you may not use, modify, copy, publish, distribute, +# disclose or transmit this software or the related documents without Intel's prior written permission. +# +# This software and the related documents are provided as is, with no express or implied warranties, +# other than those that are expressly stated in the License. + +--- +apiVersion: v1 +kind: ConfigMap +metadata: + namespace: {{ .Values.global.namespace.value }} + name: {{ .Values.configMap.name }} +data: +{{ (.Files.Glob "configs/**.config").AsConfig | replace "redisAddr_placeholder" .Values.configMap.redis.redisAddr | replace "redisPort_placeholder" (toString .Values.configMap.redis.redisPort) | indent 2 }} + diff --git a/charts/evi-fm-master-as-0.8.4/templates/deployment.yaml b/charts/evi-fm-master-as-0.8.4/templates/deployment.yaml new file mode 100644 index 0000000..8de9ad8 --- /dev/null +++ b/charts/evi-fm-master-as-0.8.4/templates/deployment.yaml @@ -0,0 +1,67 @@ +# INTEL CONFIDENTIAL +# +# Copyright (C) 2022 Intel Corporation. +# +# This software and the related documents are Intel copyrighted materials, and your use of +# them is governed by the express license under which they were provided to you (License). +# Unless the License provides otherwise, you may not use, modify, copy, publish, distribute, +# disclose or transmit this software or the related documents without Intel's prior written permission. +# +# This software and the related documents are provided as is, with no express or implied warranties, +# other than those that are expressly stated in the License. + +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "fm-master.fullname" . }} + namespace: {{ .Values.global.namespace.value }} +spec: + selector: + matchLabels: + app: evi-fm-master-as + replicas: {{ .Values.replicaCount }} + template: + metadata: + labels: + app: evi-fm-master-as + sidecar.istio.io/inject: "{{ .Values.istioInjection }}" + version: v1 + spec: + nodeSelector: + feature.node.kubernetes.io/cpu-cpuid.AVX512VNNI: 'true' + feature.node.kubernetes.io/cpu-cpuid.AVX2: 'true' + serviceAccountName: evi-fm-master-as + containers: + - name: evi-fm-master-as + image: {{ .Values.image.repository }}:{{ .Values.image.version}} + command: ["/bin/sh"] + args: ["-c", 'cp /opt/feature_matching_service_master/featurematchingservice/master/prod_fs_master.config /opt/featurematchingservice/prod_fs_master.config; sed -i "s/^minWorkerRequired=.*/minWorkerRequired=${FM_WORKER_COUNT}/g" /opt/featurematchingservice/prod_fs_master.config; sed -i "s/^timeBegin=.*/timeBegin=${FM_TIME_BEGIN}/g" /opt/featurematchingservice/prod_fs_master.config; sed -i "s/^timeEnd=.*/timeEnd=${FM_TIME_END}/g" /opt/featurematchingservice/prod_fs_master.config; sed -i "s/^allowedCaptureSourceIds=.*/allowedCaptureSourceIds=${FM_CAPTURE_IDS}/g" /opt/featurematchingservice/prod_fs_master.config; /opt/featurematchingservice/build/bin/fms_master -C /opt/featurematchingservice/prod_fs_master.config'] + imagePullPolicy: {{ .Values.image.pullPolicy }} + resources: + limits: + cpu: "1" + memory: 600Mi + requests: + cpu: 10m + memory: 15Mi + env: + - name: FM_WORKER_COUNT + value: "{{ .Values.env.workerCount }}" + - name: FM_TIME_BEGIN + value: "{{ .Values.env.timeBegin }}" + - name: FM_TIME_END + value: "{{ .Values.env.timeEnd }}" + - name: FM_CAPTURE_IDS + value: "{{ .Values.env.allowedCaptureSourceIds }}" + ports: + - containerPort: {{ .Values.image.containerPort }} + volumeMounts: + - mountPath: /opt/feature_matching_service_master/featurematchingservice/master/prod_fs_master.config + subPath: prod_fs_master.config + name: config-volume + volumes: + - name: config-volume + configMap: + name: evi-fm-master-as + diff --git a/charts/evi-fm-master-as-0.8.4/templates/service.yaml b/charts/evi-fm-master-as-0.8.4/templates/service.yaml new file mode 100644 index 0000000..a4f0cb9 --- /dev/null +++ b/charts/evi-fm-master-as-0.8.4/templates/service.yaml @@ -0,0 +1,29 @@ +# INTEL CONFIDENTIAL +# +# Copyright (C) 2022 Intel Corporation. +# +# This software and the related documents are Intel copyrighted materials, and your use of +# them is governed by the express license under which they were provided to you (License). +# Unless the License provides otherwise, you may not use, modify, copy, publish, distribute, +# disclose or transmit this software or the related documents without Intel's prior written permission. +# +# This software and the related documents are provided as is, with no express or implied warranties, +# other than those that are expressly stated in the License. + +--- +apiVersion: v1 +kind: Service +metadata: + name: {{ .Values.service.name }} + namespace: {{ .Values.global.namespace.value }} + labels: + app: {{ .Values.service.labels.value }} +spec: + ports: + - port: {{ .Values.image.containerPort }} + targetPort: {{ .Values.image.containerPort }} + protocol: TCP + type: ClusterIP + selector: + app: evi-fm-master-as + diff --git a/charts/evi-fm-master-as-0.8.4/templates/serviceaccount.yaml b/charts/evi-fm-master-as-0.8.4/templates/serviceaccount.yaml new file mode 100644 index 0000000..e0cb54c --- /dev/null +++ b/charts/evi-fm-master-as-0.8.4/templates/serviceaccount.yaml @@ -0,0 +1,21 @@ +# INTEL CONFIDENTIAL +# +# Copyright (C) 2022 Intel Corporation. +# +# This software and the related documents are Intel copyrighted materials, and your use of +# them is governed by the express license under which they were provided to you (License). +# Unless the License provides otherwise, you may not use, modify, copy, publish, distribute, +# disclose or transmit this software or the related documents without Intel's prior written permission. +# +# This software and the related documents are provided as is, with no express or implied warranties, +# other than those that are expressly stated in the License. + +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + namespace: {{ .Values.global.namespace.value }} + name: evi-fm-master-as + labels: + account: evi-fm-master-as + diff --git a/charts/evi-fm-master-as-0.8.4/values.yaml b/charts/evi-fm-master-as-0.8.4/values.yaml new file mode 100644 index 0000000..c7b0aee --- /dev/null +++ b/charts/evi-fm-master-as-0.8.4/values.yaml @@ -0,0 +1,50 @@ +# INTEL CONFIDENTIAL +# +# Copyright (C) 2022 Intel Corporation. +# +# This software and the related documents are Intel copyrighted materials, and your use of +# them is governed by the express license under which they were provided to you (License). +# Unless the License provides otherwise, you may not use, modify, copy, publish, distribute, +# disclose or transmit this software or the related documents without Intel's prior written permission. +# +# This software and the related documents are provided as is, with no express or implied warranties, +# other than those that are expressly stated in the License. + +--- +# Default values for fm-master. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +global: + namespace: + create: false + value: fm + istioInjection: + create: false + +istioInjection: true + +configMap: + name: evi-fm-master-as + redis: + redisAddr: tcp://evi-redis-standalone-master.smartedge-apps + redisPort: 6379 + +service: + name: evi-fm-master-as + labels: + value: evi-fm-master-as + +image: + repository: fm-master + version: master-c8d66502f0864e634a642d1062836050248fd81f + pullPolicy: IfNotPresent + containerPort: 8080 + +env: + workerCount: 1 + timeBegin: 1640657550000 + timeEnd: 1640658570000 + allowedCaptureSourceIds: 2