Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the images v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/banzaicloud/imps/api +k8s:defaulter-gen=TypeMeta +groupName=images.banzaicloud.io
Package v1alpha1 contains API Schema definitions for the images v1alpha1 API group +kubebuilder:object:generate=true +groupName=images.banzaicloud.io
nolint: maligned
Index ¶
- Constants
- Variables
- func BoolPointer(b bool) *bool
- type AnnotationSelector
- type ImagePullSecret
- func (in *ImagePullSecret) DeepCopy() *ImagePullSecret
- func (in *ImagePullSecret) DeepCopyInto(out *ImagePullSecret)
- func (in *ImagePullSecret) DeepCopyObject() runtime.Object
- func (i *ImagePullSecret) GetOwnerReferenceForOwnedObject() metav1.OwnerReference
- func (i ImagePullSecret) MatchesNamespace(ns *corev1.Namespace) (bool, error)
- func (i ImagePullSecret) MatchesPod(pod *corev1.Pod) (bool, error)
- func (i ImagePullSecret) SplitNamespacesByMatch(allNs corev1.NamespaceList) ([]corev1.Namespace, []corev1.Namespace, error)
- type ImagePullSecretList
- type ImagePullSecretSpec
- type ImagePullSecretStatus
- type LabelSet
- type NamespaceSelectorConfiguration
- type NamespacedName
- type ObjectSelectorConfiguration
- type ReconciliationStatus
- type RegistryConfig
- type TargetConfig
- type TargetSecretConfig
Constants ¶
const ( ReconciliationReady = "Ready" ReconciliationFailed = "Failed" )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "images.banzaicloud.io", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
func BoolPointer ¶
Types ¶
type AnnotationSelector ¶
type AnnotationSelector struct { MatchAnnotations map[string]string `json:"matchAnnotations,omitempty"` MatchExpressions []metav1.LabelSelectorRequirement `json:"matchExpressions,omitempty"` }
func (*AnnotationSelector) DeepCopy ¶
func (in *AnnotationSelector) DeepCopy() *AnnotationSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AnnotationSelector.
func (*AnnotationSelector) DeepCopyInto ¶
func (in *AnnotationSelector) DeepCopyInto(out *AnnotationSelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ImagePullSecret ¶
type ImagePullSecret struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ImagePullSecretSpec `json:"spec,omitempty"` Status ImagePullSecretStatus `json:"status,omitempty"` }
ImagePullSecret is the Schema for the imagepullsecrets API +k8s:openapi-gen=true +kubebuilder:subresource:status +kubebuilder:resource:path=imagepullsecrets,shortName=imps,scope=Cluster +kubebuilder:printcolumn:name="State",type="string",JSONPath=".status.status",description="Represents if the object has been successfully reconciled",priority=0,format="byte" +kubebuilder:printcolumn:name="Reconciled",type="date",JSONPath=".status.lastSuccessfulReconciliation",description="When the object has been successfully reconciled",priority=0,format="date" +kubebuilder:printcolumn:name="Validity seconds",type="integer",JSONPath=".status.validitySeconds",description="How long the generated credential is valid for after the last reconciliation",priority=0,format="int32" +kubebuilder:printcolumn:name="Secret Name",type="string",JSONPath=".spec.target.secret.name",description="Name of the secret generated",priority=0,format="byte" +kubebuilder:printcolumn:name="Namespaces",type="string",JSONPath=".status.managedNamespaces",description="Name of the namespaces the secret is generated in",priority=0,format="byte"
func (*ImagePullSecret) DeepCopy ¶
func (in *ImagePullSecret) DeepCopy() *ImagePullSecret
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImagePullSecret.
func (*ImagePullSecret) DeepCopyInto ¶
func (in *ImagePullSecret) DeepCopyInto(out *ImagePullSecret)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ImagePullSecret) DeepCopyObject ¶
func (in *ImagePullSecret) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ImagePullSecret) GetOwnerReferenceForOwnedObject ¶
func (i *ImagePullSecret) GetOwnerReferenceForOwnedObject() metav1.OwnerReference
func (ImagePullSecret) MatchesNamespace ¶
func (i ImagePullSecret) MatchesNamespace(ns *corev1.Namespace) (bool, error)
func (ImagePullSecret) MatchesPod ¶
func (i ImagePullSecret) MatchesPod(pod *corev1.Pod) (bool, error)
func (ImagePullSecret) SplitNamespacesByMatch ¶
func (i ImagePullSecret) SplitNamespacesByMatch(allNs corev1.NamespaceList) ([]corev1.Namespace, []corev1.Namespace, error)
type ImagePullSecretList ¶
type ImagePullSecretList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ImagePullSecret `json:"items"` }
+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +genclient:nonNamespaced ImagePullSecretList contains a list of ImagePullSecret
func (*ImagePullSecretList) DeepCopy ¶
func (in *ImagePullSecretList) DeepCopy() *ImagePullSecretList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImagePullSecretList.
func (*ImagePullSecretList) DeepCopyInto ¶
func (in *ImagePullSecretList) DeepCopyInto(out *ImagePullSecretList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ImagePullSecretList) DeepCopyObject ¶
func (in *ImagePullSecretList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ImagePullSecretSpec ¶
type ImagePullSecretSpec struct { // Target specifies what should be the name of the secret created in a // given namespace Target TargetConfig `json:"target"` // Registry contains the details of the secret to be created in each namespace Registry RegistryConfig `json:"registry"` }
ImagePullSecretSpec defines the desired state of ImagePullSecret
func (*ImagePullSecretSpec) DeepCopy ¶
func (in *ImagePullSecretSpec) DeepCopy() *ImagePullSecretSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImagePullSecretSpec.
func (*ImagePullSecretSpec) DeepCopyInto ¶
func (in *ImagePullSecretSpec) DeepCopyInto(out *ImagePullSecretSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ImagePullSecretStatus ¶
type ImagePullSecretStatus struct { Status ReconciliationStatus `json:"status,omitempty"` Reason string `json:"reason,omitempty"` LastSuccessfulReconciliation *metav1.Time `json:"lastSuccessfulReconciliation,omitempty"` ValiditySeconds int32 `json:"validitySeconds,omitempty"` ManagedNamespaces []string `json:"managedNamespaces,omitempty"` SourceSecretStatus map[string]string `json:"sourceSecretStatus,omitempty"` }
ImagePullSecretStatus defines the observed state of ImagePullSecret
func (*ImagePullSecretStatus) DeepCopy ¶
func (in *ImagePullSecretStatus) DeepCopy() *ImagePullSecretStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImagePullSecretStatus.
func (*ImagePullSecretStatus) DeepCopyInto ¶
func (in *ImagePullSecretStatus) DeepCopyInto(out *ImagePullSecretStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LabelSet ¶
func (LabelSet) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NamespaceSelectorConfiguration ¶
type NamespaceSelectorConfiguration struct { ObjectSelectorConfiguration `json:",inline"` // Namespaces specifies additional namespaces by name to generate the secret into Names []string `json:"names,omitempty"` }
func (*NamespaceSelectorConfiguration) DeepCopy ¶
func (in *NamespaceSelectorConfiguration) DeepCopy() *NamespaceSelectorConfiguration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespaceSelectorConfiguration.
func (*NamespaceSelectorConfiguration) DeepCopyInto ¶
func (in *NamespaceSelectorConfiguration) DeepCopyInto(out *NamespaceSelectorConfiguration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NamespacedName ¶
func (*NamespacedName) DeepCopy ¶
func (in *NamespacedName) DeepCopy() *NamespacedName
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespacedName.
func (*NamespacedName) DeepCopyInto ¶
func (in *NamespacedName) DeepCopyInto(out *NamespacedName)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ObjectSelectorConfiguration ¶
type ObjectSelectorConfiguration struct { // Labels specify the conditions, which are matched against the namespaces labels // to decide if this ImagePullSecret should be applied to the given namespace, if multiple // selectors are specified if one is matches the secret will be managed (OR) Labels []metav1.LabelSelector `json:"labels,omitempty"` // Selectors specify the conditions, which are matched against the namespaces labels // to decide if this ImagePullSecret should be applied to the given namespace, if multiple // selectors are specified if one is matches the secret will be managed (OR) Annotations []AnnotationSelector `json:"annotations,omitempty"` }
func (*ObjectSelectorConfiguration) DeepCopy ¶
func (in *ObjectSelectorConfiguration) DeepCopy() *ObjectSelectorConfiguration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectSelectorConfiguration.
func (*ObjectSelectorConfiguration) DeepCopyInto ¶
func (in *ObjectSelectorConfiguration) DeepCopyInto(out *ObjectSelectorConfiguration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (ObjectSelectorConfiguration) IsEmpty ¶
func (s ObjectSelectorConfiguration) IsEmpty() bool
func (ObjectSelectorConfiguration) Matches ¶
func (s ObjectSelectorConfiguration) Matches(meta metav1.ObjectMeta) (bool, error)
type ReconciliationStatus ¶
type ReconciliationStatus string
type RegistryConfig ¶
type RegistryConfig struct { // Credentials specifies which secret to be used as the source for docker login credentials Credentials []NamespacedName `json:"credentials"` }
RegistryConfig specifies what secret to be used as the basis of the pull secets
func (RegistryConfig) CredentialsAsNamespacedNameList ¶
func (r RegistryConfig) CredentialsAsNamespacedNameList() []types.NamespacedName
func (*RegistryConfig) DeepCopy ¶
func (in *RegistryConfig) DeepCopy() *RegistryConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RegistryConfig.
func (*RegistryConfig) DeepCopyInto ¶
func (in *RegistryConfig) DeepCopyInto(out *RegistryConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TargetConfig ¶
type TargetConfig struct { Secret TargetSecretConfig `json:"secret"` // Namespaces specify conditions on the namespaces that should have the TargetSecret generated Namespaces NamespaceSelectorConfiguration `json:"namespaces,omitempty"` // Pods specify the conditions, which are matched against the pods in each namespace // to decide if this ImagePullSecret should be applied to the given pod's namespace, if multiple // selectors are specified if one is matches the secret will be managed (OR) NamespacesWithPods ObjectSelectorConfiguration `json:"namespacesWithPods,omitempty"` }
TargetConfig describes the secret to be created and the selectors required to determine which namespaces should contain this secret
func (*TargetConfig) DeepCopy ¶
func (in *TargetConfig) DeepCopy() *TargetConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetConfig.
func (*TargetConfig) DeepCopyInto ¶
func (in *TargetConfig) DeepCopyInto(out *TargetConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TargetSecretConfig ¶
type TargetSecretConfig struct { // Name specifies the name of the secret object inside all the selected namespace Name string `json:"name"` // Labels specifies additional labels to be put on the Secret object Labels map[string]string `json:"labels,omitempty"` // Annotations specifies additional annotations to be put on the Secret object Annotations map[string]string `json:"annotations,omitempty"` }
TargetSecretConfig describes the properties of the secrets created in each selected namespace
func (*TargetSecretConfig) DeepCopy ¶
func (in *TargetSecretConfig) DeepCopy() *TargetSecretConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetSecretConfig.
func (*TargetSecretConfig) DeepCopyInto ¶
func (in *TargetSecretConfig) DeepCopyInto(out *TargetSecretConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.