1
0
mirror of synced 2026-02-13 21:16:57 +00:00

Create secret with bearer-token

Signed-off-by: Santosh Kaluskar <dtshbl@gmail.com>
This commit is contained in:
Santosh Kaluskar
2023-02-21 14:27:16 +05:30
parent 0fd8fbe301
commit 5a45d2b127
5 changed files with 34 additions and 3 deletions

View File

@@ -152,6 +152,9 @@ func buildSecret(keypair *ssh.KeyPair, hostKey, caFile, certFile, keyFile, docke
secret.StringData[UsernameSecretKey] = options.Username
secret.StringData[PasswordSecretKey] = options.Password
}
if options.BearerToken != "" {
secret.StringData[BearerTokenKey] = options.BearerToken
}
if len(caFile) != 0 {
secret.StringData[CAFileSecretKey] = string(caFile)