Skip to content

Commit

Permalink
fix hashmod yaml (#650)
Browse files Browse the repository at this point in the history
Signed-off-by: Thibault Mange <[email protected]>
  • Loading branch information
thibaultmg authored Nov 10, 2023
1 parent 79e0441 commit c29b740
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -441,9 +441,9 @@ objects:
-o=jsonpath='{.status.replicas}')\n\n# Logging parameters\necho \"generating
store hashmod config with ORDINAL_INDEX=${ORDINAL_INDEX} THANOS_STORE_REPLICAS=${STATEFULSET_NAME}
HOSTNAME=${HOSTNAME} NAMESPACE=${NAMESPACE} THANOS_STORE_REPLICAS=${THANOS_STORE_REPLICAS}\"\n\ncat
<<EOF >/tmp/config/hashmod-config.yaml\n- action: hashmod\n source_labels:
[\"__block_id\"]\n target_label: shard\n modulus: ${THANOS_STORE_REPLICAS}\n-
action: keep\n source_labels: [\"shard\"]\n regex: ${ORDINAL_INDEX}\nEOF\n"
<<EOF >/tmp/config/hashmod-config.yaml\n- action: hashmod\n source_labels:\n
\ - __block_id\n target_label: shard\n modulus: ${THANOS_STORE_REPLICAS}\n-
action: keep\n source_labels:\n - shard\n regex: ${ORDINAL_INDEX}\nEOF\n"
kind: ConfigMap
metadata:
creationTimestamp: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -441,9 +441,9 @@ objects:
-o=jsonpath='{.status.replicas}')\n\n# Logging parameters\necho \"generating
store hashmod config with ORDINAL_INDEX=${ORDINAL_INDEX} THANOS_STORE_REPLICAS=${STATEFULSET_NAME}
HOSTNAME=${HOSTNAME} NAMESPACE=${NAMESPACE} THANOS_STORE_REPLICAS=${THANOS_STORE_REPLICAS}\"\n\ncat
<<EOF >/tmp/config/hashmod-config.yaml\n- action: hashmod\n source_labels:
[\"__block_id\"]\n target_label: shard\n modulus: ${THANOS_STORE_REPLICAS}\n-
action: keep\n source_labels: [\"shard\"]\n regex: ${ORDINAL_INDEX}\nEOF\n"
<<EOF >/tmp/config/hashmod-config.yaml\n- action: hashmod\n source_labels:\n
\ - __block_id\n target_label: shard\n modulus: ${THANOS_STORE_REPLICAS}\n-
action: keep\n source_labels:\n - shard\n regex: ${ORDINAL_INDEX}\nEOF\n"
kind: ConfigMap
metadata:
creationTimestamp: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -441,9 +441,9 @@ objects:
-o=jsonpath='{.status.replicas}')\n\n# Logging parameters\necho \"generating
store hashmod config with ORDINAL_INDEX=${ORDINAL_INDEX} THANOS_STORE_REPLICAS=${STATEFULSET_NAME}
HOSTNAME=${HOSTNAME} NAMESPACE=${NAMESPACE} THANOS_STORE_REPLICAS=${THANOS_STORE_REPLICAS}\"\n\ncat
<<EOF >/tmp/config/hashmod-config.yaml\n- action: hashmod\n source_labels:
[\"__block_id\"]\n target_label: shard\n modulus: ${THANOS_STORE_REPLICAS}\n-
action: keep\n source_labels: [\"shard\"]\n regex: ${ORDINAL_INDEX}\nEOF\n"
<<EOF >/tmp/config/hashmod-config.yaml\n- action: hashmod\n source_labels:\n
\ - __block_id\n target_label: shard\n modulus: ${THANOS_STORE_REPLICAS}\n-
action: keep\n source_labels:\n - shard\n regex: ${ORDINAL_INDEX}\nEOF\n"
kind: ConfigMap
metadata:
creationTimestamp: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -441,9 +441,9 @@ objects:
-o=jsonpath='{.status.replicas}')\n\n# Logging parameters\necho \"generating
store hashmod config with ORDINAL_INDEX=${ORDINAL_INDEX} THANOS_STORE_REPLICAS=${STATEFULSET_NAME}
HOSTNAME=${HOSTNAME} NAMESPACE=${NAMESPACE} THANOS_STORE_REPLICAS=${THANOS_STORE_REPLICAS}\"\n\ncat
<<EOF >/tmp/config/hashmod-config.yaml\n- action: hashmod\n source_labels:
[\"__block_id\"]\n target_label: shard\n modulus: ${THANOS_STORE_REPLICAS}\n-
action: keep\n source_labels: [\"shard\"]\n regex: ${ORDINAL_INDEX}\nEOF\n"
<<EOF >/tmp/config/hashmod-config.yaml\n- action: hashmod\n source_labels:\n
\ - __block_id\n target_label: shard\n modulus: ${THANOS_STORE_REPLICAS}\n-
action: keep\n source_labels:\n - shard\n regex: ${ORDINAL_INDEX}\nEOF\n"
kind: ConfigMap
metadata:
creationTimestamp: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -441,9 +441,9 @@ objects:
-o=jsonpath='{.status.replicas}')\n\n# Logging parameters\necho \"generating
store hashmod config with ORDINAL_INDEX=${ORDINAL_INDEX} THANOS_STORE_REPLICAS=${STATEFULSET_NAME}
HOSTNAME=${HOSTNAME} NAMESPACE=${NAMESPACE} THANOS_STORE_REPLICAS=${THANOS_STORE_REPLICAS}\"\n\ncat
<<EOF >/tmp/config/hashmod-config.yaml\n- action: hashmod\n source_labels:
[\"__block_id\"]\n target_label: shard\n modulus: ${THANOS_STORE_REPLICAS}\n-
action: keep\n source_labels: [\"shard\"]\n regex: ${ORDINAL_INDEX}\nEOF\n"
<<EOF >/tmp/config/hashmod-config.yaml\n- action: hashmod\n source_labels:\n
\ - __block_id\n target_label: shard\n modulus: ${THANOS_STORE_REPLICAS}\n-
action: keep\n source_labels:\n - shard\n regex: ${ORDINAL_INDEX}\nEOF\n"
kind: ConfigMap
metadata:
creationTimestamp: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -441,9 +441,9 @@ objects:
-o=jsonpath='{.status.replicas}')\n\n# Logging parameters\necho \"generating
store hashmod config with ORDINAL_INDEX=${ORDINAL_INDEX} THANOS_STORE_REPLICAS=${STATEFULSET_NAME}
HOSTNAME=${HOSTNAME} NAMESPACE=${NAMESPACE} THANOS_STORE_REPLICAS=${THANOS_STORE_REPLICAS}\"\n\ncat
<<EOF >/tmp/config/hashmod-config.yaml\n- action: hashmod\n source_labels:
[\"__block_id\"]\n target_label: shard\n modulus: ${THANOS_STORE_REPLICAS}\n-
action: keep\n source_labels: [\"shard\"]\n regex: ${ORDINAL_INDEX}\nEOF\n"
<<EOF >/tmp/config/hashmod-config.yaml\n- action: hashmod\n source_labels:\n
\ - __block_id\n target_label: shard\n modulus: ${THANOS_STORE_REPLICAS}\n-
action: keep\n source_labels:\n - shard\n regex: ${ORDINAL_INDEX}\nEOF\n"
kind: ConfigMap
metadata:
creationTimestamp: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ echo "generating store hashmod config with ORDINAL_INDEX=${ORDINAL_INDEX} THANOS

cat <<EOF >/tmp/config/hashmod-config.yaml
- action: hashmod
source_labels: ["__block_id"]
target_label: shard
modulus: ${THANOS_STORE_REPLICAS}
source_labels:
- __block_id
target_label: shard
modulus: ${THANOS_STORE_REPLICAS}
- action: keep
source_labels: ["shard"]
regex: ${ORDINAL_INDEX}
source_labels:
- shard
regex: ${ORDINAL_INDEX}
EOF

0 comments on commit c29b740

Please sign in to comment.