opea-project / GenAIInfra

Containerization and cloud native suite for OPEA
Apache License 2.0
16 stars 22 forks source link

GMC: make "namespace" field of each resource in the CR optional #70

Closed KfreeZ closed 4 weeks ago

KfreeZ commented 1 month ago

Description

make "namespace" field of each resource in the CR optional, if it's not specifically defined, get the namespace in the context

Issues

n/a

Type of change

List the type of change like below. Please delete options that are not relevant.

Dependencies

n/a

Tests

Remove all the namespace in the "chatqa.yaml" or "codegen.yaml", which is the customer defined resource. the controller bring up all the resource in the namespace where the CR is installed.

root@cis-gms-worker-3:~# kubectl get pods -A
NAMESPACE          NAME                                       READY   STATUS    RESTARTS        AGE
calico-apiserver   calico-apiserver-b566c7c4b-9xzd9           1/1     Running   1 (3d ago)      3d2h
calico-apiserver   calico-apiserver-b566c7c4b-npg8l           1/1     Running   1 (3d ago)      3d2h
calico-system      calico-kube-controllers-7fb5d85f75-gkpx5   1/1     Running   1 (3d ago)      3d2h
calico-system      calico-node-6f8px                          1/1     Running   1 (3d ago)      3d2h
calico-system      calico-typha-7f5bbfd54c-rtfd5              1/1     Running   1 (3d ago)      3d2h
calico-system      csi-node-driver-6svlq                      2/2     Running   2 (3d ago)      3d2h
chatqa             embedding-server-74c4958fb-kzrrs           1/1     Running   0               15s
chatqa             llm-server-57bb76b99c-bdtf6                1/1     Running   0               14s
chatqa             redis-vector-db-b6df644c-k4cf7             1/1     Running   0               15s
chatqa             reranking-server-7995997b7c-252st          1/1     Running   0               15s
chatqa             retriever-redis-server-76b6cd44b9-bpk7c    1/1     Running   0               15s
chatqa             router-server-6ccf7d5d89-54n8n             1/1     Running   0               14s
chatqa             tei-embedding-server-77f87c9db9-z5wnn      1/1     Running   0               15s
chatqa             tei-reranking-server-5f447446b4-t5l6s      1/1     Running   0               15s
chatqa             tgi-server-8564647c75-whkns                1/1     Running   0               14s
default            client-test-5d45f8c7b-sqvcd                1/1     Running   1 (3d ago)      3d
kube-system        coredns-787d4945fb-fpskt                   1/1     Running   1 (3d ago)      3d2h
kube-system        coredns-787d4945fb-svs22                   1/1     Running   1 (3d ago)      3d2h
kube-system        etcd-cis-gms-worker-3                      1/1     Running   9 (2d23h ago)   3d2h
kube-system        kube-apiserver-cis-gms-worker-3            1/1     Running   9 (2d23h ago)   3d2h
kube-system        kube-controller-manager-cis-gms-worker-3   1/1     Running   42 (3d ago)     3d2h
kube-system        kube-proxy-xksr7                           1/1     Running   1 (3d ago)      3d2h
kube-system        kube-scheduler-cis-gms-worker-3            1/1     Running   42 (3d ago)     3d2h
tigera-operator    tigera-operator-66ff84458f-86b8b           1/1     Running   1 (3d ago)      3d2h
KfreeZ commented 4 weeks ago

was it a typo chatqa versus chatqna?

@KfreeZ and team -- more of a discussion. I know this is a sample and we are making namespace optional -- good. But what will the default be? Why because if every chain goes into a namespace that reflects the chains purpose, there will be less service sharing. If each loggedin user comes with a user or group specific namespace, the logic there would be potentially for chargeback/billing.

@mkbhanda I am writing chatqa on purpose, for saving a letter to type :) But if you think chatqna is better, we can revert to it. with this change, the service defined in a same pipeline will by default live in same the namespace as where CR is created, if the optional namespace is set, it will be assigned to this specific optional namespace