expose worker and apps using service type ClusterIP
Signed-off-by: Pascal Sthamer <10992664+P4sca1@users.noreply.github.com>
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -489,13 +489,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{
|
||||
@@ -614,7 +617,6 @@ func deployk8sApp(image string, identifier string, env []string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// kubectl expose deployment {podName} --type=NodePort --port=80 --target-port=80
|
||||
service := &corev1.Service{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: name,
|
||||
@@ -629,7 +631,7 @@ func deployk8sApp(image string, identifier string, env []string) error {
|
||||
TargetPort: intstr.FromInt(80),
|
||||
},
|
||||
},
|
||||
Type: corev1.ServiceTypeNodePort,
|
||||
Type: corev1.ServiceTypeClusterIP,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -940,9 +942,9 @@ func deployApp(cli *dockerclient.Client, image string, identifier string, env []
|
||||
}
|
||||
|
||||
builtMount := mount.Mount{
|
||||
Type: mount.TypeBind,
|
||||
Source: sourceFolder,
|
||||
Target: destinationFolder,
|
||||
Type: mount.TypeBind,
|
||||
Source: sourceFolder,
|
||||
Target: destinationFolder,
|
||||
ReadOnly: readOnly,
|
||||
}
|
||||
|
||||
@@ -1859,12 +1861,12 @@ func executionInit(workflowExecution shuffle.WorkflowExecution) error {
|
||||
// 2. Only ONE action
|
||||
// 3. Every predefined result having result.Action.Category == "rerun"
|
||||
/*
|
||||
if len(workflowExecution.Workflow.Actions) == 1 && len(workflowExecution.Results) > 0 {
|
||||
finished := shuffle.ValidateFinished(ctx, extra, workflowExecution)
|
||||
if finished {
|
||||
return nil
|
||||
if len(workflowExecution.Workflow.Actions) == 1 && len(workflowExecution.Results) > 0 {
|
||||
finished := shuffle.ValidateFinished(ctx, extra, workflowExecution)
|
||||
if finished {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
nextActions = append(nextActions, startAction)
|
||||
@@ -1954,7 +1956,6 @@ func executionInit(workflowExecution shuffle.WorkflowExecution) error {
|
||||
//log.Printf("Successfully downloaded and built %s", image)
|
||||
}
|
||||
|
||||
|
||||
visited := []string{}
|
||||
executed := []string{}
|
||||
environments := []string{}
|
||||
@@ -3905,7 +3906,6 @@ func checkStandaloneRun() {
|
||||
|
||||
log.Printf("\n\n\n[DEBUG] Finished resetting execution %s. Body: %s. Starting execution.\n\n\n", newresp.Status, string(body))
|
||||
|
||||
|
||||
}
|
||||
|
||||
// Initial loop etc
|
||||
|
||||
Reference in New Issue
Block a user