Documentation ¶
Index ¶
Constants ¶
const ( // SealedSecretName is the name used in SealedSecret TPR SealedSecretName = "sealed-secret." + GroupName // SealedSecretPlural is the collection plural used with SealedSecret API SealedSecretPlural = "sealedsecrets" )
const GroupName = "ksonnet.io"
GroupName is the group name used in this package
Variables ¶
var ( // SchemeGroupVersion is the group version used to register these objects SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} // SchemeBuilder adds this group to scheme SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) )
var ErrTooShort = errors.New("SealedSecret data is too short")
ErrTooShort indicates the provided data is too short to be valid
Functions ¶
This section is empty.
Types ¶
type SealedSecret ¶
type SealedSecret struct { metav1.TypeMeta `json:",inline"` // Note, can't use implicit object here: // https://github.com/kubernetes/client-go/issues/8 Metadata metav1.ObjectMeta `json:"metadata"` Spec SealedSecretSpec `json:"spec"` }
SealedSecret is the K8s representation of a "sealed Secret" - a regular k8s Secret that has been sealed (encrypted) using the controller's key.
func NewSealedSecret ¶
func NewSealedSecret(codecs runtimeserializer.CodecFactory, pubKey *rsa.PublicKey, secret *v1.Secret) (*SealedSecret, error)
NewSealedSecret creates a new SealedSecret object wrapping the provided secret.
func (*SealedSecret) GetObjectKind ¶
func (s *SealedSecret) GetObjectKind() schema.ObjectKind
GetObjectKind is required for Object interface
func (*SealedSecret) GetObjectMeta ¶
func (s *SealedSecret) GetObjectMeta() metav1.Object
GetObjectMeta is required for ObjectMetaAccessor interface
func (*SealedSecret) UnmarshalJSON ¶
func (s *SealedSecret) UnmarshalJSON(data []byte) error
UnmarshalJSON ensures SealedSecret objects can be decoded from JSON successfully
func (*SealedSecret) Unseal ¶
func (s *SealedSecret) Unseal(codecs runtimeserializer.CodecFactory, privKey *rsa.PrivateKey) (*v1.Secret, error)
Unseal decypts and returns the embedded v1.Secret.
type SealedSecretCopy ¶
type SealedSecretCopy SealedSecret
SealedSecretCopy is a workaround for a ugorji issue
type SealedSecretList ¶
type SealedSecretList struct { metav1.TypeMeta `json:",inline"` Metadata metav1.ListMeta `json:"metadata"` Items []SealedSecret `json:"items"` }
SealedSecretList represents a list of SealedSecrets
func (*SealedSecretList) GetListMeta ¶
func (sl *SealedSecretList) GetListMeta() metav1.List
GetListMeta is required for ListMetaAccessor interface
func (*SealedSecretList) GetObjectKind ¶
func (sl *SealedSecretList) GetObjectKind() schema.ObjectKind
GetObjectKind is required for Object interface
func (*SealedSecretList) UnmarshalJSON ¶
func (sl *SealedSecretList) UnmarshalJSON(data []byte) error
UnmarshalJSON ensures SealedSecretList objects can be decoded from JSON successfully
type SealedSecretListCopy ¶
type SealedSecretListCopy SealedSecretList
SealedSecretListCopy is a workaround for a ugorji issue
type SealedSecretSpec ¶
type SealedSecretSpec struct {
Data []byte `json:"data"`
}
SealedSecretSpec is the specification of a SealedSecret