This repository has been archived by the owner on Jun 13, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow the user to specify individual credentials on the command line
e.g. docker app install --credential name=somevalue bundle.json Credentials added with `--credential` always come after those added with `--credential-set` (irrespective of the order on the command line). A credential specified with `--credential` cannot override any previous credential, including those specified in a credential set. The test bnudle used is based on https://github.com/deislabs/example-bundles/blob/0e8af9a2f1270bd72045a515637a432e74743d5d/example-credentials/bundle.json But with `cnab/example-credentials:latest` → a digested ref (with the digest I pulled today) Signed-off-by: Ian Campbell <ijc@docker.com>
- Loading branch information
Ian Campbell
committed
May 3, 2019
1 parent
137c8cd
commit b3daa6d
Showing
10 changed files
with
208 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"name": "example-credentials", | ||
"version": "0.0.1", | ||
"schemaVersion": "v1.0.0-WD", | ||
"invocationImages": [ | ||
{ | ||
"imageType": "docker", | ||
"image": "cnab/example-credentials@sha256:b93f7279bdc9610d4ef275dab5d0a1d19cc613a784e2522977866747090059f4" | ||
} | ||
], | ||
"credentials": { | ||
"secret1": { | ||
"env" :"SECRET_ONE" | ||
}, | ||
"secret2": { | ||
"path": "/var/secret_two/data.txt" | ||
}, | ||
"secret3": { | ||
"env": "SECRET_THREE", | ||
"path": "/var/secret_three/data.txt" | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
SECRET_ONE: foo | ||
/var/secret_two/data.txt | ||
bar | ||
SECRET_THREE: baz | ||
/var/secret_three/data.txt | ||
baz | ||
Application "full" installed on context "default" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
bundle requires credential for secret2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
SECRET_ONE: secret1value | ||
/var/secret_two/data.txt | ||
secret2value | ||
SECRET_THREE: xyzzy | ||
/var/secret_three/data.txt | ||
xyzzy | ||
Application "mixed" installed on context "default" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ambiguous credential resolution: "secret1" is already present in base credential sets, cannot merge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters