Skip to content

Commit 1b078ba

Browse files
authored
Add konflux-eaas kubesaw tier (#4189)
The user should only be allowed to create select resources (ClusterTemplateInstance, Secrets) in the provisioned namespace. Signed-off-by: Alex Misstear <[email protected]>
1 parent c228c4a commit 1b078ba

25 files changed

+577
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# ----------------------------------------------------------------
2+
# Generated by cli - DO NOT EDIT
3+
# ----------------------------------------------------------------
4+
5+
apiVersion: kustomize.config.k8s.io/v1beta1
6+
kind: Kustomization
7+
resources:
8+
- nstemplatetier-konflux-eaas.yaml
9+
- tiertemplate-konflux-eaas-admin-37575401-37575401.yaml
10+
- tiertemplate-konflux-eaas-clusterresources-885501723-885501723.yaml
11+
- tiertemplate-konflux-eaas-contributor-37575401-37575401.yaml
12+
- tiertemplate-konflux-eaas-eaas-3975606140-3975606140.yaml
13+
- tiertemplate-konflux-eaas-maintainer-37575401-37575401.yaml
14+
- tiertemplate-konflux-eaas-viewer-37575401-37575401.yaml
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# ----------------------------------------------------------------
2+
# Generated by cli - DO NOT EDIT
3+
# ----------------------------------------------------------------
4+
5+
apiVersion: toolchain.dev.openshift.com/v1alpha1
6+
kind: NSTemplateTier
7+
metadata:
8+
name: konflux-eaas
9+
namespace: toolchain-host-operator
10+
spec:
11+
clusterResources:
12+
templateRef: konflux-eaas-clusterresources-885501723-885501723
13+
namespaces:
14+
- templateRef: konflux-eaas-eaas-3975606140-3975606140
15+
spaceRequestConfig:
16+
serviceAccountName: namespace-manager
17+
spaceRoles:
18+
admin:
19+
templateRef: konflux-eaas-admin-37575401-37575401
20+
contributor:
21+
templateRef: konflux-eaas-contributor-37575401-37575401
22+
maintainer:
23+
templateRef: konflux-eaas-maintainer-37575401-37575401
24+
viewer:
25+
templateRef: konflux-eaas-viewer-37575401-37575401
26+
status: {}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# ----------------------------------------------------------------
2+
# Generated by cli - DO NOT EDIT
3+
# ----------------------------------------------------------------
4+
5+
apiVersion: toolchain.dev.openshift.com/v1alpha1
6+
kind: TierTemplate
7+
metadata:
8+
name: konflux-eaas-admin-37575401-37575401
9+
namespace: toolchain-host-operator
10+
spec:
11+
revision: 37575401-37575401
12+
template:
13+
apiVersion: template.openshift.io/v1
14+
kind: Template
15+
metadata: {}
16+
objects: []
17+
tierName: konflux-eaas
18+
type: admin
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# ----------------------------------------------------------------
2+
# Generated by cli - DO NOT EDIT
3+
# ----------------------------------------------------------------
4+
5+
apiVersion: toolchain.dev.openshift.com/v1alpha1
6+
kind: TierTemplate
7+
metadata:
8+
name: konflux-eaas-clusterresources-885501723-885501723
9+
namespace: toolchain-host-operator
10+
spec:
11+
revision: 885501723-885501723
12+
template:
13+
apiVersion: template.openshift.io/v1
14+
kind: Template
15+
metadata: {}
16+
objects:
17+
- apiVersion: toolchain.dev.openshift.com/v1alpha1
18+
kind: Idler
19+
metadata:
20+
name: ${SPACE_NAME}-eaas
21+
spec:
22+
timeoutSeconds: ${{IDLER_TIMEOUT_SECONDS}}
23+
parameters:
24+
- name: SPACE_NAME
25+
required: true
26+
- name: IDLER_TIMEOUT_SECONDS
27+
value: "0"
28+
tierName: konflux-eaas
29+
type: clusterresources
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# ----------------------------------------------------------------
2+
# Generated by cli - DO NOT EDIT
3+
# ----------------------------------------------------------------
4+
5+
apiVersion: toolchain.dev.openshift.com/v1alpha1
6+
kind: TierTemplate
7+
metadata:
8+
name: konflux-eaas-contributor-37575401-37575401
9+
namespace: toolchain-host-operator
10+
spec:
11+
revision: 37575401-37575401
12+
template:
13+
apiVersion: template.openshift.io/v1
14+
kind: Template
15+
metadata: {}
16+
objects: []
17+
tierName: konflux-eaas
18+
type: contributor
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# ----------------------------------------------------------------
2+
# Generated by cli - DO NOT EDIT
3+
# ----------------------------------------------------------------
4+
5+
apiVersion: toolchain.dev.openshift.com/v1alpha1
6+
kind: TierTemplate
7+
metadata:
8+
name: konflux-eaas-eaas-3975606140-3975606140
9+
namespace: toolchain-host-operator
10+
spec:
11+
revision: 3975606140-3975606140
12+
template:
13+
apiVersion: template.openshift.io/v1
14+
kind: Template
15+
metadata: {}
16+
objects:
17+
- apiVersion: v1
18+
kind: Namespace
19+
metadata:
20+
annotations:
21+
openshift.io/description: ${SPACE_NAME}
22+
openshift.io/display-name: ${SPACE_NAME}
23+
openshift.io/requester: ${SPACE_NAME}
24+
labels:
25+
name: ${SPACE_NAME}-eaas
26+
name: ${SPACE_NAME}-eaas
27+
- apiVersion: v1
28+
kind: ServiceAccount
29+
metadata:
30+
name: namespace-manager
31+
namespace: ${SPACE_NAME}-eaas
32+
- apiVersion: rbac.authorization.k8s.io/v1
33+
kind: RoleBinding
34+
metadata:
35+
name: cluster-provisioner-rb
36+
namespace: ${SPACE_NAME}-eaas
37+
roleRef:
38+
apiGroup: rbac.authorization.k8s.io
39+
kind: ClusterRole
40+
name: cluster-provisioner
41+
subjects:
42+
- kind: ServiceAccount
43+
name: namespace-manager
44+
namespace: ${SPACE_NAME}-eaas
45+
- apiVersion: v1
46+
kind: ResourceQuota
47+
metadata:
48+
name: quota
49+
namespace: ${SPACE_NAME}-eaas
50+
spec:
51+
hard:
52+
count/clustertemplateinstances.clustertemplate.openshift.io: "5"
53+
count/configmaps: "0"
54+
count/cronjobs: "0"
55+
count/deployments.apps: "0"
56+
count/jobs: "0"
57+
count/persistentvolumeclaims: "0"
58+
count/pods: "0"
59+
count/replicasets.apps: "0"
60+
count/replicationcontrollers: "0"
61+
count/routes: "0"
62+
count/secrets: "100"
63+
count/services: "0"
64+
count/statefulsets.apps: "0"
65+
limits.cpu: "0"
66+
limits.ephemeral-storage: "0"
67+
limits.memory: "0"
68+
requests.cpu: "0"
69+
requests.ephemeral-storage: "0"
70+
requests.memory: "0"
71+
requests.storage: "0"
72+
parameters:
73+
- name: SPACE_NAME
74+
required: true
75+
tierName: konflux-eaas
76+
type: eaas
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# ----------------------------------------------------------------
2+
# Generated by cli - DO NOT EDIT
3+
# ----------------------------------------------------------------
4+
5+
apiVersion: toolchain.dev.openshift.com/v1alpha1
6+
kind: TierTemplate
7+
metadata:
8+
name: konflux-eaas-maintainer-37575401-37575401
9+
namespace: toolchain-host-operator
10+
spec:
11+
revision: 37575401-37575401
12+
template:
13+
apiVersion: template.openshift.io/v1
14+
kind: Template
15+
metadata: {}
16+
objects: []
17+
tierName: konflux-eaas
18+
type: maintainer
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# ----------------------------------------------------------------
2+
# Generated by cli - DO NOT EDIT
3+
# ----------------------------------------------------------------
4+
5+
apiVersion: toolchain.dev.openshift.com/v1alpha1
6+
kind: TierTemplate
7+
metadata:
8+
name: konflux-eaas-viewer-37575401-37575401
9+
namespace: toolchain-host-operator
10+
spec:
11+
revision: 37575401-37575401
12+
template:
13+
apiVersion: template.openshift.io/v1
14+
kind: Template
15+
metadata: {}
16+
objects: []
17+
tierName: konflux-eaas
18+
type: viewer

components/sandbox/tiers/production/kustomization.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ resources:
88
- appstudio
99
- appstudio-env
1010
- appstudiolarge
11+
- konflux-eaas
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
apiVersion: template.openshift.io/v1
2+
kind: Template
3+
metadata: {}
4+
objects:
5+
- apiVersion: toolchain.dev.openshift.com/v1alpha1
6+
kind: Idler
7+
metadata:
8+
name: ${SPACE_NAME}-eaas
9+
spec:
10+
timeoutSeconds: ${{IDLER_TIMEOUT_SECONDS}}
11+
12+
parameters:
13+
- name: SPACE_NAME
14+
required: true
15+
- name: IDLER_TIMEOUT_SECONDS
16+
# No Idling
17+
value: "0"

0 commit comments

Comments
 (0)