Skip to content

Commit

Permalink
operations: Support secret key as param for replicate tool (#578)
Browse files Browse the repository at this point in the history
  • Loading branch information
philipgough authored Aug 23, 2023
1 parent 0a98f7c commit 2e740ec
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
12 changes: 8 additions & 4 deletions resources/operations/bucket-replicate/job-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ parameters:
value: 'thanos-bucket-replicate-config-source'
- name: DESTINATION_OBJ_STORE_CONFIG_SECRET_NAME
value: 'thanos-bucket-replicate-config-destination'
- name: SOURCE_OBJ_STORE_K8S_SECRET_KEY
value: 'config.yaml'
- name: DESTINATION_OBJ_STORE_K8S_SECRET_KEY
value: 'config.yaml'
- name: COMPACTION_MIN
value: '0'
- name: COMPACTION_MAX
Expand All @@ -29,7 +33,7 @@ parameters:
- name: TENANT_ID
value: 'rhobs'
- name: IMAGE_TAG
value: 'main-2023-08-01-e1a3ec1'
value: 'v0.32.0'
- name: LOG_LEVEL
value: 'info'
- name: CPU_REQUEST
Expand All @@ -39,7 +43,7 @@ parameters:
- name: MEMORY_REQUEST
value: '500Mi'
- name: MEMORY_LIMIT
value: '1Gi'
value: '3Gi'
objects:
- apiVersion: batch/v1
kind: Job
Expand Down Expand Up @@ -79,8 +83,8 @@ objects:
- 'bucket'
- 'replicate'
- '--log.level=${LOG_LEVEL}'
- '--objstore.config-file=/var/lib/thanos/bucket-replicate-config/from/config.yaml'
- '--objstore-to.config-file=/var/lib/thanos/bucket-replicate-config/to/config.yaml'
- '--objstore.config-file=/var/lib/thanos/bucket-replicate-config/from/${SOURCE_OBJ_STORE_K8S_SECRET_KEY}'
- '--objstore-to.config-file=/var/lib/thanos/bucket-replicate-config/to/${DESTINATION_OBJ_STORE_K8S_SECRET_KEY}'
- '--single-run'
- '--matcher=tenant_id="${TENANT_ID}"'
- '--min-time=${MIN_TIME}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ parameters:
value: 'observatorium-operations'
- name: OBJ_STORE_CONFIG_SECRET_NAME
value: 'thanos-bucket-config'
- name: K8S_SECRET_KEY
value: config.yaml
- name: ACCESS_KEY_ID
- name: SECRET_ACCESS_KEY
- name: S3_BUCKET_NAME
Expand All @@ -31,7 +33,7 @@ objects:
app.kubernetes.io/part-of: observatorium
type: Opaque
stringData:
config.yaml: |
${K8S_SECRET_KEY}: |
type: S3
config:
bucket: ${S3_BUCKET_NAME}
Expand Down

0 comments on commit 2e740ec

Please sign in to comment.