Documentation ¶
Overview ¶
Package backend provides CRUD for the secrets
Index ¶
Constants ¶
View Source
const ( // DefaultRequestTimeout for k8s requests DefaultRequestTimeout = 5 * time.Second // AnnotationKey is the name of the secfs annotation AnnotationKey = "secfs" // AnnotationValue is the secfs version AnnotationValue = "v1" // ModTimeKey is the name of the modification time annotation ModTimeKey = "modtime" )
View Source
const ( FakePrefix = "unit-" FakeSuffix = "-test" )
Constants for testing with fake backend
Variables ¶
View Source
var ( // ErrNotManaged for secrets not managed with secfs ErrNotManaged = errors.New("not managed with secfs") )
Functions ¶
func NewFakeClientset ¶
func NewFakeClientset() kubernetes.Interface
NewFakeClientset returns a fake clientset for testing
Types ¶
type Backend ¶
type Backend interface { Create(Secret) error Get(Secret) error Update(Secret) error Delete(Secret) error Rename(Metadata, Metadata) error }
Backend is the interface that groups the basic Create, Get, Update and Delete methods.
type Option ¶
type Option func(*backend)
Option represents a functional Option
func WithIgnoreAnnotation ¶ added in v0.1.1
func WithIgnoreAnnotation() Option
WithIgnoreAnnotation configures the backend to ignore if the secret is managed with secfs or not
func WithSecretLabels ¶
WithSecretLabels configures a custom secret labels
func WithSecretPrefix ¶
WithSecretPrefix configures a custom secret prefix
func WithSecretSuffix ¶
WithSecretSuffix configures a custom secret prefix
func WithTimeout ¶
WithTimeout configures a custom request timeout
Click to show internal directories.
Click to hide internal directories.