Skip to content

Commit 14e917d

Browse files
committed
Fix project scaffolding for all microservices
Signed-off-by: Shiva Krishna, Merla <[email protected]>
1 parent 6f1dd25 commit 14e917d

16 files changed

+436
-0
lines changed

PROJECT

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,38 @@ resources:
4141
controller: true
4242
domain: nvidia.com
4343
group: apps
44+
<<<<<<< HEAD
4445
kind: NemoCustomizer
46+
=======
47+
kind: NemoEvaluator
48+
path: github.com/NVIDIA/k8s-nim-operator/api/apps/v1alpha1
49+
version: v1alpha1
50+
- api:
51+
crdVersion: v1
52+
namespaced: true
53+
controller: true
54+
domain: nvidia.com
55+
group: apps
56+
kind: NemoEntitystore
57+
path: github.com/NVIDIA/k8s-nim-operator/api/apps/v1alpha1
58+
version: v1alpha1
59+
- api:
60+
crdVersion: v1
61+
namespaced: true
62+
controller: true
63+
domain: nvidia.com
64+
group: apps
65+
kind: NemoDatastore
66+
path: github.com/NVIDIA/k8s-nim-operator/api/apps/v1alpha1
67+
version: v1alpha1
68+
- api:
69+
crdVersion: v1
70+
namespaced: true
71+
controller: true
72+
domain: nvidia.com
73+
group: apps
74+
kind: NemoGuardrails
75+
>>>>>>> 4cb6b28 (Fix project scaffolding for all microservices)
4576
path: github.com/NVIDIA/k8s-nim-operator/api/apps/v1alpha1
4677
version: v1alpha1
4778
version: "3"

config/crd/kustomization.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,14 @@ resources:
55
- bases/apps.nvidia.com_nimservices.yaml
66
- bases/apps.nvidia.com_nimcaches.yaml
77
- bases/apps.nvidia.com_nimpipelines.yaml
8+
<<<<<<< HEAD
89
- bases/apps.nvidia.com_nemocustomizers.yaml
10+
=======
11+
- bases/apps.nvidia.com_nemoguardrails.yaml
12+
- bases/apps.nvidia.com_nemoevaluators.yaml
13+
- bases/apps.nvidia.com_nemodatastores.yaml
14+
- bases/apps.nvidia.com_nemoentitystores.yaml
15+
>>>>>>> 4cb6b28 (Fix project scaffolding for all microservices)
916
# +kubebuilder:scaffold:crdkustomizeresource
1017

1118
patches:
@@ -19,7 +26,14 @@ patches:
1926
#- path: patches/cainjection_in_nimworkflows.yaml
2027
#- path: patches/cainjection_in_nimcaches.yaml
2128
#- path: patches/cainjection_in_nimpipelines.yaml
29+
<<<<<<< HEAD
2230
#- path: patches/cainjection_in_nemocustomizers.yaml
31+
=======
32+
#- path: patches/cainjection_in_nemoguardrails.yaml
33+
#- path: patches/cainjection_in_nemoevaluators.yaml
34+
#- path: patches/cainjection_in_nemodatastores.yaml
35+
#- path: patches/cainjection_in_nemoentitystores.yaml
36+
>>>>>>> 4cb6b28 (Fix project scaffolding for all microservices)
2337
# +kubebuilder:scaffold:crdkustomizecainjectionpatch
2438

2539
# [WEBHOOK] To enable webhook, uncomment the following section

config/rbac/kustomization.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ resources:
1515
# if you do not want those helpers be installed with your Project.
1616
- nemocustomizer_editor_role.yaml
1717
- nemocustomizer_viewer_role.yaml
18+
- nemoentitystore_editor_role.yaml
19+
- nemoentitystore_viewer_role.yaml
20+
- nemodatastore_editor_role.yaml
21+
- nemodatastore_viewer_role.yaml
22+
- nemoevaluator_editor_role.yaml
23+
- nemoevaluator_viewer_role.yaml
24+
- nemoguardrails_editor_role.yaml
25+
- nemoguardrails_viewer_role.yaml
1826
- nimpipeline_editor_role.yaml
1927
- nimpipeline_viewer_role.yaml
2028
- nimcache_editor_role.yaml
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# permissions for end users to edit nemodatastores.
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: ClusterRole
4+
metadata:
5+
labels:
6+
app.kubernetes.io/name: k8s-nim-operator
7+
app.kubernetes.io/managed-by: kustomize
8+
name: nemodatastore-editor-role
9+
rules:
10+
- apiGroups:
11+
- apps.nvidia.com
12+
resources:
13+
- nemodatastores
14+
verbs:
15+
- create
16+
- delete
17+
- get
18+
- list
19+
- patch
20+
- update
21+
- watch
22+
- apiGroups:
23+
- apps.nvidia.com
24+
resources:
25+
- nemodatastores/status
26+
verbs:
27+
- get
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# permissions for end users to view nemodatastores.
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: ClusterRole
4+
metadata:
5+
labels:
6+
app.kubernetes.io/name: k8s-nim-operator
7+
app.kubernetes.io/managed-by: kustomize
8+
name: nemodatastore-viewer-role
9+
rules:
10+
- apiGroups:
11+
- apps.nvidia.com
12+
resources:
13+
- nemodatastores
14+
verbs:
15+
- get
16+
- list
17+
- watch
18+
- apiGroups:
19+
- apps.nvidia.com
20+
resources:
21+
- nemodatastores/status
22+
verbs:
23+
- get
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# permissions for end users to edit nemoentitystores.
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: ClusterRole
4+
metadata:
5+
labels:
6+
app.kubernetes.io/name: k8s-nim-operator
7+
app.kubernetes.io/managed-by: kustomize
8+
name: nemoentitystore-editor-role
9+
rules:
10+
- apiGroups:
11+
- apps.nvidia.com
12+
resources:
13+
- nemoentitystores
14+
verbs:
15+
- create
16+
- delete
17+
- get
18+
- list
19+
- patch
20+
- update
21+
- watch
22+
- apiGroups:
23+
- apps.nvidia.com
24+
resources:
25+
- nemoentitystores/status
26+
verbs:
27+
- get
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# permissions for end users to view nemoentitystores.
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: ClusterRole
4+
metadata:
5+
labels:
6+
app.kubernetes.io/name: k8s-nim-operator
7+
app.kubernetes.io/managed-by: kustomize
8+
name: nemoentitystore-viewer-role
9+
rules:
10+
- apiGroups:
11+
- apps.nvidia.com
12+
resources:
13+
- nemoentitystores
14+
verbs:
15+
- get
16+
- list
17+
- watch
18+
- apiGroups:
19+
- apps.nvidia.com
20+
resources:
21+
- nemoentitystores/status
22+
verbs:
23+
- get
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# permissions for end users to edit nemoevaluators.
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: ClusterRole
4+
metadata:
5+
labels:
6+
app.kubernetes.io/name: k8s-nim-operator
7+
app.kubernetes.io/managed-by: kustomize
8+
name: nemoevaluator-editor-role
9+
rules:
10+
- apiGroups:
11+
- apps.nvidia.com
12+
resources:
13+
- nemoevaluators
14+
verbs:
15+
- create
16+
- delete
17+
- get
18+
- list
19+
- patch
20+
- update
21+
- watch
22+
- apiGroups:
23+
- apps.nvidia.com
24+
resources:
25+
- nemoevaluators/status
26+
verbs:
27+
- get
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# permissions for end users to view nemoevaluators.
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: ClusterRole
4+
metadata:
5+
labels:
6+
app.kubernetes.io/name: k8s-nim-operator
7+
app.kubernetes.io/managed-by: kustomize
8+
name: nemoevaluator-viewer-role
9+
rules:
10+
- apiGroups:
11+
- apps.nvidia.com
12+
resources:
13+
- nemoevaluators
14+
verbs:
15+
- get
16+
- list
17+
- watch
18+
- apiGroups:
19+
- apps.nvidia.com
20+
resources:
21+
- nemoevaluators/status
22+
verbs:
23+
- get
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# permissions for end users to edit nemoguardrails.
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: ClusterRole
4+
metadata:
5+
labels:
6+
app.kubernetes.io/name: k8s-nim-operator
7+
app.kubernetes.io/managed-by: kustomize
8+
name: nemoguardrails-editor-role
9+
rules:
10+
- apiGroups:
11+
- apps.nvidia.com
12+
resources:
13+
- nemoguardrails
14+
verbs:
15+
- create
16+
- delete
17+
- get
18+
- list
19+
- patch
20+
- update
21+
- watch
22+
- apiGroups:
23+
- apps.nvidia.com
24+
resources:
25+
- nemoguardrails/status
26+
verbs:
27+
- get
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# permissions for end users to view nemoguardrails.
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: ClusterRole
4+
metadata:
5+
labels:
6+
app.kubernetes.io/name: k8s-nim-operator
7+
app.kubernetes.io/managed-by: kustomize
8+
name: nemoguardrails-viewer-role
9+
rules:
10+
- apiGroups:
11+
- apps.nvidia.com
12+
resources:
13+
- nemoguardrails
14+
verbs:
15+
- get
16+
- list
17+
- watch
18+
- apiGroups:
19+
- apps.nvidia.com
20+
resources:
21+
- nemoguardrails/status
22+
verbs:
23+
- get
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
apiVersion: apps.nvidia.com/v1alpha1
2+
kind: NemoDatastore
3+
metadata:
4+
labels:
5+
app.kubernetes.io/name: k8s-nim-operator
6+
app.kubernetes.io/managed-by: kustomize
7+
name: nemodatastore-sample
8+
spec:
9+
authSecret: ngc-image-pull-secret
10+
secrets:
11+
datastoreConfigSecret: "nemo-ms-nemo-datastore"
12+
datastoreInitSecret: "nemo-ms-nemo-datastore-init"
13+
datastoreInlineConfigSecret: "nemo-ms-nemo-datastore-inline-config"
14+
giteaAdminSecret: "gitea-admin-credentials"
15+
lfsJwtSecret: "nemo-ms-nemo-datastore--lfs-jwt"
16+
objectStoreConfig:
17+
credentials:
18+
user: minioUser
19+
secretName: nds-minio-existing-secret
20+
passwordKey: objectStoreSecret
21+
serveDirect: true
22+
endpoint: minio.k8s-nim-operator-system.svc.cluster.local:9000
23+
bucketName: datastore-dev
24+
region: object-store-region
25+
ssl: false
26+
databaseConfig:
27+
credentials:
28+
user: ndsuser
29+
secretName: nds-pg-existing-secret
30+
passwordKey: postgresPassword
31+
host: nds-pg-postgresql
32+
port: 5432
33+
databaseName: ndsdb
34+
pvc:
35+
name: "pvc-shared-data"
36+
create: true
37+
storageClass: "local-path"
38+
volumeAccessMode: ReadWriteOnce
39+
size: "10Gi"
40+
expose:
41+
service:
42+
port: 3000
43+
type: ClusterIP
44+
image:
45+
repository: "nvcr.io/nvidian/nemo-llm/datastore"
46+
tag: "25.01-rc8"
47+
pullPolicy: IfNotPresent
48+
replicas: 1
49+
resources:
50+
requests:
51+
memory: "256Mi"
52+
cpu: "500m"
53+
limits:
54+
memory: "512Mi"
55+
cpu: "1"
56+
livenessProbe:
57+
enabled: true
58+
probe:
59+
httpGet:
60+
path: /v1/health
61+
port: 3000
62+
scheme: HTTP
63+
initialDelaySeconds: 10
64+
timeoutSeconds: 5
65+
readinessProbe:
66+
enabled: true
67+
probe:
68+
httpGet:
69+
path: /v1/health
70+
port: 3000
71+
scheme: HTTP
72+
initialDelaySeconds: 5
73+
timeoutSeconds: 3
74+
# metrics:
75+
# enabled: true
76+
# serviceMonitor:
77+
# additionalLabels:
78+
# app: sample-nemodatastore
79+
# interval: "30s"
80+
# scrapeTimeout: "10s"

config/samples/apps_v1alpha1_nemoentitystore.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
apiVersion: apps.nvidia.com/v1alpha1
22
kind: NemoEntitystore
33
metadata:
4+
labels:
5+
app.kubernetes.io/name: k8s-nim-operator
6+
app.kubernetes.io/managed-by: kustomize
47
name: nemoentitystore-sample
58
spec:
69
image:

0 commit comments

Comments
 (0)