refactor: retire external vector deployment
This commit is contained in:
@@ -110,7 +110,6 @@ write_secret "$fixture_root/https-credentials" 'fixture-https-credentials'
|
||||
write_secret "$fixture_root/https-ca.pem" 'fixture-https-ca'
|
||||
write_secret "$fixture_root/dwh-password" 'fixture-dwh-password'
|
||||
write_secret "$fixture_root/vector-api-key" 'fixture-vector-api-key'
|
||||
|
||||
printf '%s\n' \
|
||||
'THT_WORKSPACE_GIT_REMOTE=https://git.example.invalid/platform/thoth-workspaces.git' \
|
||||
"PI_AUTH_FILE=$fixture_root/pi-auth.json" \
|
||||
@@ -120,14 +119,11 @@ printf '%s\n' \
|
||||
"THT_WORKSPACE_GIT_KNOWN_HOSTS_FILE=$fixture_root/ssh-known-hosts" \
|
||||
"THT_WORKSPACE_GIT_CREDENTIALS_FILE=$fixture_root/https-credentials" \
|
||||
"THT_WORKSPACE_GIT_CA_FILE=$fixture_root/https-ca.pem" \
|
||||
"THT_WS_NORTH_STAR_RESEARCH_DWH_PASSWORD_SOURCE=$fixture_root/dwh-password" \
|
||||
"THT_WS_NORTH_STAR_RESEARCH_VECTOR_API_KEY_SOURCE=$fixture_root/vector-api-key" >"$fixture_root/operator.env"
|
||||
"THT_WS_NORTH_STAR_RESEARCH_DWH_PASSWORD_SOURCE=$fixture_root/dwh-password" >"$fixture_root/operator.env"
|
||||
|
||||
printf '%s\n' \
|
||||
'THT_WS_NORTH_STAR_RESEARCH_DWH_TRANSPORT=postgres_direct' \
|
||||
'THT_WS_NORTH_STAR_RESEARCH_DWH_PASSWORD_FILE=/run/secrets/north-star-research-dwh-password' \
|
||||
'THT_WS_NORTH_STAR_RESEARCH_VECTOR_TRANSPORT=rest_api' \
|
||||
'THT_WS_NORTH_STAR_RESEARCH_VECTOR_API_KEY_FILE=/run/secrets/north-star-research-vector-api-key' \
|
||||
>"$fixture_root/workspace-bindings.env"
|
||||
|
||||
connector_override="$fixture_root/compose.connector-secrets.local.yaml"
|
||||
@@ -142,10 +138,9 @@ assert_render_contract ssh '/run/secrets/workspace-registry-git-known-hosts,/run
|
||||
render https -f "$root/deploy/compose.git-https.yaml"
|
||||
assert_render_contract https '/run/secrets/workspace-registry-git-ca,/run/secrets/workspace-registry-git-credentials' 'thothii.secrets'
|
||||
render connector -f "$connector_override"
|
||||
assert_render_contract connector '' 'north-star-research-dwh-password,north-star-research-vector-api-key,thothii.secrets'
|
||||
assert_render_contract connector '' 'north-star-research-dwh-password,thothii.secrets'
|
||||
|
||||
assert_missing_source_rejected THT_WS_NORTH_STAR_RESEARCH_DWH_PASSWORD_SOURCE
|
||||
assert_missing_source_rejected THT_WS_NORTH_STAR_RESEARCH_VECTOR_API_KEY_SOURCE
|
||||
assert_unsafe_source_rejected 'relative/secret' relative-source
|
||||
assert_unsafe_source_rejected '/private/secrets/../secret' non-normalized-source
|
||||
if THT_WS_NORTH_STAR_RESEARCH_DWH_PASSWORD_SOURCE='relative/host-override' \
|
||||
@@ -182,4 +177,25 @@ if "$root/scripts/compose-with-preflight.sh" --env-file "$fixture_root/operator.
|
||||
fi
|
||||
grep -Fq 'mutually exclusive' "$fixture_root/renamed-combined.err"
|
||||
|
||||
printf '%s\n' \
|
||||
'THT_WS_NORTH_STAR_RESEARCH_DWH_PASSWORD_FILE=/run/secrets/north-star-research-dwh-password' \
|
||||
'THT_WS_NORTH_STAR_RESEARCH_VECTOR_API_KEY_FILE=/run/secrets/north-star-research-vector-api-key' \
|
||||
>"$fixture_root/workspace-bindings-with-vector.env"
|
||||
printf '%s\n' \
|
||||
'THT_WORKSPACE_GIT_REMOTE=https://git.example.invalid/platform/thoth-workspaces.git' \
|
||||
"PI_AUTH_FILE=$fixture_root/pi-auth.json" \
|
||||
"THT_SECRETS_FILE=$fixture_root/thothii.secrets" \
|
||||
"THT_WS_NORTH_STAR_RESEARCH_DWH_PASSWORD_SOURCE=$fixture_root/dwh-password" \
|
||||
"THT_WS_NORTH_STAR_RESEARCH_VECTOR_API_KEY_SOURCE=$fixture_root/vector-api-key" \
|
||||
>"$fixture_root/operator-with-vector.env"
|
||||
if "$root/scripts/generate-connector-secrets-override.sh" \
|
||||
--bindings-env "$fixture_root/workspace-bindings-with-vector.env" \
|
||||
--operator-env "$fixture_root/operator-with-vector.env" \
|
||||
--output "$fixture_root/forbidden-vector.yaml" \
|
||||
>"$fixture_root/forbidden-vector.out" 2>"$fixture_root/forbidden-vector.err"; then
|
||||
echo "connector generator accepted a retired semantic API key binding" >&2
|
||||
exit 1
|
||||
fi
|
||||
grep -Fq 'VECTOR_API_KEY_SOURCE' "$fixture_root/forbidden-vector.err"
|
||||
|
||||
echo "Compose secret policy passed."
|
||||
|
||||
Reference in New Issue
Block a user