Skip to content

Commit

Permalink
add command to simply port-forward for development
Browse files Browse the repository at this point in the history
  • Loading branch information
christianvogt committed Apr 15, 2024
1 parent a0e5d7f commit 0ce1e3e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
7 changes: 4 additions & 3 deletions .env.development
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ APP_ENV=development
BACKEND_PORT=4000
FRONTEND_PORT=4010

METADATA_ENVOY_SERVICE_HOST=localhost
METADATA_ENVOY_SERVICE_PORT=9090

FASTIFY_LOG_LEVEL=debug

DSPA_NAME=dspa
METADATA_ENVOY_SERVICE_HOST=localhost
METADATA_ENVOY_SERVICE_PORT=9090
DS_PIPELINE_DSPA_SERVICE_HOST=localhost
DS_PIPELINE_DSPA_SERVICE_PORT=8443

TRUSTYAI_NAME=trustyai-service
TRUSTYAI_TAIS_SERVICE_HOST=localhost
TRUSTYAI_TAIS_SERVICE_PORT=9443
21 changes: 20 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ include ${DEFAULT_ENV_FILE}
export $(shell sed 's/=.*//' ${DEFAULT_ENV_FILE})
endif

DEV_ENV_FILE := .env.development
ifneq ("$(wildcard $(DEV_ENV_FILE))","")
include ${DEV_ENV_FILE}
export $(shell sed 's/=.*//' ${DEV_ENV_FILE})
endif

ENV_FILE := .env.local
ifneq ("$(wildcard $(ENV_FILE))","")
include ${ENV_FILE}
Expand Down Expand Up @@ -46,7 +52,7 @@ ifdef OC_TOKEN
oc login ${OC_URL} --token=${OC_TOKEN}
else
$(info **** Using OC_USER and OC_PASSWORD for login ****)
oc login ${OC_URL} -u ${OC_USER} -p ${OC_PASSWORD} --insecure-skip-tls-verify=true
oc login ${OC_URL} -u ${OC_USER} -p "${OC_PASSWORD}" --insecure-skip-tls-verify=true
endif

##################################
Expand All @@ -62,3 +68,16 @@ undeploy:
./install/undeploy.sh

##################################

.PHONY: port-forward
port-forward:
ifdef NAMESPACE
parallel -j0 --lb ::: \
'oc port-forward -n ${NAMESPACE} svc/ds-pipeline-metadata-envoy-${DSPA_NAME} ${METADATA_ENVOY_SERVICE_PORT}:9090' \
'oc port-forward -n ${NAMESPACE} svc/ds-pipeline-${DSPA_NAME} ${DS_PIPELINE_DSPA_SERVICE_PORT}:8443' \
'oc port-forward -n ${NAMESPACE} svc/${TRUSTYAI_NAME}-tls ${TRUSTYAI_TAIS_SERVICE_PORT}:443'
else
$(error Missing NAMESPACE variable)
endif

##################################

0 comments on commit 0ce1e3e

Please sign in to comment.