Skip to content

Commit

Permalink
Merge pull request #3 from innovatrics/feature/minor-improvements
Browse files Browse the repository at this point in the history
Helm chart standardization
  • Loading branch information
blaskoa authored Oct 31, 2023
2 parents d3e8d17 + 3f00f8c commit ddfbc2a
Show file tree
Hide file tree
Showing 56 changed files with 2,133 additions and 543 deletions.
5 changes: 5 additions & 0 deletions .helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Match any file or path named .helmignore
.helmignore

# Match any file or path named .git
.git
31 changes: 27 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,35 @@
# Changelog

## [v1.0.0] - TBD
## [v0.4.0]

### Added
- Common labels with option to specify custom labels/annotation for objects
- PodDisruptionBudgets for deployments that can be scaled
- Support for custom KEDA triggers
- Existing configmap for rabbitMQ and S3 is no longer necessary and the chart can create them from provided values, which is also the new default behavior for S3

### Breaking change
- Changed default behavior for creating S3 configuration. If you like to continue managing the previously created S3 config map please use the `configurations.s3.existingConfigMapName` field. Otherwise the ConfigMap will be managed by the helm chart using the values provided in `configurations.s3`
- The ConfigMap keys for existing config map are no longer configurable, so if you want to keep using the ConfigMap not managed by this chart then please make sure that the key match what the helm chart expects
- Some values have had their keys changed or moved around:
- database secret -> value key changed from `configurations.database.secretName` to `configurations.database.existingSecretName`
- rmq secret values moved to auth parent object -> from `rabbitmq.existingSecretName` to `rabbitmq.auth.existingSecretName` and `rabbitmq.secretKey` to `rabbitmq.auth.secretKey`
- rmq configuration reworked -> value key `rabbitmq.configMapName` and `rabbitmq.mqttConfigMapName` replaced with `existingConfigMapName` key in `rabbitmq.rmqConfiguration` and `rabbitmq.mqttConfiguration` objects respectively
- mqtt dns host configuration changed -> value key `rabbitmq.mqttDnsHost` replaced with object with key `rabbitmq.mqttPublicService` that can be disabled
- deployment selectors changed
- autoscaling configuration reworked -> moved rmq and cron configuration related to services their respective sub-objects e.g. for detector from `autoscaling.detector` to `autoscaling.cron.detector` and `autoscaling.rmq.detector`
- Deployment label selectors and pod labels were modified to use a more standardized approach. Unfortunately since label selector are immutable and thus the helm release cannot be upgraded. Please first use `helm uninstall` and a fresh `helm install` for upgrading. For more information see the [official documentation](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#label-selector-updates)

## [v0.3.0]

### Added
- Support for pushing watchlist data to edge streams via EdgeStreamsStateSynchronizer

## [v0.2.0]

### Added
- Initial implementation
- Chart can be configured to support following scenarios:
- Lightweight Face Identification System (LFIS) - single-tenant and multi-tenant
- Edge stream processing - single tenant only
- Lightweight Face Identification System (LFIS) - single-tenant and multi-tenant
- Edge stream processing - single tenant only
- Chart can be configured to use externally-managed rabbitmq (e.g. [AmazonMQ](https://aws.amazon.com/amazon-mq/)) or deploy a rabbitmq [subchart](https://github.com/bitnami/charts/tree/main/bitnami/rabbitmq)
- Support for pushing watchlist data to edge streams via EdgeStreamsStateSynchronizer
6 changes: 3 additions & 3 deletions Chart.lock
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
dependencies:
- name: sf-tenant-operator
repository: oci://ghcr.io/innovatrics/sf-helm
version: 0.1.1
version: 0.2.0
- name: rabbitmq
repository: oci://registry-1.docker.io/bitnamicharts
version: 12.0.4
digest: sha256:27524f3d7de75da9a074f0771a5c907d03c08fbf52abe4e3971c7c84f5f1be82
generated: "2023-09-26T16:28:51.468868+02:00"
digest: sha256:15d5ba64f57411a0eebebdd610f019a86846d03d23278beb2c1765daf8137442
generated: "2023-10-19T16:46:51.767222+02:00"
4 changes: 2 additions & 2 deletions Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: SmartFace is a Scalable Facial Recognition Server Platform Able to

dependencies:
- name: sf-tenant-operator
version: "0.1.1"
version: "0.2.0"
repository: "oci://ghcr.io/innovatrics/sf-helm"
condition: features.multitenancy.enabled
- name: rabbitmq
Expand All @@ -28,6 +28,6 @@ maintainers:
- name: Innovatrics
url: https://www.innovatrics.com/

version: 0.3.0
version: 0.4.0

appVersion: "v5_4.22.0"
247 changes: 186 additions & 61 deletions README.md

Large diffs are not rendered by default.

52 changes: 31 additions & 21 deletions README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,23 @@ helm install smartface oci://ghcr.io/innovatrics/sf-helm/smartface
The helm chart needs certain objects to be present in the cluster before it can be installed. Refer to `external-config.yaml` for examples for the required objects:

1. [Registry credentials secret](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-secret-by-providing-credentials-on-the-command-line)
- Get the credentials from [Customer portal](https://customerportal.innovatrics.com)
- The secret name must match `imagePullSecrets` value
- see comments in `external-config.yaml` for commands to create kubernetes manifest with credentials
- Get the credentials from [Customer portal](https://customerportal.innovatrics.com)
- The secret name must match `imagePullSecrets` value
- see comments in `external-config.yaml` for commands to create kubernetes manifest with credentials
1. License file secret
- Get the license file from [Customer portal](https://customerportal.innovatrics.com)
- The secret name must match `license.secretName` value
- see comments in `external-config.yaml` for commands to create kubernetes manifest with license file
- Get the license file from [Customer portal](https://customerportal.innovatrics.com)
- The secret name must match `license.secretName` value
- see comments in `external-config.yaml` for commands to create kubernetes manifest with license file
1. S3 bucket
- Create an S3 bucket
- Create a ConfigMap - see `external-config.yaml` for example
- ConfigMap name must match `configurations.s3.configName` value
- keys in the ConfigMap must match `configurations.s3.*Key` values
- Create an S3 bucket
- Configure details of S3 bucket by supplying values to object `configurations.s3`
1. pgsql server
- Create a PgSql server
- Create a Secret - see `external-config.yaml` for example
- Secret name must match `configurations.database.secretName` value
- key in the Secret must match `configurations.database.connectionStringKey` value
- Create a PgSql server
- Create a Secret - see `external-config.yaml` for example
- Secret name must match `configurations.database.secretName` value
- key in the Secret must match `configurations.database.connectionStringKey` value
1. Optionally [KEDA](https://keda.sh/) for autoscaling
- see `autoscaling.*` values for more info
- see `autoscaling.*` values for more info

## Ingress

Expand All @@ -49,12 +47,13 @@ All chart dependencies are optional and can be disabled and supplemented with ot
### RabbitMQ
To use non-chart managed rabbitmq:
- set `rabbitmq.enabled=false`
- create ConfigMap with rabbitmq connection details
- ConfigMap name must match `rabbitmq.configMapName` value
- see Sample objects for example
- provide rabbitmq configuration via:
- supplying values to `rabbitmq.rmqConfiguration` object
- or creating ConfigMap and setting `rabbitmq.rmqConfiguration.existingConfigMapName`
- see Sample objects for example
- create Secret with rabbitmq password
- supply `rabbitmq.existingSecretName` value with name of existing secret
- see Sample objects for example
- supply `rabbitmq.existingSecretName` value with name of existing secret
- see Sample objects for example

#### Sample objects
```
Expand All @@ -67,6 +66,7 @@ data:
username: "<username>"
port: "5671"
useSsl: "true"
streamsPort: "5552"
```

```
Expand All @@ -86,4 +86,14 @@ stringData:

## Breaking changes

Upgrade guide to future major version will be here
### [v0.4.0]
- Changed default behavior for creating S3 configuration. If you like to continue managing the previously created S3 config map please use the `configurations.s3.existingConfigMapName` field. Otherwise the ConfigMap will be managed by the helm chart using the values provided in `configurations.s3`
- The ConfigMap keys for existing config map are no longer configurable, so if you want to keep using the ConfigMap not managed by this chart then please make sure that the key match what the helm chart expects
- Some values have had their keys changed or moved around:
- database secret -> value key changed from `configurations.database.secretName` to `configurations.database.existingSecretName`
- rmq secret values moved to auth parent object -> from `rabbitmq.existingSecretName` to `rabbitmq.auth.existingSecretName` and `rabbitmq.secretKey` to `rabbitmq.auth.secretKey`
- rmq configuration reworked -> value key `rabbitmq.configMapName` and `rabbitmq.mqttConfigMapName` replaced with `existingConfigMapName` key in `rabbitmq.rmqConfiguration` and `rabbitmq.mqttConfiguration` objects respectively
- mqtt dns host configuration changed -> value key `rabbitmq.mqttDnsHost` replaced with object with key `rabbitmq.mqttPublicService` that can be disabled
- deployment selectors changed
- autoscaling configuration reworked -> moved rmq and cron configuration related to services their respective sub-objects e.g. for detector from `autoscaling.detector` to `autoscaling.cron.detector` and `autoscaling.rmq.detector`
- Deployment label selectors and pod labels were modified to use a more standardized approach. Unfortunately since label selector are immutable and thus the helm release cannot be upgraded. Please first use `helm uninstall` and a fresh `helm install` for upgrading. For more information see the [official documentation](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#label-selector-updates)
12 changes: 0 additions & 12 deletions external-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,6 @@ metadata:
name: iface-lic
---
apiVersion: v1
kind: ConfigMap
metadata:
name: "s3-config"
data:
# supply S3 bucket
name: "sf-cm-test"
region: "eu-central-1"
folder: "sface"
authType: "AssumedRole"
useBucketRegion: "true"
---
apiVersion: v1
stringData:
# supply pgsql server
cs: "Server=<hostname>;Database=<db-name>;Username=<username>;Password=<password>;"
Expand Down
Loading

0 comments on commit ddfbc2a

Please sign in to comment.