Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the mpas v1alpha1 API group +kubebuilder:object:generate=true +groupName=mpas.ocm.software
Index ¶
- Constants
- Variables
- type CommitTemplate
- type ExistingRepositoryPolicy
- type FluxSpec
- type Project
- func (in *Project) DeepCopy() *Project
- func (in *Project) DeepCopyInto(out *Project)
- func (in *Project) DeepCopyObject() runtime.Object
- func (in *Project) GetConditions() []metav1.Condition
- func (in *Project) GetNameWithPrefix(prefix string) string
- func (in *Project) GetRequeueAfter() time.Duration
- func (in *Project) GetServiceAccountNamespacedName() (types.NamespacedName, error)
- func (in *Project) SetConditions(conditions []metav1.Condition)
- type ProjectList
- type ProjectSpec
- type ProjectStatus
- type ResourceInventory
- type ResourceRef
Constants ¶
const ( WaitingOnResourcesReason string = "WaitingOnResources" // NamespaceCreateOrUpdateFailedReason indicates that the project namespace could not be reconciled. NamespaceCreateOrUpdateFailedReason string = "NamespaceCreateOrUpdateFailed" // ServiceAccountCreateOrUpdateFailedReason indicates that the project service account could not be reconciled. ServiceAccountCreateOrUpdateFailedReason string = "ServiceAccountCreateOrUpdateFailed" // RBACCreateOrUpdateFailedReason indicates that the project cluster role could not be reconciled. RBACCreateOrUpdateFailedReason string = "RBACCreateOrUpdateFailed" //nolint:gosec // not a cred // CertificateCreateOrUpdateFailedReason indicates that the project certificate could not be reconciled. CertificateCreateOrUpdateFailedReason string = "CertificateCreateOrUpdateFailed" // RepositoryCreateOrUpdateFailedReason indicates that the project repository could not be reconciled. RepositoryCreateOrUpdateFailedReason string = "RepositoryCreateOrUpdateFailed" // FluxGitRepositoryCreateOrUpdateFailedReason indicates that the project Flux GitRepository source could not be reconciled. FluxGitRepositoryCreateOrUpdateFailedReason string = "FluxGitRepositoryCreateOrUpdateFailed" // FluxKustomizationsCreateOrUpdateFailedReason indicates that the project Flux Kustomizations could not be reconciled. FluxKustomizationsCreateOrUpdateFailedReason string = "FluxKustomizationsCreateOrUpdateFailed" // ReconciliationFailedReason represents the fact that the reconciliation failed. ReconciliationFailedReason string = "ReconciliationFailed" )
const ( // UpdateServiceAccountImagePullSecretsType used when updating a service account by the secret controller. UpdateServiceAccountImagePullSecretsType = "Normal" // AddServiceAccountImagePullSecretsReason defines the reason why the update occurred. AddServiceAccountImagePullSecretsReason = "ImagePullSecretAdded" // RemoveServiceAccountImagePullSecretsReason defines the reason why the update occurred. RemoveServiceAccountImagePullSecretsReason = "ImagePullSecretRemoved" )
const ( // ManagedMPASSecretAnnotationKey denotes that the project controller needs to set these secrets // in the service account of the project. ManagedMPASSecretAnnotationKey = "mpas.ocm.system/secret.dockerconfig" //nolint:gosec // not a cred )
const (
ProjectFinalizer = "finalizers.mpas.ocm.software"
)
const ( // ProjectKey contains the name of the project for this namespace. // This key is used to look up the Project that belongs to it. ProjectKey = "mpas.ocm.system/project" )
Variables ¶
var ( // GroupVersion is group version used to register these objects. GroupVersion = schema.GroupVersion{Group: "mpas.ocm.software", 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 CommitTemplate ¶
CommitTemplate defines the default commit template for a project if one is not provided in the spec.
func (*CommitTemplate) DeepCopy ¶
func (in *CommitTemplate) DeepCopy() *CommitTemplate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommitTemplate.
func (*CommitTemplate) DeepCopyInto ¶
func (in *CommitTemplate) DeepCopyInto(out *CommitTemplate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExistingRepositoryPolicy ¶
type ExistingRepositoryPolicy string
ExistingRepositoryPolicy defines what to do in case a requested repository already exists.
type FluxSpec ¶
type FluxSpec struct {
// +optional
// +kubebuilder:validation:Type=string
// +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
Interval metav1.Duration `json:"interval,omitempty"`
}
func (*FluxSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FluxSpec.
func (*FluxSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Project ¶
type Project struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ProjectSpec `json:"spec,omitempty"`
Status ProjectStatus `json:"status,omitempty"`
}
Project is the Schema for the projects API.
func (*Project) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Project.
func (*Project) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Project) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Project) GetConditions ¶
GetConditions returns the conditions of the Project.
func (*Project) GetNameWithPrefix ¶
func (*Project) GetRequeueAfter ¶
GetRequeueAfter returns the requeue time of the Project.
func (*Project) GetServiceAccountNamespacedName ¶ added in v0.3.0
func (in *Project) GetServiceAccountNamespacedName() (types.NamespacedName, error)
GetServiceAccountNamespacedName returns the service account namespace name from the inventory.
func (*Project) SetConditions ¶
SetConditions sets the conditions of the Project.
type ProjectList ¶
type ProjectList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Project `json:"items"`
}
ProjectList contains a list of Project.
func (*ProjectList) DeepCopy ¶
func (in *ProjectList) DeepCopy() *ProjectList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectList.
func (*ProjectList) DeepCopyInto ¶
func (in *ProjectList) DeepCopyInto(out *ProjectList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ProjectList) DeepCopyObject ¶
func (in *ProjectList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ProjectSpec ¶
type ProjectSpec struct {
// +required
Git gcv1alpha1.RepositorySpec `json:"git"`
// +optional
// +kubebuilder:default={interval: "5m"}
Flux FluxSpec `json:"flux,omitempty"`
// +optional
// +kubebuilder:default=true
Prune bool `json:"prune,omitempty"`
// +optional
Interval metav1.Duration `json:"interval,omitempty"`
}
ProjectSpec defines the desired state of Project.
func (*ProjectSpec) DeepCopy ¶
func (in *ProjectSpec) DeepCopy() *ProjectSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectSpec.
func (*ProjectSpec) DeepCopyInto ¶
func (in *ProjectSpec) DeepCopyInto(out *ProjectSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ProjectStatus ¶
type ProjectStatus struct {
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
// ObservedGeneration is the last reconciled generation of the resource.
// +optional
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// Inventory contains the list of Kubernetes resource object references that
// have been successfully applied.
// +optional
Inventory *ResourceInventory `json:"inventory,omitempty"`
// RepositoryRef contains the reference to the repository resource that has been created by the project controller.
// +optional
RepositoryRef *meta.NamespacedObjectReference `json:"repositoryRef,omitempty"`
}
ProjectStatus defines the observed state of Project.
func (*ProjectStatus) DeepCopy ¶
func (in *ProjectStatus) DeepCopy() *ProjectStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectStatus.
func (*ProjectStatus) DeepCopyInto ¶
func (in *ProjectStatus) DeepCopyInto(out *ProjectStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceInventory ¶
type ResourceInventory struct {
// Entries of Kubernetes resource object references.
Entries []ResourceRef `json:"entries"`
}
ResourceInventory contains a list of Kubernetes resource object references that have been created by the project.
func (*ResourceInventory) DeepCopy ¶
func (in *ResourceInventory) DeepCopy() *ResourceInventory
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceInventory.
func (*ResourceInventory) DeepCopyInto ¶
func (in *ResourceInventory) DeepCopyInto(out *ResourceInventory)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceRef ¶
type ResourceRef struct {
// ID is the string representation of the Kubernetes resource object's metadata,
// in the format '<namespace>_<name>_<group>_<kind>'.
ID string `json:"id"`
// Version is the API version of the Kubernetes resource object's kind.
Version string `json:"v"`
}
ResourceRef contains the information required to locate a resource within a cluster.
func (*ResourceRef) DeepCopy ¶
func (in *ResourceRef) DeepCopy() *ResourceRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceRef.
func (*ResourceRef) DeepCopyInto ¶
func (in *ResourceRef) DeepCopyInto(out *ResourceRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.