From acf1969352c2fe39a74747ffd3cfeffbd6e5b9b8 Mon Sep 17 00:00:00 2001 From: Pauline Ribeyre <4224001+paulineribeyre@users.noreply.github.com> Date: Mon, 21 Oct 2024 11:43:20 -0500 Subject: [PATCH] namespace update --- gen3/bin/kube-setup-gen3-workflow.sh | 17 +++++++++-------- kube/services/funnel/funnel-deploy.yaml | 2 +- kube/services/funnel/funnel-server-config.yml | 2 +- kube/services/funnel/funnel-worker-config.yml | 1 + kube/services/funnel/pvc.yml | 2 +- 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/gen3/bin/kube-setup-gen3-workflow.sh b/gen3/bin/kube-setup-gen3-workflow.sh index 604f9a2a3..f5fc55788 100644 --- a/gen3/bin/kube-setup-gen3-workflow.sh +++ b/gen3/bin/kube-setup-gen3-workflow.sh @@ -40,6 +40,7 @@ setup_funnel_infra() { gen3_log_info "Funnel cluster IP: $funnelClusterIp" tempWorkerConfig="$(mktemp "$XDG_RUNTIME_DIR/funnel-worker-config.yml_XXXXXX")" sed "s/FUNNEL_SERVICE_CLUSTER_IP_PLACEHOLDER/$funnelClusterIp/" ${GEN3_HOME}/kube/services/funnel/funnel-worker-config.yml > $tempWorkerConfig + sed "s/FUNNEL_SERVICE_NAMESPACE_PLACEHOLDER/$namespace/" $tempWorkerConfig > $tempServerConfig # set the namespace in the server config tempServerConfig="$(mktemp "$XDG_RUNTIME_DIR/funnel-server-config.yml_XXXXXX")" @@ -87,14 +88,6 @@ setup_funnel_infra() { # gen3 s3 attach-bucket-policy "$bucket_name" --read-write --role-name ${username} || true } -if ! setup_gen3_workflow_infra; then - gen3_log_err "kube-setup-gen3-workflow bailing out - failed to set up gen3-workflow infrastructure" - exit 1 -fi -gen3 roll gen3-workflow -g3kubectl apply -f "${GEN3_HOME}/kube/services/gen3-workflow/gen3-workflow-service.yaml" -gen3_log_info "The gen3-workflow service has been deployed onto the kubernetes cluster." - if g3k_manifest_lookup .versions.funnel 2> /dev/null; then if ! setup_funnel_infra; then gen3_log_err "kube-setup-gen3-workflow bailing out - failed to set up funnel infrastructure" @@ -106,3 +99,11 @@ if g3k_manifest_lookup .versions.funnel 2> /dev/null; then else gen3_log_warn "not deploying funnel - no manifest entry for .versions.funnel. The gen3-workflow service may not work!" fi + +if ! setup_gen3_workflow_infra; then + gen3_log_err "kube-setup-gen3-workflow bailing out - failed to set up gen3-workflow infrastructure" + exit 1 +fi +gen3 roll gen3-workflow +g3kubectl apply -f "${GEN3_HOME}/kube/services/gen3-workflow/gen3-workflow-service.yaml" +gen3_log_info "The gen3-workflow service has been deployed onto the kubernetes cluster." diff --git a/kube/services/funnel/funnel-deploy.yaml b/kube/services/funnel/funnel-deploy.yaml index d732c2c8f..ae656450c 100644 --- a/kube/services/funnel/funnel-deploy.yaml +++ b/kube/services/funnel/funnel-deploy.yaml @@ -81,7 +81,7 @@ spec: volumes: - name: funnel-deployment-storage persistentVolumeClaim: - claimName: funnel-storage-pvc + claimName: storage-pvc - name: config-volume configMap: name: funnel-config diff --git a/kube/services/funnel/funnel-server-config.yml b/kube/services/funnel/funnel-server-config.yml index cc2629fcb..0ecc8c8e7 100644 --- a/kube/services/funnel/funnel-server-config.yml +++ b/kube/services/funnel/funnel-server-config.yml @@ -18,7 +18,7 @@ Kubernetes: metadata: ## DO NOT CHANGE NAME name: {{.TaskId}} - namespace: {{.Namespace}} + namespace: FUNNEL_SERVICE_NAMESPACE_PLACEHOLDER spec: backoffLimit: 0 completions: 1 diff --git a/kube/services/funnel/funnel-worker-config.yml b/kube/services/funnel/funnel-worker-config.yml index 1c9151195..cd250ff31 100644 --- a/kube/services/funnel/funnel-worker-config.yml +++ b/kube/services/funnel/funnel-worker-config.yml @@ -8,6 +8,7 @@ Compute: kubernetes Kubernetes: # The executor used to execute tasks. Available executors: docker, kubernetes Executor: "kubernetes" + Namespace: FUNNEL_SERVICE_NAMESPACE_PLACEHOLDER Logger: Level: debug diff --git a/kube/services/funnel/pvc.yml b/kube/services/funnel/pvc.yml index 0fdc8f6e7..5eb41900e 100644 --- a/kube/services/funnel/pvc.yml +++ b/kube/services/funnel/pvc.yml @@ -1,7 +1,7 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: funnel-storage-pvc + name: storage-pvc spec: storageClassName: standard resources: