Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the appstudio v1alpha1 API group +kubebuilder:object:generate=true +groupName=appstudio.redhat.com
Package scheme contains utilities for gradually building Schemes, which contain information associating Go types with Kubernetes groups, versions, and kinds.
Each API group should define a utility function called AddToScheme for adding its types to a Scheme:
// in package myapigroupv1...
var (
SchemeGroupVersion = schema.GroupVersion{Group: "my.api.group", Version: "v1"}
SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
AddToScheme = SchemeBuilder.AddToScheme
)
func init() {
SchemeBuilder.Register(&MyType{}, &MyTypeList)
}
var (
scheme *runtime.Scheme = runtime.NewScheme()
)
This also true of the built-in Kubernetes types. Then, in the entrypoint for your manager, assemble the scheme containing exactly the types you need, panicing if scheme registration failed. For instance, if our controller needs types from the core/v1 API group (e.g. Pod), plus types from my.api.group/v1:
func init() {
utilruntime.Must(myapigroupv1.AddToScheme(scheme))
utilruntime.Must(kubernetesscheme.AddToScheme(scheme))
}
func main() {
mgr := controllers.NewManager(context.Background(), controllers.GetConfigOrDie(), manager.Options{
Scheme: scheme,
})
// ...
}
Copied from https://github.com/kubernetes-sigs/controller-runtime/blob/main/pkg/scheme/scheme.go to remove dependency on controller-runtime
Index ¶
- Constants
- Variables
- type Application
- type ApplicationGitRepository
- type ApplicationList
- type ApplicationSpec
- type ApplicationStatus
- type Builder
- type Component
- type ComponentActions
- type ComponentBuildPipeline
- type ComponentCreatePipelineConfiguration
- type ComponentDetectionDescription
- type ComponentDetectionMap
- type ComponentDetectionQuery
- type ComponentDetectionQueryList
- type ComponentDetectionQuerySpec
- type ComponentDetectionQueryStatus
- type ComponentList
- type ComponentSource
- type ComponentSourceUnion
- type ComponentSpec
- type ComponentStatus
- type ComponentVersion
- type ComponentVersionStatus
- type GitOpsStatus
- type GitSource
- type PipelineDefinition
- type PipelineRefGit
- type PipelineSpecFromBundle
- type RepositorySettings
- type Snapshot
- type SnapshotArtifacts
- type SnapshotComponent
- type SnapshotList
- type SnapshotSpec
- type SnapshotStatus
Constants ¶
const ( InvalidDNS1035Name = "" /* 200-byte string literal not displayed */ InvalidDNS1123Subdomain = "" /* 163-byte string literal not displayed */ InvalidSchemeGitSourceURL = ": gitsource URL must be an absolute URL starting with an 'https/http' scheme " InvalidGithubVendorURL = "gitsource URL %s must come from a supported vendor: %s" InvalidAPIURL = ": API URL must be an absolute URL starting with an 'https' scheme " MissingIngressDomain = "ingress domain cannot be empty if cluster is of type Kubernetes" MissingGitOrImageSource = "a git source or an image source must be specified when creating a component" ComponentNameUpdateError = "component name cannot be updated to %s" ApplicationNameUpdateError = "application name cannot be updated to %s" GitSourceUpdateError = "git source cannot be updated to %+v" InvalidComponentError = "runtime object is not of type Component" )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "appstudio.redhat.com", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &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 Application ¶
type Application struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ApplicationSpec `json:"spec"`
Status ApplicationStatus `json:"status,omitempty"`
}
Application is the Schema for the applications API. For description, refer to <a href="https://konflux-ci.dev/docs/reference/kube-apis/application-api/"> Hybrid Application Service Kube API </a> +kubebuilder:resource:path=applications,shortName=hasapp;ha;app +kubebuilder:subresource:status +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.conditions[-1].status" +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[-1].reason"
func (*Application) DeepCopy ¶
func (in *Application) DeepCopy() *Application
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Application.
func (*Application) DeepCopyInto ¶
func (in *Application) DeepCopyInto(out *Application)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Application) DeepCopyObject ¶
func (in *Application) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ApplicationGitRepository ¶
type ApplicationGitRepository struct {
// URL refers to the repository URL that should be used. If not specified, a GitOps repository under the
// $GITHUB_ORG (defaults to redhat-appstudio-appdata) organization on GitHub will be generated by HAS.
// Example: https://github.com/devfile-test/myrepo.
// Required.
// +required
URL string `json:"url"`
// Branch corresponds to the branch in the repository that should be used
// Example: devel.
// Optional.
// +optional
Branch string `json:"branch,omitempty"`
// Context corresponds to the context within the repository that should be used
// Example: folderA/folderB/gitops.
// Optional.
// +optional
Context string `json:"context,omitempty"`
}
ApplicationGitRepository defines a git repository for a given Application resource (either appmodel or gitops)
func (*ApplicationGitRepository) DeepCopy ¶
func (in *ApplicationGitRepository) DeepCopy() *ApplicationGitRepository
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationGitRepository.
func (*ApplicationGitRepository) DeepCopyInto ¶
func (in *ApplicationGitRepository) DeepCopyInto(out *ApplicationGitRepository)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ApplicationList ¶
type ApplicationList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Application `json:"items"`
}
ApplicationList contains a list of Application
func (*ApplicationList) DeepCopy ¶
func (in *ApplicationList) DeepCopy() *ApplicationList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationList.
func (*ApplicationList) DeepCopyInto ¶
func (in *ApplicationList) DeepCopyInto(out *ApplicationList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ApplicationList) DeepCopyObject ¶
func (in *ApplicationList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ApplicationSpec ¶
type ApplicationSpec struct {
// DisplayName refers to the name that an application will be deployed with in App Studio.
// Required.
// +required
DisplayName string `json:"displayName"`
// AppModelRepository refers to the git repository that will store the application model (a devfile)
// Can be the same as GitOps repository.
// A repository will be generated if this field is left blank.
// Optional.
// +optional
AppModelRepository ApplicationGitRepository `json:"appModelRepository,omitempty"`
// GitOpsRepository refers to the git repository that will store the gitops resources.
// Can be the same as App Model Repository.
// A repository will be generated if this field is left blank.
// Optional.
// +optional
GitOpsRepository ApplicationGitRepository `json:"gitOpsRepository,omitempty"`
// Description refers to a brief description of the application.
// Optional.
// +optional
Description string `json:"description,omitempty"`
}
ApplicationSpec defines the desired state of Application
func (*ApplicationSpec) DeepCopy ¶
func (in *ApplicationSpec) DeepCopy() *ApplicationSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationSpec.
func (*ApplicationSpec) DeepCopyInto ¶
func (in *ApplicationSpec) DeepCopyInto(out *ApplicationSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ApplicationStatus ¶
type ApplicationStatus struct {
// Conditions is an array of the Application's status conditions
Conditions []metav1.Condition `json:"conditions"`
// Devfile corresponds to the devfile representation of the Application resource
Devfile string `json:"devfile,omitempty"`
}
ApplicationStatus defines the observed state of Application
func (*ApplicationStatus) DeepCopy ¶
func (in *ApplicationStatus) DeepCopy() *ApplicationStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationStatus.
func (*ApplicationStatus) DeepCopyInto ¶
func (in *ApplicationStatus) DeepCopyInto(out *ApplicationStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Builder ¶
type Builder struct {
GroupVersion schema.GroupVersion
runtime.SchemeBuilder
}
Builder builds a new Scheme for mapping go types to Kubernetes GroupVersionKinds.
func (*Builder) AddToScheme ¶
AddToScheme adds all registered types to s.
func (*Builder) Register ¶
Register adds one or more objects to the SchemeBuilder so they can be added to a Scheme. Register mutates bld.
func (*Builder) RegisterAll ¶
RegisterAll registers all types from the Builder argument. RegisterAll mutates bld.
type Component ¶
type Component struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ComponentSpec `json:"spec"`
Status ComponentStatus `json:"status,omitempty"`
}
Component is the Schema for the components API. For description, refer to <a href="https://konflux-ci.dev/docs/reference/kube-apis/application-api/"> Hybrid Application Service Kube API </a> +kubebuilder:resource:path=components,shortName=cmp;comp +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.conditions[-1].status" +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[-1].reason" +kubebuilder:printcolumn:name="Type",type="string",JSONPath=".status.conditions[-1].type"
func (*Component) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Component.
func (*Component) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Component) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ComponentActions ¶
type ComponentActions struct {
// Send a PR with build pipeline configuration proposal for Component version(s).
// If not set, version onboarding will be done without pipeline configuration PR.
// Could be used after onboarding to create / renew build pipeline definition.
// Optional.
CreateConfiguration ComponentCreatePipelineConfiguration `json:"create-pipeline-configuration-pr,omitempty"`
// Specify name of component version to restart the push build for.
// Can be specified together with 'trigger-push-builds' and any duplicates will be removed.
// Optional.
TriggerBuild string `json:"trigger-push-build,omitempty"`
// Specify names of component versions to restart the push build for.
// Can be specified together with 'trigger-push-build' and any duplicates will be removed.
// Optional.
TriggerBuilds []string `json:"trigger-push-builds,omitempty"`
}
func (*ComponentActions) DeepCopy ¶
func (in *ComponentActions) DeepCopy() *ComponentActions
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentActions.
func (*ComponentActions) DeepCopyInto ¶
func (in *ComponentActions) DeepCopyInto(out *ComponentActions)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComponentBuildPipeline ¶
type ComponentBuildPipeline struct {
// Pipeline used for pull and push pipeline runs.
// Can specify just one of: pipelinespec-from-bundle, pipelineref-by-name, pipelineref-by-git-resolver.
// Optional.
PullAndPush PipelineDefinition `json:"pull-and-push,omitempty"`
// Pipeline used for pull pipeline run.
// Can specify just one of: pipelinespec-from-bundle, pipelineref-by-name, pipelineref-by-git-resolver.
// Optional.
Pull PipelineDefinition `json:"pull,omitempty"`
// Pipeline used for push pipeline run.
// Can specify just one of: pipelinespec-from-bundle, pipelineref-by-name, pipelineref-by-git-resolver.
// Optional.
Push PipelineDefinition `json:"push,omitempty"`
}
func (*ComponentBuildPipeline) DeepCopy ¶
func (in *ComponentBuildPipeline) DeepCopy() *ComponentBuildPipeline
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentBuildPipeline.
func (*ComponentBuildPipeline) DeepCopyInto ¶
func (in *ComponentBuildPipeline) DeepCopyInto(out *ComponentBuildPipeline)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComponentCreatePipelineConfiguration ¶
type ComponentCreatePipelineConfiguration struct {
// When specified it will send a PR with build pipeline configuration proposal for all Component versions.
// Has precedence over 'version' and 'versions'.
// Optional.
AllVersions bool `json:"all-versions,omitempty"`
// When specified it will send a PR with build pipeline configuration proposal for the Component version.
// Can be specified together with 'versions' and any duplicates will be removed.
// Optional.
Version string `json:"version,omitempty"`
// When specified it will send a PR with build pipeline configuration proposal for Component versions.
// Can be specified together with 'version' and any duplicates will be removed.
// Optional.
Versions []string `json:"versions,omitempty"`
}
func (*ComponentCreatePipelineConfiguration) DeepCopy ¶
func (in *ComponentCreatePipelineConfiguration) DeepCopy() *ComponentCreatePipelineConfiguration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentCreatePipelineConfiguration.
func (*ComponentCreatePipelineConfiguration) DeepCopyInto ¶
func (in *ComponentCreatePipelineConfiguration) DeepCopyInto(out *ComponentCreatePipelineConfiguration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComponentDetectionDescription ¶
type ComponentDetectionDescription struct {
// DevfileFound tells if a devfile is found in the component
DevfileFound bool `json:"devfileFound,omitempty"`
// Language specifies the language of the component detected
// Example: JavaScript
Language string `json:"language,omitempty"`
// ProjectType specifies the type of project for the component detected
// Example Node.JS
ProjectType string `json:"projectType,omitempty"`
// ComponentStub is a stub of the component detected with all the info gathered from the devfile or service detection
ComponentStub ComponentSpec `json:"componentStub,omitempty"`
}
ComponentDetectionDescription holds all the information about the component being detected
func (*ComponentDetectionDescription) DeepCopy ¶
func (in *ComponentDetectionDescription) DeepCopy() *ComponentDetectionDescription
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentDetectionDescription.
func (*ComponentDetectionDescription) DeepCopyInto ¶
func (in *ComponentDetectionDescription) DeepCopyInto(out *ComponentDetectionDescription)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComponentDetectionMap ¶
type ComponentDetectionMap map[string]ComponentDetectionDescription
ComponentDetectionMap is a map containing all the components and their detected information
func (ComponentDetectionMap) DeepCopy ¶
func (in ComponentDetectionMap) DeepCopy() ComponentDetectionMap
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentDetectionMap.
func (ComponentDetectionMap) DeepCopyInto ¶
func (in ComponentDetectionMap) DeepCopyInto(out *ComponentDetectionMap)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComponentDetectionQuery ¶
type ComponentDetectionQuery struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ComponentDetectionQuerySpec `json:"spec"`
Status ComponentDetectionQueryStatus `json:"status,omitempty"`
}
ComponentDetectionQuery is the Schema for the componentdetectionqueries API. For description, refer to <a href="https://konflux-ci.dev/docs/reference/kube-apis/application-api/"> Hybrid Application Service Kube API </a> +kubebuilder:resource:path=componentdetectionqueries,shortName=hcdq;compdetection +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.conditions[-1].status" +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[-1].reason" +kubebuilder:printcolumn:name="Type",type="string",JSONPath=".status.conditions[-1].type"
func (*ComponentDetectionQuery) DeepCopy ¶
func (in *ComponentDetectionQuery) DeepCopy() *ComponentDetectionQuery
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentDetectionQuery.
func (*ComponentDetectionQuery) DeepCopyInto ¶
func (in *ComponentDetectionQuery) DeepCopyInto(out *ComponentDetectionQuery)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ComponentDetectionQuery) DeepCopyObject ¶
func (in *ComponentDetectionQuery) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ComponentDetectionQueryList ¶
type ComponentDetectionQueryList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []ComponentDetectionQuery `json:"items"`
}
ComponentDetectionQueryList contains a list of ComponentDetectionQuery
func (*ComponentDetectionQueryList) DeepCopy ¶
func (in *ComponentDetectionQueryList) DeepCopy() *ComponentDetectionQueryList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentDetectionQueryList.
func (*ComponentDetectionQueryList) DeepCopyInto ¶
func (in *ComponentDetectionQueryList) DeepCopyInto(out *ComponentDetectionQueryList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ComponentDetectionQueryList) DeepCopyObject ¶
func (in *ComponentDetectionQueryList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ComponentDetectionQuerySpec ¶
type ComponentDetectionQuerySpec struct {
// Git Source for a Component.
// Required.
// +required
GitSource GitSource `json:"git"`
// Secret describes the name of an optional Kubernetes secret containing a Personal Access Token to access the git repostiory.
// Optional.
// +optional
Secret string `json:"secret,omitempty"`
// It defines if should generate random characters at the end of the component name instead of a predicted default value
// The default value is false.
// If the value is set to true, component name will always have random characters appended
// Optional.
// +optional
GenerateComponentName bool `json:"generateComponentName,omitempty"`
}
ComponentDetectionQuerySpec defines the desired state of ComponentDetectionQuery
func (*ComponentDetectionQuerySpec) DeepCopy ¶
func (in *ComponentDetectionQuerySpec) DeepCopy() *ComponentDetectionQuerySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentDetectionQuerySpec.
func (*ComponentDetectionQuerySpec) DeepCopyInto ¶
func (in *ComponentDetectionQuerySpec) DeepCopyInto(out *ComponentDetectionQuerySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComponentDetectionQueryStatus ¶
type ComponentDetectionQueryStatus struct {
// Conditions is an array of the ComponentDetectionQuery's status conditions
Conditions []metav1.Condition `json:"conditions,omitempty"`
// ComponentDetected gives a list of components and the info from detection
ComponentDetected ComponentDetectionMap `json:"componentDetected,omitempty"`
}
ComponentDetectionQueryStatus defines the observed state of ComponentDetectionQuery
func (*ComponentDetectionQueryStatus) DeepCopy ¶
func (in *ComponentDetectionQueryStatus) DeepCopy() *ComponentDetectionQueryStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentDetectionQueryStatus.
func (*ComponentDetectionQueryStatus) DeepCopyInto ¶
func (in *ComponentDetectionQueryStatus) DeepCopyInto(out *ComponentDetectionQueryStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComponentList ¶
type ComponentList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Component `json:"items"`
}
ComponentList contains a list of Component
func (*ComponentList) DeepCopy ¶
func (in *ComponentList) DeepCopy() *ComponentList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentList.
func (*ComponentList) DeepCopyInto ¶
func (in *ComponentList) DeepCopyInto(out *ComponentList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ComponentList) DeepCopyObject ¶
func (in *ComponentList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ComponentSource ¶
type ComponentSource struct {
ComponentSourceUnion `json:",inline"`
}
ComponentSource describes the Component source
func (*ComponentSource) DeepCopy ¶
func (in *ComponentSource) DeepCopy() *ComponentSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentSource.
func (*ComponentSource) DeepCopyInto ¶
func (in *ComponentSource) DeepCopyInto(out *ComponentSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComponentSourceUnion ¶
type ComponentSourceUnion struct {
// Git Source for a Component.
// Optional.
// !!! Will be removed when we remove old model
GitSource *GitSource `json:"git,omitempty"`
// Git repository URL for the component.
// Optional.
// !!! Will be required when we remove old model
GitURL string `json:"url,omitempty"`
// Dockerfile path for all versions, unless explicitly specified for a version.
// Used only when sending a PR with build pipeline configuration was requested via 'spec.actions.create-pipeline-configuration-pr'.
// Default: "Dockerfile"
// Optional.
DockerfileURI string `json:"dockerfileUri,omitempty"`
// List of all versions for this component.
// Optional.
// !!! Will be required when we remove old model
Versions []ComponentVersion `json:"versions,omitempty"`
}
+union
func (*ComponentSourceUnion) DeepCopy ¶
func (in *ComponentSourceUnion) DeepCopy() *ComponentSourceUnion
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentSourceUnion.
func (*ComponentSourceUnion) DeepCopyInto ¶
func (in *ComponentSourceUnion) DeepCopyInto(out *ComponentSourceUnion)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComponentSpec ¶
type ComponentSpec struct {
// +kubebuilder:validation:Pattern=^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
// +kubebuilder:validation:MaxLength=63
// ComponentName is name of the component to be added to the Application. The name must adhere to DNS-1123 validation.
// Optional.
// +optional
// !!! Will be removed when we remove old model
ComponentName string `json:"componentName,omitempty"`
// +kubebuilder:validation:Pattern=^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
// Application is the name of the application resource that the component belongs to.
// Optional.
// +optional
// !!! Will be removed when we remove old model
Application string `json:"application,omitempty"`
// Secret describes the name of a Kubernetes secret containing either:
// 1. A Personal Access Token to access the Component's git repostiory (if using a Git-source component) or
// 2. An Image Pull Secret to access the Component's container image (if using an Image-source component).
// Optional.
// +optional
// !!! Will be removed when we remove old model
Secret string `json:"secret,omitempty"`
// Source describes the Component source.
// Required.
// +required
Source ComponentSource `json:"source"`
// Compute Resources required by this component.
// Optional.
// +optional
Resources corev1.ResourceRequirements `json:"resources,omitempty"`
// The number of replicas to deploy the component with.
// Optional.
// +optional
// !!! Will be removed when we remove old model
Replicas *int `json:"replicas,omitempty"`
// The port to expose the component over.
// Optional.
// +optional
// !!! Will be removed when we remove old model
TargetPort int `json:"targetPort,omitempty"`
// The route to expose the component with.
// Optional.
// +optional
// !!! Will be removed when we remove old model
Route string `json:"route,omitempty"`
// An array of environment variables to add to the component (ValueFrom not currently supported)
// Optional
// +optional
Env []corev1.EnvVar `json:"env,omitempty"`
// The container image repository to use for this component (without tag).
// Either will be set by Image Repository, or explicitly specified with custom repo.
// All versions of this component will use this single image repository.
// Example: quay.io/org/tenant/component
// Optional.
// +optional
ContainerImage string `json:"containerImage,omitempty"`
// Whether or not to bypass the generation of GitOps resources for the Component. Defaults to false.
// Optional.
// +optional
// !!! Will be removed when we remove old model
SkipGitOpsResourceGeneration bool `json:"skipGitOpsResourceGeneration,omitempty"`
// The list of components to be nudged by this components build upon a successful result.
// Optional.
// +optional
// !!! Will be removed when we remove old model
BuildNudgesRef []string `json:"build-nudges-ref,omitempty"`
// Specific actions that will be processed by the controller and then removed from 'spec.actions'.
// Used for triggering builds or creating pipeline configuration PRs.
// Optional.
// +optional
Actions ComponentActions `json:"actions,omitempty"`
// When 'true', during offboarding a cleaning PR won't be created.
// Default: false.
// Optional.
// +optional
SkipOffboardingPr bool `json:"skip-offboarding-pr,omitempty"`
// Used for setting additional settings for the Repository CR.
// Optional.
// +optional
RepositorySettings RepositorySettings `json:"repository-settings,omitempty"`
// Used only when sending a PR with build pipeline configuration was requested via 'spec.actions.create-pipeline-configuration-pr'.
// Pipeline used for all versions, unless explicitly specified for a specific version.
// When omitted it has to be specified in all versions.
// Optional.
// +optional
DefaultBuildPipeline ComponentBuildPipeline `json:"default-build-pipeline,omitempty"`
}
ComponentSpec defines the desired state of Component
func (*ComponentSpec) DeepCopy ¶
func (in *ComponentSpec) DeepCopy() *ComponentSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentSpec.
func (*ComponentSpec) DeepCopyInto ¶
func (in *ComponentSpec) DeepCopyInto(out *ComponentSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComponentStatus ¶
type ComponentStatus struct {
// Conditions is an array of the Component's status conditions
Conditions []metav1.Condition `json:"conditions,omitempty"`
// Webhook URL generated by Builds
// !!! Will be removed when we remove old model
Webhook string `json:"webhook,omitempty"`
// The devfile model for the Component CR
// !!! Will be removed when we remove old model
Devfile string `json:"devfile,omitempty"`
// GitOps specific status for the Component CR
// !!! Will be removed when we remove old model
GitOps GitOpsStatus `json:"gitops,omitempty"`
// The last built commit id (SHA-1 checksum) from the latest component build.
// Example: 41fbdb124775323f58fd5ce93c70bb7d79c20650.
// !!! Will be removed when we remove old model SHOULD this be in version specific section??
LastBuiltCommit string `json:"lastBuiltCommit,omitempty"`
// The last digest image component promoted with.
// Example: quay.io/someorg/somerepository@sha256:5ca85b7f7b9da18a9c4101e81ee1d9bac35ac2b0b0221908ff7389204660a262.
// !!! Will be removed when we remove old model SHOULD this be in version specific section??
LastPromotedImage string `json:"lastPromotedImage,omitempty"`
// The list of names of Components whose builds nudge this resource (their spec.build-nudges-ref[] references this component)
// !!! Will be removed when we remove old model
BuildNudgedBy []string `json:"build-nudged-by,omitempty"`
// Identifies which additional settings are used for the Repository CR.
RepositorySettings RepositorySettings `json:"repository-settings,omitempty"`
// General error message, not specific to any version (version-specific errors are in versions[].message).
// Example: "Spec.ContainerImage is not set" or "GitHub App is not installed".
Message string `json:"message,omitempty"`
// Name of Repository CR for the component.
PacRepository string `json:"pac-repository,omitempty"`
// All versions which were processed by onboarding.
// When version is removed from the spec, offboarding will remove it from the status.
Versions []ComponentVersionStatus `json:"versions,omitempty"`
}
ComponentStatus defines the observed state of Component
func (*ComponentStatus) DeepCopy ¶
func (in *ComponentStatus) DeepCopy() *ComponentStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentStatus.
func (*ComponentStatus) DeepCopyInto ¶
func (in *ComponentStatus) DeepCopyInto(out *ComponentStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComponentVersion ¶
type ComponentVersion struct {
// Used only when sending a PR with build pipeline configuration was requested via 'spec.actions.create-pipeline-configuration-pr'.
// Pipeline used for the version; when omitted, the default pipeline will be used from 'spec.default-build-pipeline'.
// Optional.
BuildPipeline ComponentBuildPipeline `json:"build-pipeline,omitempty"`
// Context directory for the version.
// Used only when sending a PR with build pipeline configuration was requested via 'spec.actions.create-pipeline-configuration-pr'.
// Default: "" (empty string, root of repository).
// Optional.
Context string `json:"context,omitempty"`
// Dockerfile path for the version.
// Used only when sending a PR with build pipeline configuration was requested via 'spec.actions.create-pipeline-configuration-pr'.
// Default: "Dockerfile".
// Optional.
DockerfileURI string `json:"dockerfileUri,omitempty"`
// User defined name for the version.
// After sanitization (lower case, removing spaces, etc) all version names must be unique.
// Required.
// +required
Name string `json:"name"`
// Git branch to use for the version.
// Required.
// +required
Revision string `json:"revision"`
// When 'true' it will disable builds for a revision in the version.
// Default: false.
// Optional.
SkipBuilds bool `json:"skip-builds,omitempty"`
}
func (*ComponentVersion) DeepCopy ¶
func (in *ComponentVersion) DeepCopy() *ComponentVersion
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentVersion.
func (*ComponentVersion) DeepCopyInto ¶
func (in *ComponentVersion) DeepCopyInto(out *ComponentVersion)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComponentVersionStatus ¶
type ComponentVersionStatus struct {
// Link with onboarding PR if requested by 'spec.actions.create-pipeline-configuration-pr'.
// Only present if onboarding was successful.
// Example: https://github.com/user/repo/pull/1
ConfigurationMergeURL string `json:"configuration-merge-url,omitempty"`
// Version specific error message.
// Example: "pipeline for this version doesn't exist"
Message string `json:"message,omitempty"`
// Name for the version.
Name string `json:"name,omitempty"`
// Onboarding status will be either 'succeeded' or 'failed' ('disabled' won't be there because we will just remove specific version section).
OnboardingStatus string `json:"onboarding-status,omitempty"`
// Timestamp for when onboarding happened.
// Only present if onboarding was successful.
// Example: "29 May 2024 15:11:16 UTC"
OnboardingTime string `json:"onboarding-time,omitempty"`
// Git revision (branch) for the version.
Revision string `json:"revision,omitempty"`
// Identifies that builds for the revision in the version are disabled.
SkipBuilds bool `json:"skip-builds,omitempty"`
}
func (*ComponentVersionStatus) DeepCopy ¶
func (in *ComponentVersionStatus) DeepCopy() *ComponentVersionStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentVersionStatus.
func (*ComponentVersionStatus) DeepCopyInto ¶
func (in *ComponentVersionStatus) DeepCopyInto(out *ComponentVersionStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GitOpsStatus ¶
type GitOpsStatus struct {
// RepositoryURL is the gitops repository URL for the component
RepositoryURL string `json:"repositoryURL,omitempty"`
// Branch is the git branch used for the gitops repository
Branch string `json:"branch,omitempty"`
// Context is the path within the gitops repository used for the gitops resources
Context string `json:"context,omitempty"`
// ResourceGenerationSkipped is whether or not GitOps resource generation was skipped for the component
ResourceGenerationSkipped bool `json:"resourceGenerationSkipped,omitempty"`
// CommitID is the most recent commit ID in the GitOps repository for this component
CommitID string `json:"commitID,omitempty"`
}
GitOpsStatus contains GitOps repository-specific status for the component !!! Will be removed when we remove old model
func (*GitOpsStatus) DeepCopy ¶
func (in *GitOpsStatus) DeepCopy() *GitOpsStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitOpsStatus.
func (*GitOpsStatus) DeepCopyInto ¶
func (in *GitOpsStatus) DeepCopyInto(out *GitOpsStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GitSource ¶
type GitSource struct {
// An HTTPS URL representing the git repository to create the component from.
URL string `json:"url"`
// Specify a branch/tag/commit id. If not specified, default is `main`/`master`.
// Example: devel.
// Optional.
Revision string `json:"revision,omitempty"`
// A relative path inside the git repo containing the component
// Example: folderA/folderB/gitops.
// Optional.
Context string `json:"context,omitempty"`
// If specified, the devfile at the URI will be used for the component. Can be a local path inside the repository, or an external URL.
// Example: https://raw.githubusercontent.com/devfile-samples/devfile-sample-java-springboot-basic/main/devfile.yaml.
// Optional.
DevfileURL string `json:"devfileUrl,omitempty"`
// If specified, the dockerfile at the URI will be used for the component. Can be a local path inside the repository, or an external URL.
// Optional.
DockerfileURL string `json:"dockerfileUrl,omitempty"`
}
!!! Will be removed when we remove old model
func (*GitSource) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitSource.
func (*GitSource) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PipelineDefinition ¶
type PipelineDefinition struct {
// Will be used to fill out PipelineRef in pipeline runs to user specific pipeline via git resolver,
// specifying repository with a pipeline definition.
// Optional.
PipelineRefGit PipelineRefGit `json:"pipelineref-by-git-resolver,omitempty"`
// Will be used to fill out PipelineRef in pipeline runs to user specific pipeline.
// Such pipeline definition has to be in .tekton.
// Optional.
PipelineRefName string `json:"pipelineref-by-name,omitempty"`
// Will be used to fetch bundle and fill out PipelineSpec in pipeline runs.
// Pipeline name is based on build-pipeline-config CM in build-service NS.
// When 'latest' bundle is specified, bundle image will be used from CM.
// When bundle is specified to specific image bundle, then that one will be used
// and pipeline name will be used to fetch pipeline from that bundle.
// Optional.
PipelineSpecFromBundle PipelineSpecFromBundle `json:"pipelinespec-from-bundle,omitempty"`
}
func (*PipelineDefinition) DeepCopy ¶
func (in *PipelineDefinition) DeepCopy() *PipelineDefinition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineDefinition.
func (*PipelineDefinition) DeepCopyInto ¶
func (in *PipelineDefinition) DeepCopyInto(out *PipelineDefinition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PipelineRefGit ¶
type PipelineRefGit struct {
// Path to the pipeline definition file within the repository.
// Example: pipeline/push.yaml
// Required.
// +required
PathInRepo string `json:"pathInRepo"`
// Git revision (branch, tag, or commit) to use.
// Example: main
// Required.
// +required
Revision string `json:"revision"`
// Git repository URL containing the pipeline definition.
// Example: https://github.com/custom-pipelines/pipelines.git
// Required.
// +required
Url string `json:"url"`
}
func (*PipelineRefGit) DeepCopy ¶
func (in *PipelineRefGit) DeepCopy() *PipelineRefGit
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineRefGit.
func (*PipelineRefGit) DeepCopyInto ¶
func (in *PipelineRefGit) DeepCopyInto(out *PipelineRefGit)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PipelineSpecFromBundle ¶
type PipelineSpecFromBundle struct {
// Bundle image reference. Use 'latest' to get bundle from build-pipeline-config CM,
// or specify a specific bundle image.
// Required.
// +required
Bundle string `json:"bundle"`
// Pipeline name to fetch from the bundle, or from build-pipeline-config CM.
// Required.
// +required
Name string `json:"name"`
}
func (*PipelineSpecFromBundle) DeepCopy ¶
func (in *PipelineSpecFromBundle) DeepCopy() *PipelineSpecFromBundle
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineSpecFromBundle.
func (*PipelineSpecFromBundle) DeepCopyInto ¶
func (in *PipelineSpecFromBundle) DeepCopyInto(out *PipelineSpecFromBundle)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RepositorySettings ¶
type RepositorySettings struct {
// When specified, will set value of `comment_strategy` in the Repository CR
// Optional.
CommentStrategy string `json:"comment-strategy,omitempty"`
// When specified, will add values to `github_app_token_scope_repos` in the Repository CR
// Optional.
GithubAppTokenScopeRepos []string `json:"github-app-token-scope-repos,omitempty"`
}
func (*RepositorySettings) DeepCopy ¶
func (in *RepositorySettings) DeepCopy() *RepositorySettings
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RepositorySettings.
func (*RepositorySettings) DeepCopyInto ¶
func (in *RepositorySettings) DeepCopyInto(out *RepositorySettings)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Snapshot ¶
type Snapshot struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec SnapshotSpec `json:"spec,omitempty"`
Status SnapshotStatus `json:"status,omitempty"`
}
Snapshot is the Schema for the snapshots API +kubebuilder:resource:path=snapshots,shortName=as;snapshot
func (*Snapshot) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Snapshot.
func (*Snapshot) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Snapshot) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type SnapshotArtifacts ¶
type SnapshotArtifacts struct {
// NOTE: This field (and struct) are placeholders.
// - Until this API is stabilized, consumers of the API may store any unstructured JSON/YAML data here,
// but no backwards compatibility will be preserved.
UnstableFields *apiextensionsv1.JSON `json:"unstableFields,omitempty"`
}
SnapshotArtifacts is a placeholder section for 'artifact links' we want to maintain to other AppStudio resources.
For example: here I'm imagining we might want to keep track of container image <=> (source code repo, commit sha) links, Which might be useful to present to the user within the UI.
func (*SnapshotArtifacts) DeepCopy ¶
func (in *SnapshotArtifacts) DeepCopy() *SnapshotArtifacts
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnapshotArtifacts.
func (*SnapshotArtifacts) DeepCopyInto ¶
func (in *SnapshotArtifacts) DeepCopyInto(out *SnapshotArtifacts)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SnapshotComponent ¶
type SnapshotComponent struct {
// Name is the name of the component
Name string `json:"name"`
// Version is the component verison. Only required if multiple versions of the same
// Component are in the Snapshot
Version string `json:"version"`
// ContainerImage is the container image to use when deploying the component, as part of a Snapshot
ContainerImage string `json:"containerImage"`
// Source describes the Component source.
// Optional.
// +optional
Source ComponentSource `json:"source,omitempty"`
}
SnapshotComponent
func (*SnapshotComponent) DeepCopy ¶
func (in *SnapshotComponent) DeepCopy() *SnapshotComponent
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnapshotComponent.
func (*SnapshotComponent) DeepCopyInto ¶
func (in *SnapshotComponent) DeepCopyInto(out *SnapshotComponent)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SnapshotList ¶
type SnapshotList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Snapshot `json:"items"`
}
SnapshotList contains a list of Snapshot
func (*SnapshotList) DeepCopy ¶
func (in *SnapshotList) DeepCopy() *SnapshotList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnapshotList.
func (*SnapshotList) DeepCopyInto ¶
func (in *SnapshotList) DeepCopyInto(out *SnapshotList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SnapshotList) DeepCopyObject ¶
func (in *SnapshotList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type SnapshotSpec ¶
type SnapshotSpec struct {
// Application is a reference to the name of an Application resource within the same namespace, which defines the target application for the Snapshot (when used with a Binding).
Application string `json:"application"`
// ComponentGroup is a reference to the name of a ComponentGroup resource within the same namespace, which defines the target ComponentGroup for the Snapshot.
ComponentGroup string `json:"componentGroup"`
// DisplayName is a user-visible, user-definable name for the resource (and is not used for any functional behaviour)
DisplayName string `json:"displayName,omitempty"`
// DisplayDescription is a user-visible, user definable description for the resource (and is not used for any functional behaviour)
DisplayDescription string `json:"displayDescription,omitempty"`
// Components field contains the sets of components to deploy as part of this snapshot.
Components []SnapshotComponent `json:"components,omitempty"`
// Artifacts is a placeholder section for 'artifact links' we want to maintain to other AppStudio resources.
// See Environment API doc for details.
Artifacts SnapshotArtifacts `json:"artifacts,omitempty"`
}
SnapshotSpec defines the desired state of Snapshot
func (*SnapshotSpec) DeepCopy ¶
func (in *SnapshotSpec) DeepCopy() *SnapshotSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnapshotSpec.
func (*SnapshotSpec) DeepCopyInto ¶
func (in *SnapshotSpec) DeepCopyInto(out *SnapshotSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SnapshotStatus ¶
type SnapshotStatus struct {
// Conditions represent the latest available observations for the Snapshot
// +optional
Conditions []metav1.Condition `json:"conditions"`
}
SnapshotStatus defines the observed state of Snapshot
func (*SnapshotStatus) DeepCopy ¶
func (in *SnapshotStatus) DeepCopy() *SnapshotStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnapshotStatus.
func (*SnapshotStatus) DeepCopyInto ¶
func (in *SnapshotStatus) DeepCopyInto(out *SnapshotStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.