PublicKeyFromKeyRef resolves a public key from either a file path or a Kubernetes secret reference. This provides a consistent interface with PrivateKeyFromKeyRef. Supported formats: - File path: "/path/to/public-key.pem" - Kubernetes secret: "k8s://namespace/secret-name/key-field" (explicit key fie
(ctx context.Context, keyRef string, fs afero.Fs)
| 53 | // - Kubernetes secret: "k8s://namespace/secret-name/key-field" (explicit key field) |
| 54 | // - Kubernetes secret: "k8s://namespace/secret-name" (auto-select if single key exists) |
| 55 | func PublicKeyFromKeyRef(ctx context.Context, keyRef string, fs afero.Fs) ([]byte, error) { |
| 56 | return KeyFromKeyRef(ctx, keyRef, fs) |
| 57 | } |
| 58 | |
| 59 | // keyFromFile reads a key from the filesystem |
| 60 | func keyFromFile(keyPath string, fs afero.Fs) ([]byte, error) { |