Skip to content

Commit

Permalink
feat(app) frigate: add SSL certificate configuration options and upda…
Browse files Browse the repository at this point in the history
…te templates (#1502)

* feat(app) frigate: add SSL certificate configuration options and update templates

* feat(apps): frigate: add HTTPS configuration test with SSL certificate support

* chore(app): bump frigate version to 1.1.15
  • Loading branch information
salekseev authored Jan 30, 2025
1 parent 0af577d commit c28cc8b
Show file tree
Hide file tree
Showing 5 changed files with 147 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ix-dev/community/frigate/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ sources:
- https://github.com/blakeblackshear/frigate
title: Frigate
train: community
version: 1.1.14
version: 1.1.15
2 changes: 2 additions & 0 deletions ix-dev/community/frigate/ix_values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ consts:
notes_body: |
Default credentials are printed in the logs
during the first run of the application.
ssl_key_path: /etc/letsencrypt/live/frigate/privkey.pem
ssl_cert_path: /etc/letsencrypt/live/frigate/fullchain.pem
8 changes: 8 additions & 0 deletions ix-dev/community/frigate/questions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,14 @@ questions:
required: true
$ref:
- definitions/port
- variable: certificate_id
label: Certificate
description: The certificate to use for Frigate.
schema:
type: int
"null": true
$ref:
- "definitions/certificate"

- variable: storage
label: ""
Expand Down
6 changes: 6 additions & 0 deletions ix-dev/community/frigate/templates/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@
{% endif %}
{% endif %}

{% if values.network.certificate_id %}
{% set cert = values.ix_certificates[values.network.certificate_id] %}
{% do c1.configs.add("private", cert.privatekey, values.consts.ssl_key_path) %}
{% do c1.configs.add("public", cert.certificate, values.consts.ssl_cert_path) %}
{% endif %}

{% do tpl.portals.add_portal({"port": values.consts.internal_web_port if values.network.host_network else values.network.web_port, "scheme": "https"}) %}
{% if values.network.enable_no_auth %}
{% do tpl.portals.add_portal({"name": "Web UI (No Auth)", "port": values.consts.internal_no_auth_port if values.network.host_network else values.network.no_auth_port}) %}
Expand Down
130 changes: 130 additions & 0 deletions ix-dev/community/frigate/templates/test_values/https-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
resources:
limits:
cpus: 2.0
memory: 4096

frigate:
image_selector: image
shm_size_mb: 64
mount_usb_bus: false
additional_envs: []

network:
host_network: false
web_port: 8081
enable_no_auth: true
no_auth_port: 8080
enable_rtsp: true
rtsp_port: 8554
enable_webrtc: true
webrtc_port: 8082
enable_go2rtc: true
go2rtc_port: 8083
certificate_id: "2"

ix_volumes:
frigate-config: /opt/tests/mnt/config
frigate-media: /opt/tests/mnt/media

storage:
config:
type: ix_volume
ix_volume_config:
dataset_name: frigate-config
create_host_path: true
media:
type: ix_volume
ix_volume_config:
dataset_name: frigate-media
create_host_path: true
cache:
type: tmpfs
tmpfs_config:
size: 1024
additional_storage: []

ix_certificates:
"2":
certificate: |
-----BEGIN CERTIFICATE-----
MIIEdjCCA16gAwIBAgIDYFMYMA0GCSqGSIb3DQEBCwUAMGwxDDAKBgNVBAMMA2Fz
ZDELMAkGA1UEBhMCVVMxDTALBgNVBAgMBGFzZGYxCzAJBgNVBAcMAmFmMQ0wCwYD
VQQKDARhc2RmMQwwCgYDVQQLDANhc2QxFjAUBgkqhkiG9w0BCQEWB2FAYS5jb20w
HhcNMjEwODMwMjMyMzU0WhcNMjMxMjAzMjMyMzU0WjBuMQswCQYDVQQDDAJhZDEL
MAkGA1UEBhMCVVMxDTALBgNVBAgMBGFzZGYxDTALBgNVBAcMBGFzZGYxDTALBgNV
BAoMBGFkc2YxDTALBgNVBAsMBGFzZGYxFjAUBgkqhkiG9w0BCQEWB2FAYS5jb20w
ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC7+1xOHRQyOnQTHFcrdasX
Zl0gzutVlA890a1wiQpdD5dOtCLo7+eqVYjqVKo9W8RUIArXWmBu/AbkH7oVFWC1
P973W1+ArF5sA70f7BZgqRKJ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