mirror of
https://github.com/vale981/ray
synced 2025-03-06 18:41:40 -05:00
19 lines
556 B
Go
19 lines
556 B
Go
![]() |
package common
|
||
|
|
||
|
import rayiov1alpha1 "ray-operator/api/v1alpha1"
|
||
|
|
||
|
// The function labelsForCluster returns the labels for selecting the resources
|
||
|
// belonging to the given RayCluster CR name.
|
||
|
func labelsForCluster(instance rayiov1alpha1.RayCluster, name string, podTypeName string, extend map[string]string) (ret map[string]string) {
|
||
|
ret = map[string]string{
|
||
|
rayclusterComponent: name,
|
||
|
rayIoComponent: rayOperator,
|
||
|
RayClusterOwnerKey: instance.Name,
|
||
|
ClusterPodType: podTypeName,
|
||
|
}
|
||
|
for k, v := range extend {
|
||
|
ret[k] = v
|
||
|
}
|
||
|
return
|
||
|
}
|