Skip to content

Commit 9155aab

Browse files
committed
chmore: rename group
1 parent a6f7ca8 commit 9155aab

16 files changed

+142
-32
lines changed

PROJECT

-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ resources:
1313
namespaced: true
1414
controller: true
1515
domain: tensor-fusion.ai
16-
group: tensor-fusion.ai
1716
kind: TensorFusionConnection
1817
path: github.com/NexusGPU/tensor-fusion-operator/api/v1
1918
version: v1
@@ -22,7 +21,6 @@ resources:
2221
namespaced: true
2322
controller: true
2423
domain: tensor-fusion.ai
25-
group: tensor-fusion.ai
2624
kind: GPUNode
2725
path: github.com/NexusGPU/tensor-fusion-operator/api/v1
2826
version: v1

README.md

+113-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,114 @@
11
# tensor-fusion-operator
2-
Tensor Fusion operator including custom resources, admission webhooks, metrics aggregators, cluster management APIs, cloud integration etc.
2+
// TODO(user): Add simple overview of use/purpose
3+
4+
## Description
5+
// TODO(user): An in-depth paragraph about your project and overview of use
6+
7+
## Getting Started
8+
9+
### Prerequisites
10+
- go version v1.22.0+
11+
- docker version 17.03+.
12+
- kubectl version v1.11.3+.
13+
- Access to a Kubernetes v1.11.3+ cluster.
14+
15+
### To Deploy on the cluster
16+
**Build and push your image to the location specified by `IMG`:**
17+
18+
```sh
19+
make docker-build docker-push IMG=<some-registry>/tensor-fusion-operator:tag
20+
```
21+
22+
**NOTE:** This image ought to be published in the personal registry you specified.
23+
And it is required to have access to pull the image from the working environment.
24+
Make sure you have the proper permission to the registry if the above commands don’t work.
25+
26+
**Install the CRDs into the cluster:**
27+
28+
```sh
29+
make install
30+
```
31+
32+
**Deploy the Manager to the cluster with the image specified by `IMG`:**
33+
34+
```sh
35+
make deploy IMG=<some-registry>/tensor-fusion-operator:tag
36+
```
37+
38+
> **NOTE**: If you encounter RBAC errors, you may need to grant yourself cluster-admin
39+
privileges or be logged in as admin.
40+
41+
**Create instances of your solution**
42+
You can apply the samples (examples) from the config/sample:
43+
44+
```sh
45+
kubectl apply -k config/samples/
46+
```
47+
48+
>**NOTE**: Ensure that the samples has default values to test it out.
49+
50+
### To Uninstall
51+
**Delete the instances (CRs) from the cluster:**
52+
53+
```sh
54+
kubectl delete -k config/samples/
55+
```
56+
57+
**Delete the APIs(CRDs) from the cluster:**
58+
59+
```sh
60+
make uninstall
61+
```
62+
63+
**UnDeploy the controller from the cluster:**
64+
65+
```sh
66+
make undeploy
67+
```
68+
69+
## Project Distribution
70+
71+
Following are the steps to build the installer and distribute this project to users.
72+
73+
1. Build the installer for the image built and published in the registry:
74+
75+
```sh
76+
make build-installer IMG=<some-registry>/tensor-fusion-operator:tag
77+
```
78+
79+
NOTE: The makefile target mentioned above generates an 'install.yaml'
80+
file in the dist directory. This file contains all the resources built
81+
with Kustomize, which are necessary to install this project without
82+
its dependencies.
83+
84+
2. Using the installer
85+
86+
Users can just run kubectl apply -f <URL for YAML BUNDLE> to install the project, i.e.:
87+
88+
```sh
89+
kubectl apply -f https://raw.githubusercontent.com/<org>/tensor-fusion-operator/<tag or branch>/dist/install.yaml
90+
```
91+
92+
## Contributing
93+
// TODO(user): Add detailed information on how you would like others to contribute to this project
94+
95+
**NOTE:** Run `make help` for more information on all potential `make` targets
96+
97+
More information can be found via the [Kubebuilder Documentation](https://book.kubebuilder.io/introduction.html)
98+
99+
## License
100+
101+
Copyright 2024.
102+
103+
Licensed under the Apache License, Version 2.0 (the "License");
104+
you may not use this file except in compliance with the License.
105+
You may obtain a copy of the License at
106+
107+
http://www.apache.org/licenses/LICENSE-2.0
108+
109+
Unless required by applicable law or agreed to in writing, software
110+
distributed under the License is distributed on an "AS IS" BASIS,
111+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
112+
See the License for the specific language governing permissions and
113+
limitations under the License.
114+

api/v1/groupversion_info.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ limitations under the License.
1616

1717
// Package v1 contains API Schema definitions for the tensor-fusion.ai v1 API group.
1818
// +kubebuilder:object:generate=true
19-
// +groupName=tensor-fusion.ai.tensor-fusion.ai
19+
// +groupName=tensor-fusion.ai
2020
package v1
2121

2222
import (
@@ -26,7 +26,7 @@ import (
2626

2727
var (
2828
// GroupVersion is group version used to register these objects.
29-
GroupVersion = schema.GroupVersion{Group: "tensor-fusion.ai.tensor-fusion.ai", Version: "v1"}
29+
GroupVersion = schema.GroupVersion{Group: "tensor-fusion.ai", Version: "v1"}
3030

3131
// SchemeBuilder is used to add go types to the GroupVersionKind scheme.
3232
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

config/crd/bases/tensor-fusion.ai.tensor-fusion.ai_gpunodes.yaml config/crd/bases/tensor-fusion.ai_gpunodes.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ kind: CustomResourceDefinition
44
metadata:
55
annotations:
66
controller-gen.kubebuilder.io/version: v0.16.4
7-
name: gpunodes.tensor-fusion.ai.tensor-fusion.ai
7+
name: gpunodes.tensor-fusion.ai
88
spec:
9-
group: tensor-fusion.ai.tensor-fusion.ai
9+
group: tensor-fusion.ai
1010
names:
1111
kind: GPUNode
1212
listKind: GPUNodeList

config/crd/bases/tensor-fusion.ai.tensor-fusion.ai_tensorfusionconnections.yaml config/crd/bases/tensor-fusion.ai_tensorfusionconnections.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ kind: CustomResourceDefinition
44
metadata:
55
annotations:
66
controller-gen.kubebuilder.io/version: v0.16.4
7-
name: tensorfusionconnections.tensor-fusion.ai.tensor-fusion.ai
7+
name: tensorfusionconnections.tensor-fusion.ai
88
spec:
9-
group: tensor-fusion.ai.tensor-fusion.ai
9+
group: tensor-fusion.ai
1010
names:
1111
kind: TensorFusionConnection
1212
listKind: TensorFusionConnectionList

config/crd/kustomization.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
# since it depends on service name and namespace that are out of this kustomize package.
33
# It should be run by config/default
44
resources:
5-
- bases/tensor-fusion.ai.tensor-fusion.ai_tensorfusionconnections.yaml
6-
- bases/tensor-fusion.ai.tensor-fusion.ai_gpunodes.yaml
5+
- bases/tensor-fusion.ai_tensorfusionconnections.yaml
6+
- bases/tensor-fusion.ai_gpunodes.yaml
77
# +kubebuilder:scaffold:crdkustomizeresource
88

99
patches:

config/rbac/gpunode_editor_role.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ metadata:
88
name: gpunode-editor-role
99
rules:
1010
- apiGroups:
11-
- tensor-fusion.ai.tensor-fusion.ai
11+
- tensor-fusion.ai
1212
resources:
1313
- gpunodes
1414
verbs:
@@ -20,7 +20,7 @@ rules:
2020
- update
2121
- watch
2222
- apiGroups:
23-
- tensor-fusion.ai.tensor-fusion.ai
23+
- tensor-fusion.ai
2424
resources:
2525
- gpunodes/status
2626
verbs:

config/rbac/gpunode_viewer_role.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ metadata:
88
name: gpunode-viewer-role
99
rules:
1010
- apiGroups:
11-
- tensor-fusion.ai.tensor-fusion.ai
11+
- tensor-fusion.ai
1212
resources:
1313
- gpunodes
1414
verbs:
1515
- get
1616
- list
1717
- watch
1818
- apiGroups:
19-
- tensor-fusion.ai.tensor-fusion.ai
19+
- tensor-fusion.ai
2020
resources:
2121
- gpunodes/status
2222
verbs:

config/rbac/role.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
name: manager-role
66
rules:
77
- apiGroups:
8-
- tensor-fusion.ai.tensor-fusion.ai
8+
- tensor-fusion.ai
99
resources:
1010
- gpunodes
1111
- tensorfusionconnections
@@ -18,14 +18,14 @@ rules:
1818
- update
1919
- watch
2020
- apiGroups:
21-
- tensor-fusion.ai.tensor-fusion.ai
21+
- tensor-fusion.ai
2222
resources:
2323
- gpunodes/finalizers
2424
- tensorfusionconnections/finalizers
2525
verbs:
2626
- update
2727
- apiGroups:
28-
- tensor-fusion.ai.tensor-fusion.ai
28+
- tensor-fusion.ai
2929
resources:
3030
- gpunodes/status
3131
- tensorfusionconnections/status

config/rbac/tensorfusionconnection_editor_role.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ metadata:
88
name: tensorfusionconnection-editor-role
99
rules:
1010
- apiGroups:
11-
- tensor-fusion.ai.tensor-fusion.ai
11+
- tensor-fusion.ai
1212
resources:
1313
- tensorfusionconnections
1414
verbs:
@@ -20,7 +20,7 @@ rules:
2020
- update
2121
- watch
2222
- apiGroups:
23-
- tensor-fusion.ai.tensor-fusion.ai
23+
- tensor-fusion.ai
2424
resources:
2525
- tensorfusionconnections/status
2626
verbs:

config/rbac/tensorfusionconnection_viewer_role.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ metadata:
88
name: tensorfusionconnection-viewer-role
99
rules:
1010
- apiGroups:
11-
- tensor-fusion.ai.tensor-fusion.ai
11+
- tensor-fusion.ai
1212
resources:
1313
- tensorfusionconnections
1414
verbs:
1515
- get
1616
- list
1717
- watch
1818
- apiGroups:
19-
- tensor-fusion.ai.tensor-fusion.ai
19+
- tensor-fusion.ai
2020
resources:
2121
- tensorfusionconnections/status
2222
verbs:

config/samples/kustomization.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## Append samples of your project ##
22
resources:
3-
- tensor-fusion.ai_v1_tensorfusionconnection.yaml
4-
- tensor-fusion.ai_v1_gpunode.yaml
3+
- v1_tensorfusionconnection.yaml
4+
- v1_gpunode.yaml
55
# +kubebuilder:scaffold:manifestskustomizesamples

config/samples/tensor-fusion.ai_v1_gpunode.yaml config/samples/v1_gpunode.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: tensor-fusion.ai.tensor-fusion.ai/v1
1+
apiVersion: tensor-fusion.ai/v1
22
kind: GPUNode
33
metadata:
44
labels:

config/samples/tensor-fusion.ai_v1_tensorfusionconnection.yaml config/samples/v1_tensorfusionconnection.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: tensor-fusion.ai.tensor-fusion.ai/v1
1+
apiVersion: tensor-fusion.ai/v1
22
kind: TensorFusionConnection
33
metadata:
44
labels:

internal/controller/gpunode_controller.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ type GPUNodeReconciler struct {
3636
Scheduler scheduler.Scheduler
3737
}
3838

39-
// +kubebuilder:rbac:groups=tensor-fusion.ai.tensor-fusion.ai,resources=gpunodes,verbs=get;list;watch;create;update;patch;delete
40-
// +kubebuilder:rbac:groups=tensor-fusion.ai.tensor-fusion.ai,resources=gpunodes/status,verbs=get;update;patch
41-
// +kubebuilder:rbac:groups=tensor-fusion.ai.tensor-fusion.ai,resources=gpunodes/finalizers,verbs=update
39+
// +kubebuilder:rbac:groups=tensor-fusion.ai,resources=gpunodes,verbs=get;list;watch;create;update;patch;delete
40+
// +kubebuilder:rbac:groups=tensor-fusion.ai,resources=gpunodes/status,verbs=get;update;patch
41+
// +kubebuilder:rbac:groups=tensor-fusion.ai,resources=gpunodes/finalizers,verbs=update
4242

4343
// Reconcile is part of the main kubernetes reconciliation loop which aims to
4444
// move the current state of the cluster closer to the desired state.

internal/controller/tensorfusionconnection_controller.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ var (
4343
tensorFusionConnectionFinalizer = constants.TensorFusionFinalizer
4444
)
4545

46-
// +kubebuilder:rbac:groups=tensor-fusion.ai.tensor-fusion.ai,resources=tensorfusionconnections,verbs=get;list;watch;create;update;patch;delete
47-
// +kubebuilder:rbac:groups=tensor-fusion.ai.tensor-fusion.ai,resources=tensorfusionconnections/status,verbs=get;update;patch
48-
// +kubebuilder:rbac:groups=tensor-fusion.ai.tensor-fusion.ai,resources=tensorfusionconnections/finalizers,verbs=update
46+
// +kubebuilder:rbac:groups=tensor-fusion.ai,resources=tensorfusionconnections,verbs=get;list;watch;create;update;patch;delete
47+
// +kubebuilder:rbac:groups=tensor-fusion.ai,resources=tensorfusionconnections/status,verbs=get;update;patch
48+
// +kubebuilder:rbac:groups=tensor-fusion.ai,resources=tensorfusionconnections/finalizers,verbs=update
4949

5050
// Reconcile is part of the main kubernetes reconciliation loop which aims to
5151
// move the current state of the cluster closer to the desired state.

0 commit comments

Comments
 (0)