Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
2 merge requests!294Release TeraFlowSDN 4.0,!243Resolve "Automation injection of workloads when LinkerD is installed"
......@@ -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"
cat ./manifests/"${COMPONENT}"service.yaml | linkerd inject - --proxy-cpu-request "10m" --proxy-cpu-limit "1" --proxy-memory-request "64Mi" --proxy-memory-limit "256Mi" > "$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')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment