Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Onvif discovery handler authenticated discovery #638

Merged
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 36 additions & 0 deletions deployment/helm/templates/onvif-configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,42 @@ spec:
items: []
{{- end }}
discoveryTimeoutSeconds: {{ .Values.onvif.configuration.discoveryDetails.discoveryTimeoutSeconds }}
{{- if .Values.onvif.configuration.discoveryProperties}}
discoveryProperties:
{{- range $property := .Values.onvif.configuration.discoveryProperties }}
- name: {{ $property.name }}
{{- if $property.valueFrom }}
valueFrom:
{{- if $property.valueFrom.secretKeyRef }}
secretKeyRef:
name: {{ $property.valueFrom.secretKeyRef.name }}
{{- if $property.valueFrom.secretKeyRef.namespace }}
namespace: {{ $property.valueFrom.secretKeyRef.namespace }}
{{- end }}
{{- if $property.valueFrom.secretKeyRef.key }}
key: {{ $property.valueFrom.secretKeyRef.key }}
{{- end }}
{{- if hasKey $property.valueFrom.secretKeyRef "optional" }}
optional: {{ $property.valueFrom.secretKeyRef.optional }}
{{- end }}
{{- else if $property.valueFrom.configMapKeyRef}}
configMapKeyRef:
name: {{ $property.valueFrom.configMapKeyRef.name }}
{{- if $property.valueFrom.configMapKeyRef.namespace }}
namespace: {{ $property.valueFrom.configMapKeyRef.namespace }}
{{- end }}
{{- if $property.valueFrom.configMapKeyRef.key }}
key: {{ $property.valueFrom.configMapKeyRef.key }}
{{- end }}
{{- if hasKey $property.valueFrom.configMapKeyRef "optional" }}
optional: {{ $property.configMapKeyRef.optional }}
{{- end }}
{{- end }}
{{- else }}
value: {{ $property.value | quote }}
{{- end }}
{{- end }}
{{- end }}
{{- if or .Values.onvif.configuration.brokerPod.image.repository .Values.onvif.configuration.brokerJob.image.repository }}
{{- /* Only add brokerSpec if a broker image is provided */}}
brokerSpec:
Expand Down
3 changes: 3 additions & 0 deletions deployment/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,9 @@ onvif:
action: Exclude
items: []
discoveryTimeoutSeconds: 1
# discoveryProperties is a map of properties fthat will be passed to discovery handler,
# the properties can be direct specified or read from Secret or ConfigMap
discoveryProperties:
# capacity is the capacity for any instances created as a result of
# applying this onvif configuration
capacity: 1
Expand Down
3 changes: 3 additions & 0 deletions discovery-handlers/onvif/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ akri-discovery-utils = { path = "../../discovery-utils" }
akri-shared = { path = "../../shared" }
anyhow = "1.0.38"
async-trait = "0.1.0"
base64 = "0.13.1"
bytes = "1.0.1"
chrono = "0.4.10"
env_logger = "0.10.0"
futures-util = "0.3"
hyper = { version = "0.14.11", package = "hyper" }
Expand All @@ -21,6 +23,7 @@ serde = "1.0.104"
serde_json = "1.0.45"
serde_yaml = "0.8.11"
serde_derive = "1.0.104"
sha1 = "0.6.1"
sxd-document = "0.3.0"
sxd-xpath = "0.4.0"
tokio = { version = "1.0", features = ["time", "net", "sync"] }
Expand Down
Loading
Loading