Skip to content

Commit

Permalink
Merge pull request #1934 from Gkrumbach07/main
Browse files Browse the repository at this point in the history
move AcceleratorProfile crd version out of alpha
  • Loading branch information
openshift-ci[bot] committed Oct 9, 2023
2 parents b9f4a84 + cbf6708 commit b9695ec
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions backend/src/utils/resourceUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ export const cleanupGPU = async (fastify: KubeFastifyInstance): Promise<void> =>
const acceleratorProfilesResponse = await fastify.kube.customObjectsApi
.listNamespacedCustomObject(
'dashboard.opendatahub.io',
'v1alpha',
'v1',
fastify.kube.namespace,
'acceleratorprofiles',
)
Expand Down Expand Up @@ -694,13 +694,13 @@ export const cleanupGPU = async (fastify: KubeFastifyInstance): Promise<void> =>
if (acceleratorDetected.configured) {
const payload: AcceleratorKind = {
kind: 'AcceleratorProfile',
apiVersion: 'dashboard.opendatahub.io/v1alpha',
apiVersion: 'dashboard.opendatahub.io/v1',
metadata: {
name: 'migrated-gpu',
namespace: fastify.kube.namespace,
},
spec: {
displayName: 'Nvidia GPU',
displayName: 'NVIDIA GPU',
identifier: 'nvidia.com/gpu',
enabled: true,
tolerations: [
Expand All @@ -716,7 +716,7 @@ export const cleanupGPU = async (fastify: KubeFastifyInstance): Promise<void> =>
try {
await fastify.kube.customObjectsApi.createNamespacedCustomObject(
'dashboard.opendatahub.io',
'v1alpha',
'v1',
fastify.kube.namespace,
'acceleratorprofiles',
payload,
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/api/models/openShift.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const TemplateModel: K8sModelCommon = {
};

export const AcceleratorModel: K8sModelCommon = {
apiVersion: 'v1alpha',
apiVersion: 'v1',
apiGroup: 'dashboard.opendatahub.io',
kind: 'AcceleratorProfile',
plural: 'acceleratorprofiles',
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/utilities/useAcceleratorState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ const useAcceleratorState = (
} else {
// create a fake accelerator to use
const fakeAccelerator: AcceleratorKind = {
apiVersion: 'dashboard.opendatahub.io/v1alpha',
apiVersion: 'dashboard.opendatahub.io/v1',
kind: 'AcceleratorProfile',
metadata: {
name: 'migrated-gpu',
},
spec: {
identifier: 'nvidia.com/gpu',
displayName: 'Nvidia GPU',
displayName: 'NVIDIA GPU',
enabled: true,
tolerations: [
{
Expand Down
2 changes: 1 addition & 1 deletion manifests/crd/acceleratorprofiles.opendatahub.io.crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spec:
singular: acceleratorprofile
kind: AcceleratorProfile
versions:
- name: v1alpha
- name: v1
served: true
storage: true
schema:
Expand Down

0 comments on commit b9695ec

Please sign in to comment.