mirror of
https://github.com/fluxcd/flux2.git
synced 2026-05-06 01:54:43 +00:00
Add flux create secret proxy command
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
parent
e17f3f0168
commit
8470f23ad2
6 changed files with 177 additions and 0 deletions
|
|
@ -31,6 +31,7 @@ const (
|
|||
)
|
||||
|
||||
const (
|
||||
AddressSecretKey = "address"
|
||||
UsernameSecretKey = "username"
|
||||
PasswordSecretKey = "password"
|
||||
CACrtSecretKey = "ca.crt"
|
||||
|
|
@ -73,6 +74,7 @@ type Options struct {
|
|||
BearerToken string
|
||||
VerificationCrts []VerificationCrt
|
||||
TrustPolicy []byte
|
||||
Address string
|
||||
|
||||
// Deprecated: Replaced by CACrt, but kept for backwards compatibility
|
||||
// with deprecated TLS flags.
|
||||
|
|
|
|||
|
|
@ -148,6 +148,10 @@ func buildSecret(keypair *ssh.KeyPair, hostKey, dockerCfg []byte, options Option
|
|||
return
|
||||
}
|
||||
|
||||
if options.Address != "" {
|
||||
secret.StringData[AddressSecretKey] = options.Address
|
||||
}
|
||||
|
||||
if options.Username != "" && options.Password != "" {
|
||||
secret.StringData[UsernameSecretKey] = options.Username
|
||||
secret.StringData[PasswordSecretKey] = options.Password
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue