Skip to content

Commit

Permalink
Merge pull request #41 from innovatrics/SMAR-3017-add-palms
Browse files Browse the repository at this point in the history
Smar 3017 add palms
  • Loading branch information
egid-fertal-inno authored Dec 23, 2024
2 parents 4c58c3c + d386114 commit 9ab5c67
Show file tree
Hide file tree
Showing 9 changed files with 398 additions and 10 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## [v0.8.9]

### Added

- Added palm feature

### Changed

- Version of SmartFace Platform to 4.29.0
- Version of SmartFace Station to 1.29

## [v0.8.8]

### Changed
Expand Down
12 changes: 6 additions & 6 deletions Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ dependencies:
type: application

keywords:
- Face recognition
- Biometrics
- Face recognition
- Biometrics

sources:
- https://github.com/innovatrics/sf-helm
Expand All @@ -33,9 +33,9 @@ sources:
home: https://www.innovatrics.com/face-recognition-solutions/

maintainers:
- name: Innovatrics
url: https://www.innovatrics.com/
- name: Innovatrics
url: https://www.innovatrics.com/

version: 0.8.8
version: 0.8.9

appVersion: "v5_4.28.2"
appVersion: "v5_4.29.0"
42 changes: 40 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# smartface

![Version: 0.8.8](https://img.shields.io/badge/Version-0.8.8-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v5_4.28.2](https://img.shields.io/badge/AppVersion-v5_4.28.2-informational?style=flat-square)
![Version: 0.8.9](https://img.shields.io/badge/Version-0.8.9-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v5_4.29.0](https://img.shields.io/badge/AppVersion-v5_4.29.0-informational?style=flat-square)

SmartFace is a Scalable Facial Recognition Server Platform Able to Process Multiple Real-Time Video Streams. Currently the helm chart supports edge stream and Lightweight Face Identification System (LFIS) deployments

Expand Down Expand Up @@ -477,6 +477,7 @@ metadata:
| features.multitenancy.enabled | bool | `false` | enabled for multitenant deployment |
| features.objectDetection.enabled | bool | `false` | enable object detector, which can detect objects and pedestrian |
| features.offlineVideoProcessing.enabled | bool | `false` | enable offline video processing services |
| features.palms.enabled | bool | `false` | enable palm detector and palm extractor, which can work with palms |
| global.image.registry | string | `"registry.gitlab.com"` | Overrides the Docker registry globally for all images |
| graphqlApi.annotations | object | `{}` | Annotations for graphqlApi deployment |
| graphqlApi.containerPort | int | `80` | |
Expand Down Expand Up @@ -582,6 +583,43 @@ metadata:
| objectDetector.resources.requests.cpu | string | `"750m"` | |
| objectDetector.resources.requests.memory | string | `"600M"` | |
| objectDetector.tolerations | list | `[]` | |
| palmDetector.annotations | object | `{}` | Annotations for palm-detector deployment |
| palmDetector.image.digest | string | `nil` | Overrides the image tag with an image digest |
| palmDetector.image.pullPolicy | string | `"IfNotPresent"` | Docker image pull policy |
| palmDetector.image.registry | string | `nil` | The Docker registry, overrides `global.image.registry` |
| palmDetector.image.repository | string | `"innovatrics/smartface/sf-palm-detector"` | Docker image repository |
| palmDetector.image.tag | string | `nil` | Overrides the image tag whose default is the chart's appVersion |
| palmDetector.name | string | `"palm-detector"` | |
| palmDetector.nodeSelector | object | `{}` | |
| palmDetector.pdb.create | bool | `false` | create PodDisruptionBudget for palm-detector component |
| palmDetector.pdb.maxUnavailable | string | `""` | |
| palmDetector.pdb.minAvailable | int | `1` | |
| palmDetector.podAnnotations | object | `{}` | Annotations for palm-detector pods |
| palmDetector.podLabels | object | `{}` | Additional labels for each palm-detector pod |
| palmDetector.replicas | int | `1` | number of replicas to use when autoscaling is not enabled for this component |
| palmDetector.resources.limits.memory | string | `"1500M"` | |
| palmDetector.resources.requests.cpu | string | `"750m"` | |
| palmDetector.resources.requests.memory | string | `"600M"` | |
| palmDetector.tolerations | list | `[]` | |
| palmDetector.warmupDetectionAlgorithms | list | `["balanced_mask"]` | Determines which face detection models are loaded at startup. You can specify one or more detection modes. |
| palmExtractor.annotations | object | `{}` | Annotations for palm-extractor deployment |
| palmExtractor.image.digest | string | `nil` | Overrides the image tag with an image digest |
| palmExtractor.image.pullPolicy | string | `"IfNotPresent"` | Docker image pull policy |
| palmExtractor.image.registry | string | `nil` | The Docker registry, overrides `global.image.registry` |
| palmExtractor.image.repository | string | `"innovatrics/smartface/sf-palm-extractor"` | Docker image repository |
| palmExtractor.image.tag | string | `nil` | Overrides the image tag whose default is the chart's appVersion |
| palmExtractor.name | string | `"palm-extractor"` | |
| palmExtractor.nodeSelector | object | `{}` | |
| palmExtractor.pdb.create | bool | `false` | create PodDisruptionBudget for palm-extractor component |
| palmExtractor.pdb.maxUnavailable | string | `""` | |
| palmExtractor.pdb.minAvailable | int | `1` | |
| palmExtractor.podAnnotations | object | `{}` | Annotations for palm-extractor pods |
| palmExtractor.podLabels | object | `{}` | Additional labels for each palm-extractor pod |
| palmExtractor.replicas | int | `1` | number of replicas to use when autoscaling is not enabled for this component |
| palmExtractor.resources.limits.memory | string | `"1G"` | |
| palmExtractor.resources.requests.cpu | string | `"750m"` | |
| palmExtractor.resources.requests.memory | string | `"500M"` | |
| palmExtractor.tolerations | list | `[]` | |
| podAnnotations | object | `{}` | Common annotations for all pods |
| podLabels | object | `{}` | Common labels for all pods |
| postgresql | object | `{"enabled":true,"primary":{"initdb":{"scripts":{"create-database.sql":"CREATE DATABASE smartface"}}}}` | config for postgresql subchart, see https://github.com/bitnami/charts/tree/main/bitnami/postgresql |
Expand Down Expand Up @@ -654,7 +692,7 @@ metadata:
| station.image.pullPolicy | string | `"IfNotPresent"` | Docker image pull policy |
| station.image.registry | string | `nil` | The Docker registry, overrides `global.image.registry` |
| station.image.repository | string | `"innovatrics/smartface/sf-station"` | Docker image repository |
| station.image.tag | string | `"v5_1.28.0"` | Smartface Station follows different versioning, so the chart app needs to be overridden |
| station.image.tag | string | `"v5_1.29.0"` | Smartface Station follows different versioning, so the chart app needs to be overridden |
| station.name | string | `"station"` | |
| station.nodeSelector | object | `{}` | |
| station.podAnnotations | object | `{}` | Annotations for station pods |
Expand Down
55 changes: 55 additions & 0 deletions templates/_components.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,61 @@ Template used for resolving selector labels for VideoReader component
app.kubernetes.io/component: "VideoReader"
{{- end -}}

{{/*
[palm detector]
*/}}
{{/*
Template used for resolving palm detector name
*/}}
{{- define "smartface.palmDetector.name" }}
{{- $prefix := include "smartface.name" . -}}
{{- $suffix := .Values.palmDetector.name -}}
{{- printf "%s-%s" $prefix $suffix -}}
{{- end -}}

{{/*
Template used for resolving labels for palm detector component
*/}}
{{- define "smartface.palmDetector.labels" }}
{{- include "smartface.labels" . }}
app.kubernetes.io/component: "palmDetector"
{{- end -}}

{{/*
Template used for resolving selector labels for palm detector component
*/}}
{{- define "smartface.palmDetector.selectorLabels" }}
{{- include "smartface.selectorLabels" . }}
app.kubernetes.io/component: "palmDetector"
{{- end -}}

{{/*
[palm extractor]
*/}}
{{/*
Template used for resolving palm extractor name
*/}}
{{- define "smartface.palmExtractor.name" }}
{{- $prefix := include "smartface.name" . -}}
{{- $suffix := .Values.palmExtractor.name -}}
{{- printf "%s-%s" $prefix $suffix -}}
{{- end -}}

{{/*
Template used for resolving labels for palm extractor component
*/}}
{{- define "smartface.palmExtractor.labels" }}
{{- include "smartface.labels" . }}
app.kubernetes.io/component: "palmExtractor"
{{- end -}}

{{/*
Template used for resolving selector labels for palm extractor component
*/}}
{{- define "smartface.palmExtractor.selectorLabels" }}
{{- include "smartface.selectorLabels" . }}
app.kubernetes.io/component: "palmExtractor"
{{- end -}}

{{/*
countlyPublisher
Expand Down
78 changes: 78 additions & 0 deletions templates/palms/palm-detector-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{{- if .Values.features.palms }}
{{- $name := include "smartface.palmDetector.name" . -}}
{{- $selectorLabels := include "smartface.palmDetector.selectorLabels" . -}}
apiVersion: "apps/v1"
kind: "Deployment"
metadata:
name: {{ $name | quote }}
labels:
{{ include "smartface.palmDetector.labels" . | nindent 4 }}
annotations:
{{- with .Values.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.palmDetector.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.palmDetector.replicas }}
{{- if .Values.revisionHistoryLimit }}
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
{{- end }}
{{- if .Values.updateStrategy }}
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
{{- end }}
selector:
matchLabels:
{{- $selectorLabels | nindent 6 }}
template:
metadata:
annotations:
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.palmDetector.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- $selectorLabels | nindent 8 }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.palmDetector.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
serviceAccountName: {{ .Values.serviceAccount.name | quote }}
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
topologySpreadConstraints:
{{- include "smartface.topologySpread" (dict "selectorLabels" $selectorLabels ) | nindent 8 }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ $name | quote }}
image: {{ include "smartface.image" (dict "local" .Values.palmDetector.image "global" .Values.global.image "defaultVersion" .Chart.AppVersion) }}
imagePullPolicy: {{ .Values.palmDetector.image.pullPolicy }}
env:
{{- include "smartface.commonEnv" . | nindent 8 }}
{{- include "smartface.rmqConfig" . | nindent 8 }}
{{- with .Values.palmDetector.extraVars }}
{{- toYaml . | nindent 8 }}
{{- end }}
resources:
{{- toYaml .Values.palmDetector.resources | nindent 10 }}
volumeMounts:
{{- include "smartface.licVolumeMount" . | nindent 8 }}
volumes:
{{- include "smartface.licVolume" . | nindent 8 }}
{{- with .Values.palmDetector.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.palmDetector.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
18 changes: 18 additions & 0 deletions templates/palms/palm-detector-pdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{{- if .Values.palmDetector.pdb.create }}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ include "smartface.palmDetector.name" . | quote }}
labels:
{{- include "smartface.palmDetector.labels" . | nindent 4 }}
spec:
{{- if .Values.palmDetector.pdb.minAvailable }}
minAvailable: {{ .Values.palmDetector.pdb.minAvailable }}
{{- end }}
{{- if .Values.palmDetector.pdb.maxUnavailable }}
maxUnavailable: {{ .Values.palmDetector.pdb.maxUnavailable }}
{{- end }}
selector:
matchLabels:
{{- include "smartface.palmDetector.selectorLabels" . | nindent 6 }}
{{- end }}
78 changes: 78 additions & 0 deletions templates/palms/palm-extractor-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{{- if .Values.features.palms }}
{{- $name := include "smartface.palmExtractor.name" . -}}
{{- $selectorLabels := include "smartface.palmExtractor.selectorLabels" . -}}
apiVersion: "apps/v1"
kind: "Deployment"
metadata:
name: {{ $name | quote }}
labels:
{{ include "smartface.palmExtractor.labels" . | nindent 4 }}
annotations:
{{- with .Values.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.palmExtractor.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.palmExtractor.replicas }}
{{- if .Values.revisionHistoryLimit }}
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
{{- end }}
{{- if .Values.updateStrategy }}
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
{{- end }}
selector:
matchLabels:
{{- $selectorLabels | nindent 6 }}
template:
metadata:
annotations:
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.palmExtractor.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- $selectorLabels | nindent 8 }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.palmExtractor.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
serviceAccountName: {{ .Values.serviceAccount.name | quote }}
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
topologySpreadConstraints:
{{- include "smartface.topologySpread" (dict "selectorLabels" $selectorLabels ) | nindent 8 }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ $name | quote }}
image: {{ include "smartface.image" (dict "local" .Values.palmExtractor.image "global" .Values.global.image "defaultVersion" .Chart.AppVersion) }}
imagePullPolicy: {{ .Values.palmExtractor.image.pullPolicy }}
env:
{{- include "smartface.commonEnv" . | nindent 8 }}
{{- include "smartface.rmqConfig" . | nindent 8 }}
{{- with .Values.palmExtractor.extraVars }}
{{- toYaml . | nindent 8 }}
{{- end }}
resources:
{{- toYaml .Values.palmExtractor.resources | nindent 10 }}
volumeMounts:
{{- include "smartface.licVolumeMount" . | nindent 8 }}
volumes:
{{- include "smartface.licVolume" . | nindent 8 }}
{{- with .Values.palmExtractor.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.palmExtractor.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
18 changes: 18 additions & 0 deletions templates/palms/palm-extractor-pdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{{- if .Values.palmExtractor.pdb.create }}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ include "smartface.palmExtractor.name" . | quote }}
labels:
{{- include "smartface.palmExtractor.labels" . | nindent 4 }}
spec:
{{- if .Values.palmExtractor.pdb.minAvailable }}
minAvailable: {{ .Values.palmExtractor.pdb.minAvailable }}
{{- end }}
{{- if .Values.palmExtractor.pdb.maxUnavailable }}
maxUnavailable: {{ .Values.palmExtractor.pdb.maxUnavailable }}
{{- end }}
selector:
matchLabels:
{{- include "smartface.palmExtractor.selectorLabels" . | nindent 6 }}
{{- end }}
Loading

0 comments on commit 9ab5c67

Please sign in to comment.