mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-17 19:47:16 +02:00
refactor pooler tls support and set pooler pod security context (#2255)
* bump pooler image * set pooler pod security context * use hard coded RunAsUser 100 and RunAsGroup 101 for pooler pod * unify generation of TLS secret mounts * extend documentation on tls support * add unit test for testing TLS support for pooler * add e2e test for tls support
This commit is contained in:
@@ -55,6 +55,10 @@ function set_kind_api_server_ip(){
|
||||
sed -i "s/server.*$/server: https:\/\/$kind_api_server/g" "${kubeconfig_path}"
|
||||
}
|
||||
|
||||
function generate_certificate(){
|
||||
openssl req -x509 -nodes -newkey rsa:2048 -keyout tls/tls.key -out tls/tls.crt -subj "/CN=acid.zalan.do"
|
||||
}
|
||||
|
||||
function run_tests(){
|
||||
echo "Running tests... image: ${e2e_test_runner_image}"
|
||||
# tests modify files in ./manifests, so we mount a copy of this directory done by the e2e Makefile
|
||||
@@ -62,6 +66,7 @@ function run_tests(){
|
||||
docker run --rm --network=host -e "TERM=xterm-256color" \
|
||||
--mount type=bind,source="$(readlink -f ${kubeconfig_path})",target=/root/.kube/config \
|
||||
--mount type=bind,source="$(readlink -f manifests)",target=/manifests \
|
||||
--mount type=bind,source="$(readlink -f tls)",target=/tls \
|
||||
--mount type=bind,source="$(readlink -f tests)",target=/tests \
|
||||
--mount type=bind,source="$(readlink -f exec.sh)",target=/exec.sh \
|
||||
--mount type=bind,source="$(readlink -f scripts)",target=/scripts \
|
||||
@@ -82,6 +87,7 @@ function main(){
|
||||
[[ ! -f ${kubeconfig_path} ]] && start_kind
|
||||
load_operator_image
|
||||
set_kind_api_server_ip
|
||||
generate_certificate
|
||||
|
||||
shift
|
||||
run_tests $@
|
||||
|
||||
Reference in New Issue
Block a user