Application API Reference

appstudio.redhat.com/v1alpha1

Package v1alpha1 contains API Schema definitions for the appstudio v1alpha1 API group

Application

Application is the Schema for the applications API.

Appears In:
Field Description Default Validation

apiVersion string

appstudio.redhat.com/v1alpha1

kind string

Application

metadata ObjectMeta

Refer to Kubernetes API documentation for fields of metadata.

ApplicationGitRepository

ApplicationGitRepository defines a git repository for a given Application resource (either appmodel or gitops)

Appears In:
Field Description Default Validation

url string

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.

branch string

Branch corresponds to the branch in the repository that should be used
Example: devel.
Optional.

context string

Context corresponds to the context within the repository that should be used
Example: folderA/folderB/gitops.
Optional.

ApplicationList

ApplicationList contains a list of Application

Field Description Default Validation

apiVersion string

appstudio.redhat.com/v1alpha1

kind string

ApplicationList

metadata ListMeta

Refer to Kubernetes API documentation for fields of metadata.

items Application array

ApplicationSpec

ApplicationSpec defines the desired state of Application

Appears In:
Field Description Default Validation

displayName string

DisplayName refers to the name that an application will be deployed with in App Studio.
Required.

appModelRepository ApplicationGitRepository

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.

gitOpsRepository ApplicationGitRepository

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.

description string

Description refers to a brief description of the application.
Optional.

ApplicationStatus

ApplicationStatus defines the observed state of Application

Appears In:
Field Description Default Validation

conditions Condition array

Conditions is an array of the Application’s status conditions

devfile string

Devfile corresponds to the devfile representation of the Application resource

Component

Component is the Schema for the components API.

Appears In:
Field Description Default Validation

apiVersion string

appstudio.redhat.com/v1alpha1

kind string

Component

metadata ObjectMeta

Refer to Kubernetes API documentation for fields of metadata.

ComponentActions

Appears In:
Field Description Default Validation

create-pipeline-configuration-pr ComponentCreatePipelineConfiguration

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.

trigger-push-build string

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.

trigger-push-builds string array

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.

ComponentBuildPipeline

Field Description Default Validation

pull-and-push PipelineDefinition

Pipeline used for pull and push pipeline runs.
Can specify just one of: pipelinespec-from-bundle, pipelineref-by-name, pipelineref-by-git-resolver.
Optional.

Pipeline used for pull pipeline run.
Can specify just one of: pipelinespec-from-bundle, pipelineref-by-name, pipelineref-by-git-resolver.
Optional.

Pipeline used for push pipeline run.
Can specify just one of: pipelinespec-from-bundle, pipelineref-by-name, pipelineref-by-git-resolver.
Optional.

ComponentCreatePipelineConfiguration

Appears In:
Field Description Default Validation

all-versions boolean

When specified it will send a PR with build pipeline configuration proposal for all Component versions.
Has precedence over 'version' and 'versions'.
Optional.

version string

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.

versions string array

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.

ComponentDetectionDescription

ComponentDetectionDescription holds all the information about the component being detected

Appears In:
Field Description Default Validation

devfileFound boolean

DevfileFound tells if a devfile is found in the component

language string

Language specifies the language of the component detected
Example: JavaScript

projectType string

ProjectType specifies the type of project for the component detected
Example Node.js

componentStub ComponentSpec

ComponentStub is a stub of the component detected with all the info gathered from the devfile or service detection

ComponentDetectionMap

ComponentDetectionMap is a map containing all the components and their detected information

ComponentDetectionQuery

ComponentDetectionQuery is the Schema for the componentdetectionqueries API.

Field Description Default Validation

apiVersion string

appstudio.redhat.com/v1alpha1

kind string

ComponentDetectionQuery

metadata ObjectMeta

Refer to Kubernetes API documentation for fields of metadata.

ComponentDetectionQueryList

ComponentDetectionQueryList contains a list of ComponentDetectionQuery

Field Description Default Validation

apiVersion string

appstudio.redhat.com/v1alpha1

kind string

ComponentDetectionQueryList

metadata ListMeta

Refer to Kubernetes API documentation for fields of metadata.

ComponentDetectionQuerySpec

ComponentDetectionQuerySpec defines the desired state of ComponentDetectionQuery

Field Description Default Validation

git GitSource

Git Source for a Component.
Required.

secret string

Secret describes the name of an optional Kubernetes secret containing a Personal Access Token to access the git repostiory.
Optional.

generateComponentName boolean

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.

ComponentDetectionQueryStatus

ComponentDetectionQueryStatus defines the observed state of ComponentDetectionQuery

Field Description Default Validation

conditions Condition array

Conditions is an array of the ComponentDetectionQuery’s status conditions

componentDetected ComponentDetectionMap

ComponentDetected gives a list of components and the info from detection

ComponentList

ComponentList contains a list of Component

Field Description Default Validation

apiVersion string

appstudio.redhat.com/v1alpha1

kind string

ComponentList

metadata ListMeta

Refer to Kubernetes API documentation for fields of metadata.

items Component array

ComponentSource

ComponentSource describes the Component source

Field Description Default Validation

git GitSource

Git Source for a Component.
Optional.
!!! Will be removed when we remove old model

url string

Git repository URL for the component.
Optional.
!!! Will be required when we remove old model

dockerfileUri string

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.

versions ComponentVersion array

List of all versions for this component.
Optional.
!!! Will be required when we remove old model

ComponentSourceUnion

Appears In:
Field Description Default Validation

git GitSource

Git Source for a Component.
Optional.
!!! Will be removed when we remove old model

url string

Git repository URL for the component.
Optional.
!!! Will be required when we remove old model

dockerfileUri string

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.

versions ComponentVersion array

List of all versions for this component.
Optional.
!!! Will be required when we remove old model

ComponentSpec

ComponentSpec defines the desired state of Component

Field Description Default Validation

componentName string

ComponentName is name of the component to be added to the Application. The name must adhere to DNS-1123 validation.
Optional.
!!! Will be removed when we remove old model

MaxLength: 63
Pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$

application string

Application is the name of the application resource that the component belongs to.
Optional.
!!! Will be removed when we remove old model

Pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$

secret string

Secret describes the name of a Kubernetes secret containing either:
1. A Personal Access Token to access the Component’s git repository (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.
!!! Will be removed when we remove old model

Source describes the Component source.
Required.

Compute Resources required by this component.
Optional.

replicas integer

The number of replicas to deploy the component with.
Optional.
!!! Will be removed when we remove old model

targetPort integer

The port to expose the component over.
Optional.
!!! Will be removed when we remove old model

route string

The route to expose the component with.
Optional.
!!! Will be removed when we remove old model

env EnvVar array

An array of environment variables to add to the component (ValueFrom not currently supported)
Optional

containerImage string

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.

skipGitOpsResourceGeneration boolean

Whether or not to bypass the generation of GitOps resources for the Component. Defaults to false.
Optional.
!!! Will be removed when we remove old model

build-nudges-ref string array

The list of components to be nudged by this components build upon a successful result.
Optional.
!!! Will be removed when we remove old model

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.

skip-offboarding-pr boolean

When 'true', during offboarding a cleaning PR won’t be created.
Default: false.
Optional.

repository-settings RepositorySettings

Used for setting additional settings for the Repository CR.
Optional.

default-build-pipeline ComponentBuildPipeline

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.

ComponentStatus

ComponentStatus defines the observed state of Component

Appears In:
Field Description Default Validation

conditions Condition array

Conditions is an array of the Component’s status conditions

webhook string

Webhook URL generated by Builds
!!! Will be removed when we remove old model

containerImage string

ContainerImage stores the associated built container image for the component

devfile string

The devfile model for the Component CR
!!! Will be removed when we remove old model

gitops GitOpsStatus

GitOps specific status for the Component CR
!!! Will be removed when we remove old model

lastBuiltCommit string

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??

lastPromotedImage string

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??

build-nudged-by string array

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

repository-settings RepositorySettings

Identifies which additional settings are used for the Repository CR.

message string

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".

pac-repository string

Name of Repository CR for the component.

versions ComponentVersionStatus array

All versions which were processed by onboarding.
When version is removed from the spec, offboarding will remove it from the status.

ComponentVersion

Field Description Default Validation

build-pipeline ComponentBuildPipeline

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.

context string

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.

dockerfileUri string

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.

name string

User defined name for the version.
After sanitization (lower case, removing spaces, etc) all version names must be unique.
Required.

revision string

Git branch to use for the version.
Required.

skip-builds boolean

When 'true' it will disable builds for a revision in the version.
Default: false.
Optional.

ComponentVersionStatus

Appears In:
Field Description Default Validation

configuration-merge-url string

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

message string

Version specific error message.
Example: "pipeline for this version doesn’t exist"

name string

Name for the version.

onboarding-status string

Onboarding status will be either 'succeeded' or 'failed' ('disabled' won’t be there because we will just remove specific version section).

onboarding-time string

Timestamp for when onboarding happened.
Only present if onboarding was successful.
Example: "29 May 2024 15:11:16 UTC"

revision string

Git revision (branch) for the version.

skip-builds boolean

Identifies that builds for the revision in the version are disabled.

GitOpsStatus

GitOpsStatus contains GitOps repository-specific status for the component !!! Will be removed when we remove old model

Appears In:
Field Description Default Validation

repositoryURL string

RepositoryURL is the gitops repository URL for the component

branch string

Branch is the git branch used for the gitops repository

context string

Context is the path within the gitops repository used for the gitops resources

resourceGenerationSkipped boolean

ResourceGenerationSkipped is whether or not GitOps resource generation was skipped for the component

commitID string

CommitID is the most recent commit ID in the GitOps repository for this component

GitSource

!!! Will be removed when we remove old model

Field Description Default Validation

url string

An HTTPS URL representing the git repository to create the component from.

revision string

Specify a branch/tag/commit id. If not specified, default is main/master.
Example: devel.
Optional.

context string

A relative path inside the git repo containing the component
Example: folderA/folderB/gitops.
Optional.

devfileUrl string

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.

dockerfileUrl string

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.

PipelineDefinition

Field Description Default Validation

pipelineref-by-git-resolver PipelineRefGit

Will be used to fill out PipelineRef in pipeline runs to user specific pipeline via git resolver,
specifying repository with a pipeline definition.
Optional.

pipelineref-by-name string

Will be used to fill out PipelineRef in pipeline runs to user specific pipeline.
Such pipeline definition has to be in .tekton.
Optional.

pipelinespec-from-bundle PipelineSpecFromBundle

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.

PipelineRefGit

Appears In:
Field Description Default Validation

pathInRepo string

Path to the pipeline definition file within the repository.
Example: pipeline/push.yaml
Required.

revision string

Git revision (branch, tag, or commit) to use.
Example: main
Required.

url string

Git repository URL containing the pipeline definition.
Example: https://github.com/custom-pipelines/pipelines.git
Required.

PipelineSpecFromBundle

Appears In:
Field Description Default Validation

bundle string

Bundle image reference. Use 'latest' to get bundle from build-pipeline-config CM,
or specify a specific bundle image.
Required.

name string

Pipeline name to fetch from the bundle, or from build-pipeline-config CM.
Required.

RepositorySettings

Field Description Default Validation

comment-strategy string

When specified, will set value of comment_strategy in the Repository CR
Optional.

github-app-token-scope-repos string array

When specified, will add values to github_app_token_scope_repos in the Repository CR
Optional.

Snapshot

Snapshot is the Schema for the snapshots API

Appears In:
Field Description Default Validation

apiVersion string

appstudio.redhat.com/v1alpha1

kind string

Snapshot

metadata ObjectMeta

Refer to Kubernetes API documentation for fields of metadata.

SnapshotArtifacts

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.

Appears In:
Field Description Default Validation

unstableFields JSON

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.

SnapshotComponent

SnapshotComponent

Appears In:
Field Description Default Validation

name string

Name is the name of the component

containerImage string

ContainerImage is the container image to use when deploying the component, as part of a Snapshot

Source describes the Component source.
Optional.

SnapshotList

SnapshotList contains a list of Snapshot

Field Description Default Validation

apiVersion string

appstudio.redhat.com/v1alpha1

kind string

SnapshotList

metadata ListMeta

Refer to Kubernetes API documentation for fields of metadata.

items Snapshot array

SnapshotSpec

SnapshotSpec defines the desired state of Snapshot

Appears In:
Field Description Default Validation

application string

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).

displayName string

DisplayName is a user-visible, user-definable name for the resource (and is not used for any functional behaviour)

displayDescription string

DisplayDescription is a user-visible, user definable description for the resource (and is not used for any functional behaviour)

components SnapshotComponent array

Components field contains the sets of components to deploy as part of this snapshot.

artifacts SnapshotArtifacts

Artifacts is a placeholder section for 'artifact links' we want to maintain to other AppStudio resources.
See Environment API doc for details.

SnapshotStatus

SnapshotStatus defines the observed state of Snapshot

Appears In:
Field Description Default Validation

conditions Condition array

Conditions represent the latest available observations for the Snapshot