Skip to content

Commit

Permalink
Merge pull request #241 from rcarrat-AI/main
Browse files Browse the repository at this point in the history
added nvidia operator
  • Loading branch information
pittar authored Sep 19, 2023
2 parents 80f8856 + 11142c3 commit bdf11cd
Show file tree
Hide file tree
Showing 8 changed files with 93 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nfd/instance/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ The options for this operator are the following *overlays*:
If you have cloned the `gitops-catalog` repository, you can install the Storage System by running from the root `gitops-catalog` directory

```
oc apply -k openshift-nfd-operator/instance/overlays/default
oc apply -k nfd/instance/overlays/default
```

Or, without cloning:

```
oc apply -k https://github.com/redhat-cop/gitops-catalog/openshift-nfd-operator/instance/overlays/default
oc apply -k https://github.com/redhat-cop/gitops-catalog/nfd/instance/overlays/default
```

As part of a different overlay in your own GitOps repo:
Expand All @@ -38,5 +38,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- github.com/redhat-cop/gitops-catalog/openshift-nfd-operator/instance/overlays/default?ref=main
- github.com/redhat-cop/gitops-catalog/nfd/instance/overlays/default?ref=main
```
42 changes: 42 additions & 0 deletions nvidia-gpu-operator/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# NVIDIA GPU Operator

Installs the NVIDIA GPU Operator.

## Prerequisites

First, install the [NVIDIA GPU Operator](../operator) in your cluster.

Do not use the `base` directory directly, as you will need to patch the `channel` based on the version of OpenShift you are using, or the version of the operator you want to use.

## Overlays

The options for this operator are the following *overlays*:
* [default](overlays/default)

### Default

[default](overlays/default) configures the NVIDIA GPU Operator.

## Usage

If you have cloned the `gitops-catalog` repository, you can install the Storage System by running from the root `gitops-catalog` directory

```
oc apply -k nvidia-gpu-operator/operator/overlays/default
```

Or, without cloning:

```
oc apply -k https://github.com/redhat-cop/gitops-catalog/nvidia-gpu-operator/instance/overlays/default
```

As part of a different overlay in your own GitOps repo:

```
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- github.com/redhat-cop/gitops-catalog/nvidia-gpu-operator/instance/overlays/default?ref=main
```
7 changes: 7 additions & 0 deletions nvidia-gpu-operator/operator/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- namespace.yaml
- operator-group.yaml
- subscription.yaml
8 changes: 8 additions & 0 deletions nvidia-gpu-operator/operator/base/namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: v1
kind: Namespace
metadata:
annotations:
openshift.io/display-name: "NVIDIA GPU Operator"
labels:
openshift.io/cluster-monitoring: "true"
name: nvidia-gpu-operator
8 changes: 8 additions & 0 deletions nvidia-gpu-operator/operator/base/operator-group.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
name: nvidia-gpu-operator-group
namespace: nvidia-gpu-operator
spec:
targetNamespaces:
- nvidia-gpu-operator
11 changes: 11 additions & 0 deletions nvidia-gpu-operator/operator/base/subscription.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: gpu-operator-certified
namespace: nvidia-gpu-operator
spec:
channel: patch-me-see-overlays-dir
installPlanApproval: Automatic
name: gpu-operator-certified
source: certified-operators
sourceNamespace: openshift-marketplace
11 changes: 11 additions & 0 deletions nvidia-gpu-operator/operator/overlays/default/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../../base

patches:
- target:
kind: Subscription
name: gpu-operator-certified
path: patch-channel.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- op: replace
path: /spec/channel
value: stable

0 comments on commit bdf11cd

Please sign in to comment.