diff --git a/build/build_images.sh b/build/build_images.sh index e37ce899065eeb157dbc654be7dd4352dd2bb843..6ae024488e3686a8a14e0fc104949922c13122b4 100755 --- a/build/build_images.sh +++ b/build/build_images.sh @@ -1,4 +1,5 @@ #!/bin/bash +set -e # Set environment variables export VERSION="2.2" diff --git a/build/operator/Dockerfile b/build/operator/Dockerfile index 47f6bff40618ea0d8d4274ecd47fb18eb5c93f49..abee9f13d7031d614e983259547e99cfc9b02335 100644 --- a/build/operator/Dockerfile +++ b/build/operator/Dockerfile @@ -1,4 +1,10 @@ FROM python:3.11.6 -RUN pip install kopf kubernetes PyMySQL cryptography requests -COPY ./src/operator/l2sm-operator.py /l2sm-operator.py -CMD kopf run --standalone --all-namespaces /l2sm-operator.py + +WORKDIR /usr/src/app + +COPY ./src/operator/requirements.txt ./ +RUN pip install --no-cache-dir -r requirements.txt + +COPY ./src/operator/l2sm-operator.py . + +CMD kopf run --liveness=http://0.0.0.0:8080/healthz --standalone --all-namespaces ./l2sm-operator.py diff --git a/src/operator/requirements.txt b/src/operator/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..a0fc253e2bb820e7987242cedc0ab09434e922ee --- /dev/null +++ b/src/operator/requirements.txt @@ -0,0 +1,5 @@ +kopf==1.37.0 +kubernetes==28.1.0 +PyMySQL==1.1.0 +cryptography==3.4.8 +requests==2.25.1 \ No newline at end of file