mirror of
https://github.com/kerberos-io/helm-charts.git
synced 2026-11-25 23:40:24 +00:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bf4c7cbafd |
@@ -16,7 +16,7 @@ type: application
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.208.0
|
||||
version: 0.209.0
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
|
||||
@@ -583,6 +583,44 @@ Both settings default to off; the API setting applies only to Hub API pods in
|
||||
|
||||
Validate rendering with `bash scripts/check-hub-ask.sh` from the repository root.
|
||||
|
||||
### Redaction plans
|
||||
|
||||
A redaction plan is the saved state of the redaction editor for one video: a
|
||||
list of regions to hide, each with its own style (blur, pixelate or black),
|
||||
frame range and positions. With plans the editor is no longer limited to the
|
||||
tracks a detector found, and it keeps a draft per video.
|
||||
|
||||
```yaml
|
||||
kerberoshub:
|
||||
api:
|
||||
redactionPlans:
|
||||
enabled: true
|
||||
```
|
||||
|
||||
One value switches both sides: `REDACTION_PLANS_ENABLED` on Hub API and
|
||||
`FEATURE_REDACTION_PLANS_ENABLED` on the frontend (and the demo frontend). The
|
||||
frontend cannot be switched on without the API. It defaults to off.
|
||||
|
||||
Switch it on only when all three are in place:
|
||||
|
||||
- **Redaction worker:** the `hub-pipeline-redaction` worker that consumes this
|
||||
deployment's redaction queue is newer than v1.2.15. An older worker finds no
|
||||
regions in a plan-only job and stores an unchanged copy of the video as a
|
||||
completed redaction. Check the worker that really renders the jobs: a
|
||||
deployment without its own worker has them rendered by another one on the
|
||||
same queue.
|
||||
- **Hub API:** an image with redaction plans. Until then the variable is
|
||||
ignored and `regions` edits are refused.
|
||||
- **Frontend:** an image with redaction plans. Until then the variable is
|
||||
ignored and the editor works on detector tracks only.
|
||||
|
||||
While it is off, Hub API refuses redaction edits of type `regions` and answers
|
||||
404 on the plan and draft routes. Redactions made from detector tracks work
|
||||
with the setting on or off.
|
||||
|
||||
Validate rendering with `bash scripts/check-hub-redaction-plans.sh` from the
|
||||
repository root.
|
||||
|
||||
### Passkeys
|
||||
|
||||
Users and sub-users can create and manage their own passkeys in **Profile >
|
||||
@@ -969,6 +1007,7 @@ kerberospipeline:
|
||||
| `kerberoshub.api.accountDeletion.enabled` | An owner can delete their own account on the profile page: sets `FEATURE_ACCOUNT_DELETION_ENABLED` on hub-api and the frontend. A deletion locks the account at once and is erased after `graceDays`. An account that is already locked stays locked, and can still be reactivated, when this is switched off again. | `false` |
|
||||
| `kerberoshub.api.accountDeletion.graceDays` | Days a requested deletion can still be cancelled by signing in, 0 to 30 (`ACCOUNT_DELETION_GRACE_DAYS`). | `14` |
|
||||
| `kerberoshub.api.organisationDeletion.enabled` | The primary owner of an organisation can delete it in the organisation settings: sets `FEATURE_ORGANISATION_DELETION_ENABLED` on hub-api and the frontend. A deletion closes the organisation to every member at once and is erased after `accountDeletion.graceDays` by the `kerberoshub.cleanup.accountDeletion.purge` worker; members keep their accounts and their other organisations. An organisation that is already closed stays closed, and its primary owner can still reopen it, when this is switched off again. | `false` |
|
||||
| `kerberoshub.api.redactionPlans.enabled` | Redaction plans: the redaction editor saves and submits a list of regions, each with its own style and frame range, and keeps a draft per video. Sets `REDACTION_PLANS_ENABLED` on hub-api, which then accepts redaction edits of type `regions`, stores their plan and serves the plan and draft routes, and `FEATURE_REDACTION_PLANS_ENABLED` on the frontend. Needs Hub API and frontend images with redaction plans, and a `hub-pipeline-redaction` worker newer than v1.2.15 rendering this deployment's jobs: an older worker finds no regions in such a job and stores an unchanged copy of the video as a completed redaction. While it is off, hub-api refuses `regions` edits and the editor works on detector tracks only. | `false` |
|
||||
| `kerberoshub.api.mediaProxy.enabled` | Serve media through hub-api (`/media/proxy`) instead of handing out Vault/storage URLs, hiding the storage endpoint from clients. | `false` |
|
||||
| `kerberoshub.api.mediaProxy.publicUrl` | Public hub-api base URL used in proxied media URLs. Defaults to `{schema}://{url}`. | `""` |
|
||||
| `kerberoshub.api.mediaProxy.key` | Key used to encrypt proxied media URLs (`openssl rand -hex 32`). Defaults to a key derived from `jwtSecret`. | `""` |
|
||||
|
||||
@@ -462,6 +462,11 @@ spec:
|
||||
- name: FEATURE_ORGANISATION_DELETION_ENABLED
|
||||
value: {{ (.Values.kerberoshub.api.organisationDeletion | default dict).enabled | default false | quote }}
|
||||
|
||||
# Redaction plans: redaction edits of type "regions", their plans and their drafts.
|
||||
# The redaction worker must render plans before this is switched on.
|
||||
- name: REDACTION_PLANS_ENABLED
|
||||
value: {{ (.Values.kerberoshub.api.redactionPlans | default dict).enabled | default false | quote }}
|
||||
|
||||
# Onboarding: /register creates only the account; the organisation comes at first sign-in.
|
||||
# A variable already set in kerberoshub.extraEnv is left to it.
|
||||
{{- $onboarding := (.Values.organisations | default dict).onboarding | default dict }}
|
||||
|
||||
@@ -379,6 +379,9 @@ spec:
|
||||
value: "{{ .Values.kerberoshub.frontend.features.faceRedaction.enabled }}"
|
||||
- name: FEATURE_FACE_REDACTION_CLASSIFIER_TRACKS_ENABLED
|
||||
value: "{{ .Values.kerberoshub.frontend.features.faceRedaction.classifierTracksEnabled }}"
|
||||
# Follows hub-api: the editor only sends redaction plans where the API accepts them.
|
||||
- name: FEATURE_REDACTION_PLANS_ENABLED
|
||||
value: "{{ (.Values.kerberoshub.api.redactionPlans | default dict).enabled | default false }}"
|
||||
|
||||
# features > media
|
||||
- name: FEATURE_MEDIA_FORWARD_ENABLED
|
||||
|
||||
@@ -473,6 +473,9 @@ spec:
|
||||
value: "{{ .Values.kerberoshub.frontend.features.faceRedaction.enabled }}"
|
||||
- name: FEATURE_FACE_REDACTION_CLASSIFIER_TRACKS_ENABLED
|
||||
value: "{{ .Values.kerberoshub.frontend.features.faceRedaction.classifierTracksEnabled }}"
|
||||
# Follows hub-api: the editor only sends redaction plans where the API accepts them.
|
||||
- name: FEATURE_REDACTION_PLANS_ENABLED
|
||||
value: "{{ (.Values.kerberoshub.api.redactionPlans | default dict).enabled | default false }}"
|
||||
|
||||
# features > media
|
||||
- name: FEATURE_MEDIA_FORWARD_ENABLED
|
||||
|
||||
@@ -516,6 +516,15 @@ kerberoshub:
|
||||
# kerberoshub.cleanup.accountDeletion.purge worker does the erasing.
|
||||
organisationDeletion:
|
||||
enabled: false # Serves the delete route on hub-api and shows "Delete organisation" in the frontend.
|
||||
# Redaction plans: the redaction editor saves and submits a list of
|
||||
# regions, each with its own style and frame range, and keeps a draft per
|
||||
# video. hub-api stores the plan and sends it to the redaction worker.
|
||||
# Only switch it on once the hub-pipeline-redaction worker that renders
|
||||
# this deployment's jobs is newer than v1.2.15: an older worker finds no
|
||||
# regions in such a job and stores an unchanged copy of the video as a
|
||||
# completed redaction.
|
||||
redactionPlans:
|
||||
enabled: false # Accepts redaction plans on hub-api (REDACTION_PLANS_ENABLED) and switches the frontend's redaction editor to them (FEATURE_REDACTION_PLANS_ENABLED).
|
||||
mediaProxy:
|
||||
enabled: false
|
||||
publicUrl: "" # Optional override of the public hub-api base URL; defaults to {schema}://{url}.
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
CHART_DIR="${1:-charts/hub}"
|
||||
|
||||
# Prints "<deployment> <variable> <value>" for the redaction plans variables.
|
||||
extract_plans() {
|
||||
awk '
|
||||
/^---/ { deployment=0; name=""; variable="" }
|
||||
/^kind: Deployment$/ { deployment=1 }
|
||||
deployment && /^ name:/ { name=$2 }
|
||||
/- name: (FEATURE_)?REDACTION_PLANS_ENABLED$/ { variable=$3; next }
|
||||
variable != "" && /value:/ {
|
||||
value=$0
|
||||
sub(/^[[:space:]]*value: /, "", value)
|
||||
print name, variable, value
|
||||
variable=""
|
||||
}
|
||||
' | sort
|
||||
}
|
||||
|
||||
assert_plans() {
|
||||
local rendered="$1" expected="$2" actual
|
||||
actual="$(printf '%s\n' "$rendered" | extract_plans)"
|
||||
if [[ "$actual" != "$expected" ]]; then
|
||||
printf 'Unexpected redaction plans environment:\n%s\nExpected:\n%s\n' "$actual" "$expected" >&2
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
off="$(printf '%s\n' \
|
||||
'hub-api REDACTION_PLANS_ENABLED "false"' \
|
||||
'hub-frontend FEATURE_REDACTION_PLANS_ENABLED "false"')"
|
||||
on="$(printf '%s\n' \
|
||||
'hub-api REDACTION_PLANS_ENABLED "true"' \
|
||||
'hub-frontend FEATURE_REDACTION_PLANS_ENABLED "true"')"
|
||||
|
||||
assert_plans "$(helm template hub "$CHART_DIR")" "$off"
|
||||
echo "OK: redaction plans are off by default on hub-api and the frontend"
|
||||
|
||||
assert_plans "$(helm template hub "$CHART_DIR" --set kerberoshub.api.redactionPlans.enabled=true)" "$on"
|
||||
echo "OK: one value switches hub-api and the frontend on together"
|
||||
|
||||
assert_plans "$(helm template hub "$CHART_DIR" --set-string kerberoshub.api.redactionPlans.enabled=true)" "$on"
|
||||
echo "OK: the value may be given as a string"
|
||||
|
||||
assert_plans "$(helm template hub "$CHART_DIR" --set kerberoshub.api.redactionPlans=null)" "$off"
|
||||
echo "OK: values files without a redactionPlans section keep it off"
|
||||
|
||||
# The face redaction flag of the frontend does not switch plans on.
|
||||
assert_plans "$(helm template hub "$CHART_DIR" --set kerberoshub.frontend.features.faceRedaction.enabled=true)" "$off"
|
||||
echo "OK: the face redaction flag alone leaves plans off"
|
||||
|
||||
assert_plans "$(helm template hub "$CHART_DIR" --set kerberoshub.api.redactionPlans.enabled=true \
|
||||
--set kerberoshub.frontend.demoEnabled=true)" "$(printf '%s\n' \
|
||||
'hub-api REDACTION_PLANS_ENABLED "true"' \
|
||||
'hub-frontend FEATURE_REDACTION_PLANS_ENABLED "true"' \
|
||||
'hub-frontend-demo FEATURE_REDACTION_PLANS_ENABLED "true"')"
|
||||
echo "OK: the demo frontend follows the same value"
|
||||
|
||||
[[ -z "$(helm template hub "$CHART_DIR" --set mode=pipeline --set kerberoshub.api.redactionPlans.enabled=true | extract_plans)" ]]
|
||||
echo "OK (pipeline): no redaction plans environment"
|
||||
|
||||
helm lint "$CHART_DIR" --quiet --set kerberoshub.api.redactionPlans.enabled=true
|
||||
echo "All Hub redaction plans checks passed."
|
||||
Reference in New Issue
Block a user