-
Notifications
You must be signed in to change notification settings - Fork 37
feat(snap): support service secrets file config #151
Conversation
Signed-off-by: Farshid Tavakolizadeh <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #151 +/- ##
=====================================
Coverage 3.79% 3.79%
=====================================
Files 3 3
Lines 606 606
=====================================
Hits 23 23
Misses 583 583 Continue to review full report at Codecov.
|
Signed-off-by: Farshid Tavakolizadeh <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I tested this by
- Creating a test.json file as per feat: Add optional capability to seed service secrets go-mod-bootstrap#276
- Copying that file to /var/snap/edgex-device-camera/current
sudo snap set edgex-device-camera env.secret-store.secrets-file="/var/snap/edgex-device-camera/current/test.json"
sudo snap set edgex-device-camera env.secret-store.disable-scrub-secrets-file=true
- starting up the snap, confirming that the secrets get read in and processed. They also get overwritten, unless I set disable-scrub-secrets.
I used these steps:
and I didnt got the error as yours (failed to create SecretProvider), instead I got a warning: failure while creating SecretClient.
|
That is because it's not the secrets-token.json file that we are using, but a file with secrets for the camera. So you need to create a file in `/var/snap/edgex-device-camera/current/test.json' containing:
and then set
That should work! |
Thanks for your hints@siggiskulason! It works for me as well now. |
This change would enable setting snap config arguments for the secrets file feature added by edgexfoundry/go-mod-bootstrap#276.
It adds support for the following config items:
Package updates are added by canonical/edgex-snap-hooks#13.
There are also some minor updates and fixes to the snap/README.md
Signed-off-by: Farshid Tavakolizadeh [email protected]
If your build fails due to your commit message not passing the build checks, please review the guidelines here: https://github.com/edgexfoundry/device-camera-go/blob/main/.github/Contributing.md
PR Checklist
Please check if your PR fulfills the following requirements:
BREAKING CHANGE:
describing the break)Testing Instructions
New Dependency Instructions (If applicable)