Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the infrahub v1alpha1 API group +kubebuilder:object:generate=true +groupName=infrahub.operators.com
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "infrahub.operators.com", 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 InfrahubSync ¶
type InfrahubSync struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
// Spec defines the desired state of InfrahubSync
Spec InfrahubSyncSpec `json:"spec,omitempty"`
// Status defines the observed state of InfrahubSync
Status InfrahubSyncStatus `json:"status,omitempty"`
}
InfrahubSync is the Schema for the infrahubsyncs API
func (*InfrahubSync) DeepCopy ¶
func (in *InfrahubSync) DeepCopy() *InfrahubSync
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InfrahubSync.
func (*InfrahubSync) DeepCopyInto ¶
func (in *InfrahubSync) DeepCopyInto(out *InfrahubSync)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*InfrahubSync) DeepCopyObject ¶
func (in *InfrahubSync) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type InfrahubSyncDestination ¶
type InfrahubSyncDestination struct {
// Only needed if you need to deploy to two Kubernetis cluster (multicluster) if set to "httlps://kubernetes.default.svc" or omitted, the operator will use the current cluster
// +kubebuilder:validation:Optional
Server string `json:"server,omitempty" protobuf:"bytes,1,name=server"`
// Default Namespace in the Kubernetes cluster where the resource should be sent, if they do not hava a namespace already set
// +kubebuilder:validation:Optional
Namespace string `json:"namespace,omitempty" protobuf:"bytes,2,name=namespace"`
// If true, the operator will reconcile resources based on k8s events. (default: false) - changes to the resource will trigger a reconciliation
// +kubebuilder:default:=false
ReconcileOnEvents bool `json:"reconcileOnEvents,omitempty" protobuf:"varint,4,opt,name=reconcileOnEvents"`
}
VidraResourceDestination contains information about where the resource will be sent
func (*InfrahubSyncDestination) DeepCopy ¶
func (in *InfrahubSyncDestination) DeepCopy() *InfrahubSyncDestination
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InfrahubSyncDestination.
func (*InfrahubSyncDestination) DeepCopyInto ¶
func (in *InfrahubSyncDestination) DeepCopyInto(out *InfrahubSyncDestination)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type InfrahubSyncList ¶
type InfrahubSyncList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []InfrahubSync `json:"items"`
}
InfrahubSyncList contains a list of InfrahubSync
func (*InfrahubSyncList) DeepCopy ¶
func (in *InfrahubSyncList) DeepCopy() *InfrahubSyncList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InfrahubSyncList.
func (*InfrahubSyncList) DeepCopyInto ¶
func (in *InfrahubSyncList) DeepCopyInto(out *InfrahubSyncList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*InfrahubSyncList) DeepCopyObject ¶
func (in *InfrahubSyncList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type InfrahubSyncSource ¶
type InfrahubSyncSource struct {
// URL for the Infrahub API (e.g., https://infrahub.example.com)
// +kubebuilder:validation:Required
// +kubebuilder:validation:Pattern="^(http|https)://[a-zA-Z0-9.-]+(:[0-9]+)?(?:/[a-zA-Z0-9-]+)*$"
InfrahubAPIURL string `json:"infrahubAPIURL" protobuf:"bytes,1,name=infrahubAPIURL"`
// The target branch in Infrahub to interact with
// +kubebuilder:validation:Required
// +kubebuilder:validation:MinLength=1
// +kubebuilder:default:="main"
TargetBranch string `json:"targetBranch" protobuf:"bytes,2,name=targetBranch"`
// The target date in Infrahub for all the interactions (e.g., "2025-01-01T00:00:00Z or -2d" for the artifact from two days ago). If not set, the operator will use the current date.
// +kubebuilder:validation:Optional
TargetDate string `json:"targetDate,omitempty" protobuf:"bytes,3,name=targetDate"`
// Artifact name that is being handled by the operator, this is used to identify the resource in Infrahub
// +kubebuilder:validation:Required
// +kubebuilder:validation:MinLength=1
ArtifactName string `json:"artefactName" protobuf:"bytes,4,name=artefactName"`
}
VidraResourceSource contains the source information for the resource
func (*InfrahubSyncSource) DeepCopy ¶
func (in *InfrahubSyncSource) DeepCopy() *InfrahubSyncSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InfrahubSyncSource.
func (*InfrahubSyncSource) DeepCopyInto ¶
func (in *InfrahubSyncSource) DeepCopyInto(out *InfrahubSyncSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type InfrahubSyncSpec ¶
type InfrahubSyncSpec struct {
// Foo is an example field of InfrahubSync. Edit infrahubsync_types.go to remove/update
// Source contains the source information for the Infrahub API interaction
Source InfrahubSyncSource `json:"source" protobuf:"bytes,1,name=source"`
// Destination contains the destination information for the resource
Destination InfrahubSyncDestination `json:"destination,omitempty" protobuf:"bytes,2,name=destination"`
}
InfrahubSyncSpec defines the desired state of InfrahubSync
func (*InfrahubSyncSpec) DeepCopy ¶
func (in *InfrahubSyncSpec) DeepCopy() *InfrahubSyncSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InfrahubSyncSpec.
func (*InfrahubSyncSpec) DeepCopyInto ¶
func (in *InfrahubSyncSpec) DeepCopyInto(out *InfrahubSyncSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type InfrahubSyncStatus ¶
type InfrahubSyncStatus struct {
// Checksums contains a list of checksums for synced resources
Checksums []string `json:"checksums,omitempty"`
// SyncState indicates the current state of the sync operation
SyncState State `json:"syncState,omitempty"`
// LastError provides details about the last error encountered during the sync operation
LastError string `json:"lastError,omitempty"`
// LastSyncTime indicates the last time the sync operation was performed
LastSyncTime metav1.Time `json:"lastSyncTime,omitempty"`
}
InfrahubSyncStatus defines the observed state of InfrahubSync
func (*InfrahubSyncStatus) DeepCopy ¶
func (in *InfrahubSyncStatus) DeepCopy() *InfrahubSyncStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InfrahubSyncStatus.
func (*InfrahubSyncStatus) DeepCopyInto ¶
func (in *InfrahubSyncStatus) DeepCopyInto(out *InfrahubSyncStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ManagedResourceStatus ¶
type ManagedResourceStatus struct {
// Kind of the resource (e.g., Deployment, Service)
Kind string `json:"kind"`
// APIVersion of the resource (e.g., apps/v1)
APIVersion string `json:"apiVersion"`
// Name of the resource
Name string `json:"name"`
// Namespace of the resource
Namespace string `json:"namespace,omitempty"`
}
func (*ManagedResourceStatus) DeepCopy ¶
func (in *ManagedResourceStatus) DeepCopy() *ManagedResourceStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedResourceStatus.
func (*ManagedResourceStatus) DeepCopyInto ¶
func (in *ManagedResourceStatus) DeepCopyInto(out *ManagedResourceStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type State ¶
type State string
const ( // Indicates the resource is currently reconciling StateRunning State = "Running" // Indicates the resource reconciliation was successful StateSucceeded State = "Succeeded" // Indicates the resource reconciliation failed StateFailed State = "Failed" // Indicates the resource has achieved the desired state but still has old resources which are not yet cleaned up StateStale State = "Stale" )
type VidraResource ¶
type VidraResource struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
// VidraResourceSpec defines the desired state of VidraResource
Spec VidraResourceSpec `json:"spec,omitempty"`
// VidraResourceStatus defines the observed state of VidraResource
Status VidraResourceStatus `json:"status,omitempty"`
}
VidraResource is the Schema for the Vidraresources API
func (*VidraResource) DeepCopy ¶
func (in *VidraResource) DeepCopy() *VidraResource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VidraResource.
func (*VidraResource) DeepCopyInto ¶
func (in *VidraResource) DeepCopyInto(out *VidraResource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VidraResource) DeepCopyObject ¶
func (in *VidraResource) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type VidraResourceList ¶
type VidraResourceList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []VidraResource `json:"items"`
}
VidraResourceList contains a list of VidraResource
func (*VidraResourceList) DeepCopy ¶
func (in *VidraResourceList) DeepCopy() *VidraResourceList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VidraResourceList.
func (*VidraResourceList) DeepCopyInto ¶
func (in *VidraResourceList) DeepCopyInto(out *VidraResourceList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VidraResourceList) DeepCopyObject ¶
func (in *VidraResourceList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type VidraResourceSpec ¶
type VidraResourceSpec struct {
// Destination contains the destination information for the resource
Destination InfrahubSyncDestination `json:"destination,omitempty" protobuf:"bytes,2,name=destination"`
// Manifest contains the manifest information for the resource
Manifest string `json:"manifest,omitempty" protobuf:"bytes,2,name=manifest"`
// The last time the resource was reconciled
ReconciledAt metav1.Time `json:"reconciledAt,omitempty" protobuf:"bytes,5,name=reconciledAt"`
}
VidraResourceSpec defines the desired state of VidraResource
func (*VidraResourceSpec) DeepCopy ¶
func (in *VidraResourceSpec) DeepCopy() *VidraResourceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VidraResourceSpec.
func (*VidraResourceSpec) DeepCopyInto ¶
func (in *VidraResourceSpec) DeepCopyInto(out *VidraResourceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VidraResourceStatus ¶
type VidraResourceStatus struct {
// ManagedResources contains a list of resources managed by this VidraResource
ManagedResources []ManagedResourceStatus `json:"managedResources,omitempty"`
// DeployState indicates the current state of the deployment
// +kubebuilder:validation:Enum=Pending;Running;Succeeded;Failed;Stale
DeployState State `json:"DeployState,omitempty"`
// LastError contains the last error message if any
LastError string `json:"lastError,omitempty"`
// LastSyncTime indicates the last time the resource was synchronized
LastSyncTime metav1.Time `json:"lastSyncTime,omitempty"`
}
VidraResourceStatus defines the observed state of VidraResource
func (*VidraResourceStatus) DeepCopy ¶
func (in *VidraResourceStatus) DeepCopy() *VidraResourceStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VidraResourceStatus.
func (*VidraResourceStatus) DeepCopyInto ¶
func (in *VidraResourceStatus) DeepCopyInto(out *VidraResourceStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.