Skip to content

Commit 3af210b

Browse files
committed
Migrate all CRs underneath CR heading
Moved the appstudio API custom resources under the "Custom Resources" heading, added links to the API documentation for each resource, and updated the API dcos with npm. #533
1 parent 7c3ffc7 commit 3af210b

File tree

13 files changed

+564
-253
lines changed

13 files changed

+564
-253
lines changed

.vale/styles/config/vocabularies/konflux/accept.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ Snyk
55
Konflux
66
kubectl
77
ITSs
8+
Node.JS

hack/gen-api-docs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ mkdir -p "${genSrc}"
4444
pushd "${genSrc}"
4545

4646
gen_ref_docs "application-api" "Application"
47-
gen_ref_docs "conforma" "Conforma" "https://github.com/conforma/crds.git"
47+
gen_ref_docs "enterprise-contract" "Enterprise Contract" "https://github.com/conforma/crds.git"
4848
gen_ref_docs "image-controller" "Image"
4949
gen_ref_docs "integration-service" "Integration Test"
5050
gen_ref_docs "release-service" "Release"

modules/ROOT/pages/getting-started.adoc

Lines changed: 32 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -40,31 +40,6 @@ This initiative contains an link:https://github.com/opencontainers/image-spec[im
4040

4141
Konflux pushes artifacts that you build in your tenant namespace to an OCI registry along with their supporting metadata (including xref:metadata:index.adoc[SLSA provenance attestations and SBOMs]).
4242

43-
=== Custom Resources
44-
In Kubernetes, a link:https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/[Custom Resource (CR)] is an extension of the Kubernetes API.
45-
46-
All Konflux APIs are Kubernetes CRs.
47-
If you're familiar with common Kubernetes resources such as Pods and Deployments, you'll find that Konflux resources appear on the cluster in the same way:
48-
49-
- Applications
50-
- Components
51-
- Snapshots
52-
- PipelineRuns
53-
54-
This setup enables commonplace Kubernetes client tools, such as link:https://kubernetes.io/docs/reference/kubectl/[kubectl], to understand and interact with {ProductName} APIs.
55-
56-
=== Component
57-
A *Component CR* describes the properties of an OCI artifact.
58-
These properties include the following:
59-
60-
- The Git repository from which the artifact originates.
61-
- The latest built commit.
62-
- Initial build configuration parameters.
63-
- Relationships to other components.
64-
65-
The CR also contains a reference to the single application that owns it.
66-
Component names are unique in a namespace, even when you use the components in different applications.
67-
6843
=== Build Pipeline
6944
When you create a component in {ProductName}, the system pushes a build pipeline to the Git repository in the `.tekton` directory and installs a webhook.
7045

@@ -88,49 +63,66 @@ The test process includes Tekton Tasks such as:
8863
{ProductName} inherits the pattern of defining Tekton build pipelines in Git from its use of https://pipelinesascode.com/[Pipelines as Code (PaC)].
8964
PaC enables you to use a Tekton PipelineDefinition within your Git repository, and for the system to trigger that pipeline whenever a team member submits a new commit or pull request to the repository.
9065

91-
=== Application
92-
An *Application CR* owns multiple components.
93-
It helps to logically group components in the UI.
66+
=== Custom Resources
67+
In Kubernetes, a link:https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/[Custom Resource (CR)] is an extension of the Kubernetes API.
68+
69+
All Konflux APIs are Kubernetes CRs. This setup enables commonplace Kubernetes client tools, such as link:https://kubernetes.io/docs/reference/kubectl/[kubectl], to understand and interact with {ProductName} APIs. If you're familiar with common Kubernetes resources such as Pods and Deployments, you'll find that Konflux resources appear on the cluster in the same way:
70+
71+
==== Component
72+
A xref:reference:kube-apis/application-api.adoc#k8s-api-github-com-konflux-ci-application-api-api-v1alpha1-component[Component CR] describes the properties of an OCI artifact.
73+
These properties include the following:
74+
75+
- The Git repository from which the artifact originates.
76+
- The latest built commit.
77+
- Initial build configuration parameters.
78+
- Relationships to other components.
79+
80+
The CR also contains a reference to the single application that owns it.
81+
Component names are unique in a namespace, even when you use the components in different applications.
82+
83+
==== Application
84+
An xref:reference:kube-apis/application-api.adoc#k8s-api-github-com-konflux-ci-application-api-api-v1alpha1-application[Application CR] owns multiple components. It helps to logically group components in the UI.
9485

9586
When a new component's build pipeline is complete, the Integration Service, which contains the latest Git and OCI references, creates a new snapshot from each of the Component CRs, as well as the just-produced component artifact.
9687
The IntegrationTestScenarios use this output to run.
9788

98-
=== Snapshot
99-
A *Snapshot CR* is an immutable set of component references.
89+
==== Snapshot
90+
A xref:reference:kube-apis/application-api.adoc#k8s-api-github-com-konflux-ci-application-api-api-v1alpha1-snapshot[Snapshot CR] is an immutable set of component references.
10091
It can be created from push or pull request events.
10192
A snapshot defines a set of components, which are either tested or released together.
10293

10394
Over time, as you produce more builds, your tenant namespace will contain many snapshots.
10495
Understand that at any point in time, a given snapshot _might not necessarily_ represent the latest built artifacts for all components in your tenant namespace.
10596

106-
=== IntegrationTestScenario
107-
An *IntegrationTestScenario (ITS) CR* is a Tekton Pipeline that defines a test to run against an entire snapshot.
97+
==== IntegrationTestScenario
98+
An xref:reference:kube-apis/integration-service.adoc#k8s-api-github-com-konflux-ci-integration-service-api-v1alpha1-integrationtestscenario[IntegrationTestScenario (ITS) CR] is a Tekton Pipeline that defines a test to run against an entire snapshot.
10899
The Integration Service runs all configured ITSs for the snapshot's application.
109100
The system also creates a default ITS for every new application to enable EnterpriseContractPolicy checks on all components.
110101

111102
You can configure each ITS as optional for release. All non-optional tests must pass before the new component build is "promoted" to update the references on the component CR.
112103

113-
=== EnterpriseContractPolicy
104+
==== EnterpriseContractPolicy
114105
Building in {ProductName} follows a "build once, release multiple times" mentality, where each release can have separate requirements on the builds before allowing the action.
115-
You codify these build requirements in an EnterpriseContractPolicy (ECP).
106+
You codify these build requirements in an xref:reference:kube-apis/enterprise-contract.adoc#k8s-api-github-com-conforma-crds-api-v1alpha1-enterprisecontractpolicy[EnterpriseContractPolicy CR].
116107

117108
When {ProductName} evaluates an ECP against a snapshot, it returns a single result based on the highest violation.
118109
For example, if all components pass the policy requirements, the policy evaluation is true.
119110
If a single component in a snapshot fails the policy, however, the overall result is a failure even if all of the rest have clean passes.
120111

121-
=== ReleasePlan
122-
A *ReleasePlan (RP) CR* maps an Application you want to release with a release action.
112+
==== ReleasePlan
113+
A xref:reference:kube-apis/release-service.adoc#k8s-api-github-com-konflux-ci-release-service-api-v1alpha1-releaseplan[ReleasePlan (RP) CR] maps an Application you want to release to a release action.
123114
It defines the process to release future Snapshots of your Application in the managed namespace.
124115
It also determines whether automatic releases are enabled and whether you want to provide additional data to each future release pipeline.
125116

126-
=== ReleasePlanAdmission
127-
You also need to create a *ReleasePlanAdmission (RPA) CR* in the managed namespace.
117+
==== ReleasePlanAdmission
118+
You also need to create a xref:reference:kube-apis/release-service.adoc#k8s-api-github-com-konflux-ci-release-service-api-v1alpha1-releaseplanadmission[ReleasePlanAdmission (RPA) CR] in the managed namespace.
128119
It defines the specific pipeline to run and a given ECP, which must pass for each snapshot before that pipeline can proceed.
129120
It also establishes essential details about the delivery of your content that we want to exercise some control over.
121+
130122
For example, if your release pipeline uses an link:https://Github.com/konflux-ci/release-service-catalog/blob/production/tasks/managed/apply-mapping/apply-mapping.yaml[apply-mapping] task, the `.spec.data.mapping.components` section of this resource will define which destination repositories to push your content to.
131123

132-
=== Release
133-
Every time you want to release newly built artifacts, you will create a Release CR in *your* tenant namespace.
124+
==== Release
125+
Every time you want to release newly built artifacts, you will create a xref:reference:kube-apis/release-service.adoc#k8s-api-github-com-konflux-ci-release-service-api-v1alpha1-release[Release CR] in *your* tenant namespace.
134126
The Release CR represents your intent to release some content to customers.
135127
It is an active resource that, when present, will initiate the push of content.
136128

modules/building/pages/configuration-as-code.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,15 @@ You can think of each application variant as the base that defines the structure
9595

9696
Create your base application at `overlay/application-a/application-a-base/application.yaml` like the following:
9797

98-
include::partial$custom-resources/{context}-application.adoc[]
98+
include::partial$custom-resources/{context}-application-api.adoc[]
9999

100100
And its Kustomization file at `overlay/application-a/application-a-base/kustomization.yaml`:
101101

102102
[source,yaml]
103103
----
104104
apiVersion: kustomize.config.k8s.io/v1beta1
105105
kind: Kustomization
106-
106+
107107
resources:
108108
- application.yaml
109109
----
@@ -140,7 +140,7 @@ Define these components as folders in `overlay/application-a/base`. Each folder
140140
----
141141
apiVersion: kustomize.config.k8s.io/v1beta1
142142
kind: Kustomization
143-
143+
144144
resources:
145145
- ../../../../base # Path to base component
146146

modules/building/pages/creating.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ from OCP.
6969
+
7070
*Example `Application.yaml` object*
7171
+
72-
include::partial$custom-resources/{context}-application.adoc[]
72+
include::partial$custom-resources/{context}-application-api.adoc[]
7373

7474
+
7575
*Example `Component.yaml` object*
@@ -95,9 +95,9 @@ $ kubectl apply -f Application.yaml -f Component.yaml -f ImageRepository.yaml
9595
----
9696

9797
+
98-
NOTE: You can create additional components and applications with the same file locally by adding additional custom resource configurations.
98+
NOTE: You can create additional components and applications with the same file locally by adding additional custom resource configurations.
9999

100-
. Now, you can trigger your application’s first build pipeline. In the git repository for your application, using your preferred text editor, open a pull request against the `/.tekton/pull-request.yaml` file.
100+
. Now, you can trigger your application’s first build pipeline. In the git repository for your application, using your preferred text editor, open a pull request against the `/.tekton/pull-request.yaml` file.
101101
.. Specifically, replace any existing value for the `git-url` field with the git URL for your application’s repository. (This is the URL you would use to clone the repository locally; it ends with `.git`.)
102102

103103
+

modules/reference/nav.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*** xref:kube-apis/application-api.adoc#k8s-api-github-com-konflux-ci-application-api-api-v1alpha1-application[Application]
55
*** xref:kube-apis/application-api.adoc#k8s-api-github-com-konflux-ci-application-api-api-v1alpha1-component[Component]
66
*** xref:kube-apis/application-api.adoc#k8s-api-github-com-konflux-ci-application-api-api-v1alpha1-snapshot[Snapshot]
7-
*** xref:kube-apis/conforma.adoc#k8s-api-github-com-conforma-crds-api-v1alpha1-enterprisecontractpolicy[EnterpriseContractPolicy]
7+
*** xref:kube-apis/enterprise-contract.adoc#k8s-api-github-com-conforma-crds-api-v1alpha1-enterprisecontractpolicy[EnterpriseContractPolicy]
88
*** xref:kube-apis/image-controller.adoc#k8s-api-github-com-konflux-ci-image-controller-api-v1alpha1-imagerepository[ImageRepository]
99
*** xref:kube-apis/integration-service.adoc#k8s-api-github-com-konflux-ci-integration-service-api-v1alpha1-integrationtestscenario[IntegrationTestScenario]
1010
*** xref:kube-apis/release-service.adoc#k8s-api-github-com-konflux-ci-release-service-api-v1alpha1-release[Release]

0 commit comments

Comments
 (0)