mirror of
https://github.com/vale981/ray
synced 2025-03-06 10:31:39 -05:00
18 lines
556 B
Go
18 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
|
|
}
|