Usage
How to use ClusterSecrets
A typical ClusterSecret resource looks like this:
apiVersion: core.cs.sap.com/v1alpha1
kind: ClusterSecret
metadata:
name: my-secret
spec:
namespaceSelector:
matchLabels:
mylabel: myvalue
template:
type: Opaque
data:
mykey: bXl2YWx1ZQ==
The ClusterSecret spec consists of two parts:
spec.namespaceSeletorfollows the usual syntaxspec.templatemirrors the usual secret spec, at least partially, allowing to specifytype(mandatory), and at least one ofdataorstringData; ifstringDatais provided, it will be rewritten todataby the mutating admission webhook.
The controller will then ensure that an according secret (having the same name as the ClusterSecret) exists in all selected namespaces; in addition to ClusterSecret resources, the controller watches namespaces, and immediately reacts to creation of namespaces, or label changes.
Last modified April 28, 2023: initial commit (898157f)