Skip to content

Commit d756f92

Browse files
committed
feat: add Helm chart for OpenShift shared registry setup (group, RBAC, build configs)
Signed-off-by: Yosief Eyob <yosiefogbazion@gmail.com>
1 parent b162c55 commit d756f92

6 files changed

Lines changed: 88 additions & 0 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
apiVersion: v2
2+
name: openshift-registry-setup
3+
description: Sets up shared image registry namespace, team group, and access policies
4+
version: 1.0.0
5+
type: application
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{{- range .Values.builds }}
2+
apiVersion: build.openshift.io/v1
3+
kind: BuildConfig
4+
metadata:
5+
name: {{ .name }}
6+
namespace: {{ $.Values.registryNamespace }}
7+
spec:
8+
output:
9+
to:
10+
kind: ImageStreamTag
11+
name: {{ .name }}:latest
12+
source:
13+
type: Binary
14+
binary: {}
15+
strategy:
16+
type: Docker
17+
dockerStrategy:
18+
dockerfilePath: {{ .dockerfilePath | default "Dockerfile" }}
19+
---
20+
apiVersion: image.openshift.io/v1
21+
kind: ImageStream
22+
metadata:
23+
name: {{ .name }}
24+
namespace: {{ $.Values.registryNamespace }}
25+
spec:
26+
lookupPolicy:
27+
local: false
28+
{{- end }}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: user.openshift.io/v1
2+
kind: Group
3+
metadata:
4+
name: {{ .Values.team.name }}
5+
users:
6+
{{- range .Values.team.members }}
7+
- {{ . }}
8+
{{- end }}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{{- if .Values.globalPullAccess }}
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: RoleBinding
4+
metadata:
5+
name: global-image-puller
6+
namespace: {{ .Values.registryNamespace }}
7+
roleRef:
8+
apiGroup: rbac.authorization.k8s.io
9+
kind: ClusterRole
10+
name: system:image-puller
11+
subjects:
12+
- apiGroup: rbac.authorization.k8s.io
13+
kind: Group
14+
name: system:serviceaccounts
15+
{{- end }}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: rbac.authorization.k8s.io/v1
2+
kind: RoleBinding
3+
metadata:
4+
name: {{ .Values.team.name }}-edit
5+
namespace: {{ .Values.registryNamespace }}
6+
roleRef:
7+
apiGroup: rbac.authorization.k8s.io
8+
kind: ClusterRole
9+
name: edit
10+
subjects:
11+
- apiGroup: rbac.authorization.k8s.io
12+
kind: Group
13+
name: {{ .Values.team.name }}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Namespace for storing shared images
2+
registryNamespace: contextforge-images
3+
4+
# Team group configuration
5+
team:
6+
name: contextforge-team
7+
members:
8+
- Yosief.Eyob@ibm.com
9+
- akshay.shinde26@ibm.com
10+
- brian.hussey@ie.ibm.com
11+
- Claudia.Gray@ibm.com
12+
13+
# Build configurations for images to host
14+
builds:
15+
- name: mcp-context-forge
16+
dockerfilePath: Containerfile.lite
17+
18+
# Grant all namespaces pull access
19+
globalPullAccess: true

0 commit comments

Comments
 (0)