From 139d64c1293067118b934449b0760d3065669c04 Mon Sep 17 00:00:00 2001 From: Brad Davidson Date: Tue, 21 Oct 2025 19:14:30 +0000 Subject: [PATCH] Create node-password secrets with custom Type Allows list/watch node password secrets with fieldselector Signed-off-by: Brad Davidson --- pkg/nodepassword/nodepassword.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/nodepassword/nodepassword.go b/pkg/nodepassword/nodepassword.go index 159d6b6ce2d..07a0c898083 100644 --- a/pkg/nodepassword/nodepassword.go +++ b/pkg/nodepassword/nodepassword.go @@ -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