diff --git a/functions/onprem/orborus/orborus.go b/functions/onprem/orborus/orborus.go index c91d5669..3697735e 100755 --- a/functions/onprem/orborus/orborus.go +++ b/functions/onprem/orborus/orborus.go @@ -1083,9 +1083,9 @@ func deployK8sWorker(image string, identifier string, env []string) error { } labels := map[string]string{ - "app.kubernetes.io/name": "shuffle-worker", - "app.kubernetes.io/instance": identifier, - // "app.kubernetes.io/version": "", + // Well-known Kubernetes labels + "app.kubernetes.io/name": "shuffle-worker", + "app.kubernetes.io/instance": identifier, "app.kubernetes.io/part-of": "shuffle", "app.kubernetes.io/managed-by": "shuffle-orborus", // Keep legacy labels for backward compatibility @@ -1252,7 +1252,6 @@ func deployK8sWorker(image string, identifier string, env []string) error { return err } - // kubectl expose deployment shuffle-workers --type=NodePort --port=33333 --target-port=33333 service := &corev1.Service{ ObjectMeta: metav1.ObjectMeta{ Name: identifier, @@ -1267,7 +1266,7 @@ func deployK8sWorker(image string, identifier string, env []string) error { TargetPort: intstr.FromInt(33333), }, }, - Type: corev1.ServiceTypeNodePort, + Type: corev1.ServiceTypeClusterIP, }, } diff --git a/functions/onprem/worker/worker.go b/functions/onprem/worker/worker.go index 0fddb006..93baec04 100644 --- a/functions/onprem/worker/worker.go +++ b/functions/onprem/worker/worker.go @@ -497,13 +497,16 @@ func deployk8sApp(image string, identifier string, env []string) error { name := strings.ReplaceAll(identifier, "_", "-") labels := map[string]string{ - "app.kubernetes.io/name": "shuffle-app", - "app.kubernetes.io/instance": name, - // "app.kubernetes.io/version": "", + // Well-known Kubernetes labels + "app.kubernetes.io/name": "shuffle-app", + "app.kubernetes.io/instance": name, "app.kubernetes.io/part-of": "shuffle", "app.kubernetes.io/managed-by": "shuffle-worker", // Keep legacy labels for backward compatibility "app": name, + // TODO: Add Shuffle specific labels + // "app.shuffler.io/name": "APP_NAME", + // "app.shuffler.io/version": "APP_VERSION", } matchLabels := map[string]string{ @@ -666,7 +669,7 @@ func deployk8sApp(image string, identifier string, env []string) error { TargetPort: intstr.FromInt(deployport), }, }, - Type: corev1.ServiceTypeNodePort, + Type: corev1.ServiceTypeClusterIP, }, }