tree: c672d8056bedbb27f52ac5a047193779e238f086 [path history] [tgz]
  1. src/
  2. pom.xml
  3. README.md
submarine-server/server-submitter/submarine-k8s-agent/README.md

Submarine Agent

Development Guide

The submarine-server created with operator contains a SUBMARINE_UID environment variable, which we will also need to configure locally during the development phase.

export SUBMARINE_UID=${submarine_uid}

Also, we need use port-forward to link the database port to a local connection

kubectl port-forward service/submarine-database 3306:3306 -n submarine-user-test

Test

If you want to run a test case, you need to set the environment variables before the test case starts to ensure that the watch event is listening to the relevant resources correctly.

export SUBMARINE_UID=${submarine_uid}
mvn test -pl submarine-server/server-submitter/submarine-k8s-agent

Build Image

We already have a script to automate the image build

cd ./dev-support/docker-images/agent
./build.sh