Documentation ¶
Index ¶
Constants ¶
const ( // ConditionConfigReady tracks if the SyncConfig has been successfully reconciled. ConditionConfigReady ConditionType = "Ready" // ConditionErrored is given when no objects could be synced or deleted and the failed object count is > 0 or // any other reconciliation error. ConditionErrored ConditionType = "Errored" // ConditionInvalid is given when the the SyncConfig Spec contains invalid properties. SyncConfigs will not be // reconciled. ConditionInvalid ConditionType = "Invalid" // SyncReasonFailed is given when the sync generally failed. SyncReasonFailed = "SynchronizationFailed" // SyncReasonSucceeded is given when the sync succeeded without errors. SyncReasonSucceeded = "SynchronizationSucceeded" // SyncReasonFailedWithError is given when the sync failed with a particular error. SyncReasonFailedWithError = "SynchronizationFailedWithError" // SyncReasonConfigInvalid is given if the SyncConfig contains invalid spec. SyncReasonConfigInvalid = "InvalidSyncConfigSpec" )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "sync.appuio.ch", 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 ¶
This section is empty.
Types ¶
type ConditionType ¶ added in v0.4.0
type ConditionType string
ConditionType identifies the type of a condition. The type is unique in the Status field.
func (ConditionType) String ¶ added in v0.4.0
func (in ConditionType) String() string
String returns string(condition).
type DeleteMeta ¶
type DeleteMeta struct { // Name of the item to be deleted Name string `json:"name,omitempty"` // Kind of the item to be deleted Kind string `json:"kind,omitempty"` // APIVersion of the item to be deleted APIVersion string `json:"apiVersion,omitempty"` }
DeleteMeta defines an object by name, kind and version
func (*DeleteMeta) DeepCopy ¶
func (in *DeleteMeta) DeepCopy() *DeleteMeta
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeleteMeta.
func (*DeleteMeta) DeepCopyInto ¶
func (in *DeleteMeta) DeepCopyInto(out *DeleteMeta)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DeleteMeta) ToDeleteObj ¶
func (in *DeleteMeta) ToDeleteObj(namespace string) *unstructured.Unstructured
ToDeleteObj creates a k8s Unstructured object based on a DeleteMeta obj
type Manifest ¶ added in v0.5.0
type Manifest struct { // +kubebuilder:pruning:PreserveUnknownFields // +kubebuilder:validation:EmbeddedResource unstructured.Unstructured `json:",inline"` }
Manifest is an unstructured kubernetes object with kube-builder validation and pruning settings applied.
func (*Manifest) DeepCopy ¶ added in v0.5.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Manifest.
func (*Manifest) DeepCopyInto ¶ added in v0.5.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NamespaceSelector ¶
type NamespaceSelector struct { // LabelSelector of namespaces to be targeted. Can be combined with MatchNames to include unlabelled namespaces. LabelSelector *metav1.LabelSelector `json:"labelSelector,omitempty"` // MatchNames lists namespace names to be targeted. Each entry can be a Regex pattern. // A namespace is included if at least one pattern matches. // Invalid patterns will cause the sync to be cancelled and the status conditions will contain the error message. MatchNames []string `json:"matchNames,omitempty"` // IgnoreNames lists namespace names to be ignored. Each entry can be a Regex pattern and if they match // the namespaces will be excluded from the sync even if matching in "matchNames" or via LabelSelector. // A namespace is ignored if at least one pattern matches. // Invalid patterns will cause the sync to be cancelled and the status conditions will contain the error message. IgnoreNames []string `json:"ignoreNames,omitempty"` }
NamespaceSelector provides a way to specify targeted namespaces
func (*NamespaceSelector) DeepCopy ¶
func (in *NamespaceSelector) DeepCopy() *NamespaceSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespaceSelector.
func (*NamespaceSelector) DeepCopyInto ¶
func (in *NamespaceSelector) DeepCopyInto(out *NamespaceSelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SyncConfig ¶
type SyncConfig struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec SyncConfigSpec `json:"spec,omitempty"` Status SyncConfigStatus `json:"status,omitempty"` }
SyncConfig is the Schema for the syncconfigs API
func (*SyncConfig) DeepCopy ¶
func (in *SyncConfig) DeepCopy() *SyncConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SyncConfig.
func (*SyncConfig) DeepCopyInto ¶
func (in *SyncConfig) DeepCopyInto(out *SyncConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SyncConfig) DeepCopyObject ¶
func (in *SyncConfig) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type SyncConfigList ¶
type SyncConfigList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []SyncConfig `json:"items"` Prune bool `json:"prune,omitempty"` }
SyncConfigList contains a list of SyncConfig
func (*SyncConfigList) DeepCopy ¶
func (in *SyncConfigList) DeepCopy() *SyncConfigList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SyncConfigList.
func (*SyncConfigList) DeepCopyInto ¶
func (in *SyncConfigList) DeepCopyInto(out *SyncConfigList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SyncConfigList) DeepCopyObject ¶
func (in *SyncConfigList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type SyncConfigSpec ¶
type SyncConfigSpec struct { // ForceRecreate defines if objects should be deleted and recreated if updates fails ForceRecreate bool `json:"forceRecreate,omitempty"` // NamespaceSelector defines which namespaces should be targeted NamespaceSelector *NamespaceSelector `json:"namespaceSelector,omitempty"` // SyncItems lists items to be synced to targeted namespaces SyncItems []Manifest `json:"syncItems,omitempty"` // DeleteItems lists items to be deleted from targeted namespaces DeleteItems []DeleteMeta `json:"deleteItems,omitempty"` }
SyncConfigSpec defines the desired state of SyncConfig
func (*SyncConfigSpec) DeepCopy ¶
func (in *SyncConfigSpec) DeepCopy() *SyncConfigSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SyncConfigSpec.
func (*SyncConfigSpec) DeepCopyInto ¶
func (in *SyncConfigSpec) DeepCopyInto(out *SyncConfigSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SyncConfigStatus ¶
type SyncConfigStatus struct { // Conditions contain the states of the SyncConfig. A SyncConfig is considered Ready when at least one item has been synced. Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge"` // SynchronizedItemCount holds the accumulated number of created or updated objects in the targeted namespaces. SynchronizedItemCount int64 `json:"synchronizedItemCount"` // DeletedItemCount holds the accumulated number of deleted objects from targeted namespaces. Inexisting items do not get counted. DeletedItemCount int64 `json:"deletedItemCount"` // FailedItemCount holds the accumulated number of objects that could not be created, updated or deleted. Inexisting items do not get counted. FailedItemCount int64 `json:"failedItemCount"` }
SyncConfigStatus defines the observed state of SyncConfig
func (*SyncConfigStatus) DeepCopy ¶
func (in *SyncConfigStatus) DeepCopy() *SyncConfigStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SyncConfigStatus.
func (*SyncConfigStatus) DeepCopyInto ¶
func (in *SyncConfigStatus) DeepCopyInto(out *SyncConfigStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.