From a42ed35f833e7c3815fbbadbc6b95cec85bf3156 Mon Sep 17 00:00:00 2001 From: Cory Latschkowski Date: Sat, 16 Sep 2023 20:55:53 -0500 Subject: [PATCH] fix: project template; gpu autoscale --- .../overlays/gpus/kustomization.yaml | 6 +- .../base/project-request-termplate.yaml | 68 +++++++++---------- 2 files changed, 36 insertions(+), 38 deletions(-) diff --git a/components/configs/autoscale/overlays/gpus/kustomization.yaml b/components/configs/autoscale/overlays/gpus/kustomization.yaml index c0f6f973..34192fa9 100644 --- a/components/configs/autoscale/overlays/gpus/kustomization.yaml +++ b/components/configs/autoscale/overlays/gpus/kustomization.yaml @@ -24,7 +24,5 @@ patches: min: 0 max: 256 - op: replace - path: /spec/resourceLimits/gpus/0 - value: - min: 0 - max: 4 + path: /spec/resourceLimits/gpus/0/max + value: 4 diff --git a/components/configs/namespaces/base/project-request-termplate.yaml b/components/configs/namespaces/base/project-request-termplate.yaml index 55d79bf0..1df806a6 100644 --- a/components/configs/namespaces/base/project-request-termplate.yaml +++ b/components/configs/namespaces/base/project-request-termplate.yaml @@ -55,40 +55,40 @@ objects: name: '${PROJECT_NAME}' spec: {} status: {} - # - apiVersion: rbac.authorization.k8s.io/v1 - # kind: RoleBinding - # metadata: - # annotations: - # openshift.io/description: >- - # Allows all pods in this namespace to pull images from this namespace. - # It is auto-managed by a controller; remove subjects to disable. - # name: 'system:image-pullers' - # namespace: '${PROJECT_NAME}' - # roleRef: - # apiGroup: rbac.authorization.k8s.io - # kind: ClusterRole - # name: 'system:image-puller' - # subjects: - # - apiGroup: rbac.authorization.k8s.io - # kind: Group - # name: 'system:serviceaccounts:${PROJECT_NAME}' - # - apiVersion: rbac.authorization.k8s.io/v1 - # kind: RoleBinding - # metadata: - # annotations: - # openshift.io/description: >- - # Allows builds in this namespace to push images to this namespace. It - # is auto-managed by a controller; remove subjects to disable. - # name: 'system:image-builders' - # namespace: '${PROJECT_NAME}' - # roleRef: - # apiGroup: rbac.authorization.k8s.io - # kind: ClusterRole - # name: 'system:image-builder' - # subjects: - # - kind: ServiceAccount - # name: builder - # namespace: '${PROJECT_NAME}' + - apiVersion: rbac.authorization.k8s.io/v1 + kind: RoleBinding + metadata: + annotations: + openshift.io/description: >- + Allows all pods in this namespace to pull images from this namespace. + It is auto-managed by a controller; remove subjects to disable. + name: 'system:image-pullers' + namespace: '${PROJECT_NAME}' + roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: 'system:image-puller' + subjects: + - apiGroup: rbac.authorization.k8s.io + kind: Group + name: 'system:serviceaccounts:${PROJECT_NAME}' + - apiVersion: rbac.authorization.k8s.io/v1 + kind: RoleBinding + metadata: + annotations: + openshift.io/description: >- + Allows builds in this namespace to push images to this namespace. It + is auto-managed by a controller; remove subjects to disable. + name: 'system:image-builders' + namespace: '${PROJECT_NAME}' + roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: 'system:image-builder' + subjects: + - kind: ServiceAccount + name: builder + namespace: '${PROJECT_NAME}' - apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: