Skip to content

Commit

Permalink
PATCH: openshift kustomize overlay for odh operator
Browse files Browse the repository at this point in the history
  • Loading branch information
VanillaSpoon authored and ChristianZaccaria committed Jan 4, 2024
1 parent 1add258 commit 38fb23d
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ray-operator/config/openshift/kuberay-operator-image-patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: kuberay-operator
spec:
template:
spec:
containers:
- name: kuberay-operator
image: $(image)
44 changes: 44 additions & 0 deletions ray-operator/config/openshift/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: opendatahub

configMapGenerator:
- name: ray-config
envs:
- params.env

configurations:
- params.yaml

vars:
- name: namespace
objref:
kind: ConfigMap
name: ray-config
apiVersion: v1
fieldref:
fieldpath: data.namespace
- name: image
objref:
kind: ConfigMap
name: ray-config
apiVersion: v1
fieldref:
fieldpath: data.odh-kuberay-operator-controller-image

resources:
- ray_operator_scc.yaml
- ../default

commonLabels:
app.kubernetes.io/name: kuberay
app.kubernetes.io/component: kuberay-operator

patches:
- path: kuberay-operator-image-patch.yaml
target:
group: apps
version: v1
kind: Deployment
name: kuberay-operator
2 changes: 2 additions & 0 deletions ray-operator/config/openshift/params.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
namespace=opendatahub
odh-kuberay-operator-controller-image=quay.io/kuberay/operator:v0.6.0
5 changes: 5 additions & 0 deletions ray-operator/config/openshift/params.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
varReference:
- path: users[]
kind: SecurityContextConstraints
- path: spec/template/spec/containers[]/image
kind: Deployment
11 changes: 11 additions & 0 deletions ray-operator/config/openshift/ray_operator_scc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
kind: SecurityContextConstraints
apiVersion: security.openshift.io/v1
metadata:
name: run-as-ray-user
seLinuxContext:
type: MustRunAs
runAsUser:
type: MustRunAs
uid: 1000
users:
- 'system:serviceaccount:$(namespace):kuberay-operator'

0 comments on commit 38fb23d

Please sign in to comment.