mirror of
https://github.com/k3s-io/k3s.git
synced 2026-06-08 16:26:16 -04:00
Create node-password secrets with custom Type
Allows list/watch node password secrets with fieldselector Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
This commit is contained in:
parent
d622b18c20
commit
139d64c129
1 changed files with 3 additions and 0 deletions
|
|
@ -18,6 +18,8 @@ var (
|
|||
// Hasher provides the algorithm for generating and verifying hashes
|
||||
Hasher = hash.NewSCrypt()
|
||||
ErrVerifyFailed = errVerifyFailed()
|
||||
|
||||
SecretTypeNodePassword = v1.SecretType(version.Program + ".cattle.io/node-password")
|
||||
)
|
||||
|
||||
type passwordError struct {
|
||||
|
|
@ -78,6 +80,7 @@ func Ensure(secretClient coreclient.SecretController, nodeName, pass string) err
|
|||
},
|
||||
Immutable: ptr.To(true),
|
||||
Data: map[string][]byte{"hash": []byte(hash)},
|
||||
Type: SecretTypeNodePassword,
|
||||
})
|
||||
}
|
||||
return err
|
||||
|
|
|
|||
Loading…
Reference in a new issue