Documentation ¶
Index ¶
- Variables
- type Auths
- type RegistriesStruct
- type RegistryCredentials
- type Wrapper
- func (w *Wrapper) GetBasicCredentials(namespace, name string) (string, string, error)
- func (w *Wrapper) GetPodSpec(ar *v1beta1.AdmissionRequest) (string, *corev1.PodSpec, error)
- func (w *Wrapper) GetSecretKey(namespace, secretName string) ([]byte, error)
- func (w *Wrapper) GetSecretToken(namespace, secretName, registry string) (string, string, error)
- type WrapperInterface
Constants ¶
This section is empty.
Variables ¶
var ErrObjectHasParents = fmt.Errorf("This object has parents")
ErrObjectHasParents is returned when the resource being created is the child of another resource
var ErrObjectHasZeroReplicas = fmt.Errorf("This object has zero replicas")
ErrObjectHasZeroReplicas is returned when the resource being created has zero replicas
Functions ¶
This section is empty.
Types ¶
type Auths ¶
type Auths struct {
Registries RegistriesStruct `json:"auths"`
}
Auths struct contains an embedded RegistriesStruct of name auths
type RegistriesStruct ¶
type RegistriesStruct map[string]RegistryCredentials
RegistriesStruct is a map of registries to their credentials
type RegistryCredentials ¶
type RegistryCredentials struct { Username string `json:"username"` Password string `json:"password"` Email string `json:"email"` Auth string `json:"auth"` }
RegistryCredentials defines the fields stored per registry in an docker config secret
type Wrapper ¶
type Wrapper struct {
kubernetes.Interface
}
Wrapper is a wrapper around kubeclientset that includes some helper functions for applying behaviour to kube resources
func NewKubeClientsetWrapper ¶
func NewKubeClientsetWrapper(kubeClientset kubernetes.Interface) *Wrapper
NewKubeClientsetWrapper creates a wrapper from the kubeclientset passed in
func (*Wrapper) GetBasicCredentials ¶
GetBasicCredentials retrieves username, password from a named secret
func (*Wrapper) GetPodSpec ¶
GetPodSpec retrieves the podspec from the admission request passed in
func (*Wrapper) GetSecretKey ¶
GetSecretKey obtains the "key" data from the named secret
type WrapperInterface ¶
type WrapperInterface interface { kubernetes.Interface GetPodSpec(*v1beta1.AdmissionRequest) (string, *corev1.PodSpec, error) GetSecretToken(namespace, secretName, registry string) (string, string, error) GetSecretKey(namespace, secretName string) ([]byte, error) GetBasicCredentials(namespace, secretName string) (string, string, error) }
WrapperInterface is the interface for a wrapper around kubeclientset that includes some helper functions for applying behaviour to kube resources