expose worker and apps using service type ClusterIP

Signed-off-by: Pascal Sthamer <10992664+P4sca1@users.noreply.github.com>
This commit is contained in:
Pascal Sthamer
2025-04-15 09:26:57 +02:00
parent 319c939c1f
commit 2738766411
2 changed files with 26 additions and 28 deletions
+5 -7
View File
@@ -747,7 +747,7 @@ func handleBackendImageDownload(ctx context.Context, images string) error {
//log.Printf("[DEBUG] Removing existing image (s): %s", images)
newImages := []string{}
successful := []string{}
successful := []string{}
for _, curimage := range strings.Split(images, ",") {
curimage = strings.TrimSpace(curimage)
if shuffle.ArrayContains(handled, curimage) {
@@ -1067,9 +1067,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
@@ -1212,7 +1212,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,
@@ -1227,7 +1226,7 @@ func deployK8sWorker(image string, identifier string, env []string) error {
TargetPort: intstr.FromInt(33333),
},
},
Type: corev1.ServiceTypeNodePort,
Type: corev1.ServiceTypeClusterIP,
},
}
@@ -1271,7 +1270,6 @@ func deployWorker(image string, identifier string, env []string, executionReques
Resources: container.Resources{},
}
// This is just to test the mounting locally so
// I can control from what source I'm mounting
// the certs to. Default behaviour is: