Commit 0f1ecf6d authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Merge branch 'feat/168-automation-injection-of-workloads-when-linkerd-is-installed' into 'develop'

Resolve "Automation injection of workloads when LinkerD is installed"

See merge request !243
parents 3d0c9916 0f039419
Loading
Loading
Loading
Loading
+13 −2
Original line number Diff line number Diff line
@@ -204,6 +204,14 @@ if [[ $DOCKER_MAJOR_VERSION -ge 23 ]]; then
    DOCKER_BUILD="docker buildx build"
fi

LINKERD_STATUS="$(microk8s status -a linkerd)"
if [[ $linkerd_status =~ "enabled" ]]; then
    echo "LinkerD installed: workloads will be injected"
else
    echo "LinkerD not installed"
fi
printf "\n"

for COMPONENT in $TFS_COMPONENTS; do
    echo "Processing '$COMPONENT' component..."

@@ -279,8 +287,11 @@ for COMPONENT in $TFS_COMPONENTS; do

    echo "  Adapting '$COMPONENT' manifest file..."
    MANIFEST="$TMP_MANIFESTS_FOLDER/${COMPONENT}service.yaml"
    # cp ./manifests/"${COMPONENT}"service.yaml "$MANIFEST"
    if [[ $linkerd_status =~ "enabled" ]]; then
        cat ./manifests/"${COMPONENT}"service.yaml | linkerd inject - --proxy-cpu-request "10m" --proxy-cpu-limit "1" --proxy-memory-request "64Mi" --proxy-memory-limit "256Mi" > "$MANIFEST"
    else
        cp ./manifests/"${COMPONENT}"service.yaml "$MANIFEST"
    fi

    if [ "$COMPONENT" == "pathcomp" ]; then
        IMAGE_URL=$(echo "$TFS_REGISTRY_IMAGES/$COMPONENT-frontend:$TFS_IMAGE_TAG" | sed 's,//,/,g' | sed 's,http:/,,g')