Skip to content

Commit f61d677

Browse files
committed
feat: Konflux configuration as code
Signed-off-by: Tomas Turek <tturek@redhat.com>
1 parent 2453016 commit f61d677

File tree

111 files changed

+741
-26
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+741
-26
lines changed

konflux-configs/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
## Previewing Changes
2+
To preview your changes, use the Kustomize CLI:
3+
```
4+
kustomize build overlay/prod
5+
```
6+
7+
## Applying configuration to cluster
8+
Before applying changes, ensure you have access to the Konflux cluster. Then, execute the following command:
9+
```
10+
oc apply -k overlay/prod
11+
```
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
4+
resources: []
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
4+
resources:
5+
- project.yaml
6+
- template.yaml
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: projctl.konflux.dev/v1beta1
2+
kind: Project
3+
metadata:
4+
name: ansible
5+
spec:
6+
displayName: "Red Hat Trusted Artifact Signer Ansible"
7+
description: |
8+
Ansible collections to automate the deployment of the Red Hat Trusted Artifact Signer (RHTAS) service on Red Hat Enterprise Linux (RHEL).
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
apiVersion: projctl.konflux.dev/v1beta1
2+
kind: ProjectDevelopmentStreamTemplate
3+
metadata:
4+
name: ansible-template
5+
spec:
6+
project: ansible
7+
variables:
8+
- name: version
9+
description: A version number for a new development stream
10+
- name: branch
11+
description: Git branch
12+
defaultValue: "main"
13+
- name: nameSuffix
14+
description: A suffix which will be added to K8s resource name
15+
defaultValue: "-{{hyphenize .version}}"
16+
resources:
17+
- apiVersion: appstudio.redhat.com/v1alpha1
18+
kind: Application
19+
metadata:
20+
annotations:
21+
application.thumbnail: "9"
22+
name: "ansible{{.nameSuffix}}"
23+
spec:
24+
displayName: "ansible ({{.version}})"
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
- op: add
2+
path: /spec/resources/-
3+
value:
4+
apiVersion: appstudio.redhat.com/v1alpha1
5+
kind: Component
6+
metadata:
7+
annotations:
8+
build.appstudio.openshift.io/pipeline: '{"name":"docker-build","bundle":"latest"}'
9+
build.appstudio.openshift.io/status: '{"pac":{"state":"enabled","merge-url":"https://github.com/securesign/artifact-signer-ansible/pull/259","configuration-time":"Wed, 07 Aug 2024 08:59:18 UTC"},"message":"done"}'
10+
name: "artifact-signer-ansible{{.nameSuffix}}"
11+
spec:
12+
application: "ansible{{.nameSuffix}}"
13+
componentName: "artifact-signer-ansible{{.nameSuffix}}"
14+
source:
15+
git:
16+
context: ./
17+
dockerfileUrl: Dockerfile
18+
revision: "{{.branch}}"
19+
url: https://github.com/securesign/artifact-signer-ansible
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
- op: add
2+
path: /spec/resources/-
3+
value:
4+
apiVersion: appstudio.redhat.com/v1beta2
5+
kind: IntegrationTestScenario
6+
metadata:
7+
annotations:
8+
test.appstudio.openshift.io/kind: enterprise-contract
9+
name: "ansible{{.nameSuffix}}-enterprise-contract"
10+
spec:
11+
application: "ansible{{.nameSuffix}}"
12+
resolverRef:
13+
params:
14+
- name: url
15+
value: https://github.com/konflux-ci/build-definitions
16+
- name: revision
17+
value: main
18+
- name: pathInRepo
19+
value: pipelines/enterprise-contract.yaml
20+
resolver: git
21+
resourceKind: pipeline
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
4+
resources:
5+
- ../base
6+
7+
patches:
8+
- target:
9+
name: ansible-template
10+
kind: ProjectDevelopmentStreamTemplate
11+
path: collection-patch.yaml
12+
- target:
13+
name: ansible-template
14+
kind: ProjectDevelopmentStreamTemplate
15+
path: ec-patch.yaml
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
4+
resources:
5+
- project.yaml
6+
- template.yaml
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: projctl.konflux.dev/v1beta1
2+
kind: Project
3+
metadata:
4+
name: fbc
5+
spec:
6+
displayName: "Multi-version fbc project"
7+
description: |
8+
Multi-version fbc project.

0 commit comments

Comments
 (0)