Skip to content

Commit

Permalink
fix: updated some configuration names
Browse files Browse the repository at this point in the history
Signed-off-by: preethi-satishcandra <preethi.satishchandra@intel.com>
  • Loading branch information
presatish committed May 26, 2023
1 parent aef4935 commit a2fd7dc
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 21 deletions.
12 changes: 6 additions & 6 deletions application-services/custom/camera-management/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,17 +161,17 @@ make run-edge-video-analytics

```yaml
InsecureSecrets:
CameraCredentials:
SecretName: CameraCredentials
onvifCredentials:
SecretName: onvifAuth
SecretData:
username: "<username>"
password: "<password>"
```

Option 2: Export environment variable overrides
```shell
export WRITABLE_INSECURESECRETS_CAMERACREDENTIALS_SECRETDATA_USERNAME="<username>"
export WRITABLE_INSECURESECRETS_CAMERACREDENTIALS_SECRETDATA_PASSWORD="<password>"
export WRITABLE_INSECURESECRETS_ONVIFAUTH_SECRETDATA_USERNAME="<username>"
export WRITABLE_INSECURESECRETS_ONVIFAUTH_SECRETDATA_PASSWORD="<password>"
```

#### 3.2 (Optional) Configure USB Camera RTSP Credentials.
Expand All @@ -183,8 +183,8 @@ Option 1: Modify the [res/configuration.yaml](res/configuration.yaml) file

```yaml
InsecureSecrets:
rtspauth:
SecretName: rtspauth
usbCredentials:
SecretName: rtspAuth
SecretData:
username: "<username>"
password: "<password>"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
)

const (
rtspauth = "rtspauth"
CameraCredentials = "CameraCredentials"
rtspAuth = "rtspAuth"
onvifAuth = "onvifAuth"
)

// tryGetCredentials will attempt one time to get the camera credentials from the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,16 +111,16 @@ func (app *CameraManagementApp) startPipeline(deviceName string, sr StartPipelin
}
app.lc.Infof("Received stream uri for the device %s: %s", deviceName, streamUri)

// set the secret name to be the onvif credentials by default
secretName := CameraCredentials
// set the secret name to be the onvif one by default
secretName := onvifAuth
// if device is usb camera, start streaming first
if sr.USB != nil {
_, err := app.startStreaming(deviceName, *sr.USB)
if err != nil {
return errors.Wrapf(err, "failed to start streaming usb camera %s", deviceName)
}
// for usb cameras, use the rtspauth credentials instead
secretName = rtspauth
// for usb cameras, use the rtspAuth instead
secretName = rtspAuth
}

body, err := app.createPipelineRequestBody(streamUri, deviceName, secretName)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,24 @@ Writable:
LogLevel: INFO

InsecureSecrets:
# TODO: Enter your camera's credentials here.
# TODO: Enter your device-onvif-camera credentials here.
# NOTE: currently this solution is limited to supporting only 1 username/password combination
# for ALL cameras. In the future when then device-onvif-camera service is able to provide
# us with pre-authenticated uris, this can be removed.
CameraCredentials:
SecretName: CameraCredentials
onvifCredentials:
# Do not modify the SecretName, only add the username and password
SecretName: onvifAuth
SecretData:
username: ""
password: ""
username: "admin007"
password: "admin007"

# TODO: Enter your device-usb-camera RTSP server credentials here.
rtspauth:
SecretName: rtspauth
usbCredentials:
# Do not modify the SecretName, only add the username and password
SecretName: rtspAuth
SecretData:
username: ""
password: ""
username: "admin007"
password: "admin007"

Telemetry:
Interval: 0s # Disables reporting of metrics
Expand Down

0 comments on commit a2fd7dc

Please sign in to comment.