uralkal: upload-oblako-las — креды и хост MinIO из documentations_s3_service_account_json
This commit is contained in:
parent
1c1b866331
commit
857bd4a675
@ -16,11 +16,13 @@ spec:
|
||||
vault.hashicorp.com/agent-pre-populate-only: "true"
|
||||
vault.hashicorp.com/auth-path: auth/kubernetes
|
||||
vault.hashicorp.com/role: django
|
||||
vault.hashicorp.com/agent-inject-secret-minio: secrets/data/minio/apps/django
|
||||
vault.hashicorp.com/agent-inject-secret-minio: secrets/data/vault/common/django_auth
|
||||
vault.hashicorp.com/agent-inject-template-minio: |-
|
||||
{{- with secret "secrets/data/minio/apps/django" -}}
|
||||
export MINIO_ACCESS_KEY='{{ index .Data.data "access_key" }}'
|
||||
export MINIO_SECRET_KEY='{{ index .Data.data "secret_key" }}'
|
||||
{{- with secret "secrets/data/vault/common/django_auth" -}}
|
||||
{{- $s3 := index .Data.data "documentations_s3_service_account_json" | parseJSON -}}
|
||||
export MINIO_ENDPOINT='http://{{ $s3.endpoint }}'
|
||||
export MINIO_ACCESS_KEY='{{ $s3.access_key_id }}'
|
||||
export MINIO_SECRET_KEY='{{ $s3.secret_access_key }}'
|
||||
{{- end -}}
|
||||
spec:
|
||||
serviceAccountName: django-vault
|
||||
@ -65,7 +67,7 @@ spec:
|
||||
log "step 3/5: connect to MinIO ${MINIO_ENDPOINT}"
|
||||
mc alias set target "$MINIO_ENDPOINT" "$MINIO_ACCESS_KEY" "$MINIO_SECRET_KEY" >/dev/null
|
||||
if ! mc ls "target/$BUCKET" >/dev/null; then
|
||||
log "ERROR: bucket $BUCKET is not reachable with django credentials"; exit 1
|
||||
log "ERROR: bucket $BUCKET is not reachable with documentations_s3_service_account_json credentials"; exit 1
|
||||
fi
|
||||
log "bucket $BUCKET is reachable"
|
||||
|
||||
@ -91,8 +93,6 @@ spec:
|
||||
value: "https://storage.yandexcloud.net/documentations-prod-270-dlia-stateisarex/7937275e-967e-452e-b79d-b1991bca1dd4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=YCAJEOB86NUJTIBSnlwY_OvTI%2F20261105%2Fru-central1%2Fs3%2Faws4_request&X-Amz-Date=20261105T120651Z&X-Amz-Expires=259200&X-Amz-Signature=423bf587fbf89ba6a3b10bda57f37100bfcd72c3a6ba84a3c91eec922364c088&X-Amz-SignedHeaders=host&response-content-disposition=attachment"
|
||||
- name: EXPECTED_SIZE
|
||||
value: "5488991489"
|
||||
- name: MINIO_ENDPOINT
|
||||
value: http://10.133.0.245:9000
|
||||
- name: BUCKET
|
||||
value: django
|
||||
- name: OBJECT_NAME
|
||||
|
||||
Loading…
Reference in New Issue
Block a user