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. For a detailed description with examples, refer to <a href="https://github.com/redhat-appstudio/book/blob/main/book/HAS/hybrid-application-service-api.md"> Hybrid Application Service Kube API </a>

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. For a detailed description with examples, refer to <a href="https://github.com/redhat-appstudio/book/blob/main/book/HAS/hybrid-application-service-api.md"> Hybrid Application Service Kube API </a>

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.

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. For a detailed description with examples, refer to <a href="https://github.com/redhat-appstudio/book/blob/main/book/HAS/hybrid-application-service-api.md"> Hybrid Application Service Kube API </a>

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.

ComponentSourceUnion

Appears In:
Field Description Default Validation

git GitSource

Git Source for a Component.
Optional.

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

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

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

Source describes the Component source.
Optional.

Compute Resources required by this component.
Optional.

replicas integer

The number of replicas to deploy the component with.
Optional.

targetPort integer

The port to expose the component over.
Optional.

route string

The route to expose the component with.
Optional.

env EnvVar array

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

containerImage string

The container image to build or create the component from
Example: quay.io/someorg/somerepository:latest.
Optional.

skipGitOpsResourceGeneration boolean

Whether or not to bypass the generation of GitOps resources for the Component. Defaults to false.
Optional.

build-nudges-ref string array

The list of components to be nudged by this components build upon a successful result.
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

containerImage string

ContainerImage stores the associated built container image for the component

devfile string

The devfile model for the Component CR

gitops GitOpsStatus

GitOps specific status for the Component CR

lastBuiltCommit string

The last built commit id (SHA-1 checksum) from the latest component build.
Example: 41fbdb124775323f58fd5ce93c70bb7d79c20650.

lastPromotedImage string

The last digest image component promoted with.
Example: quay.io/someorg/somerepository@sha256:5ca85b7f7b9da18a9c4101e81ee1d9bac35ac2b0b0221908ff7389204660a262.

build-nudged-by string array

The list of names of Components whose builds nudge this resource (their spec.build-nudges-ref[] references this component)

GitOpsStatus

GitOpsStatus contains GitOps repository-specific status for the component

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

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.

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