Skip to content

Commit

Permalink
Merge pull request #424 from grafana/allow-to-clone-store-gateway-sta…
Browse files Browse the repository at this point in the history
…tefulset

Allow to create custom store-gateway StatefulSets via newStoreGatewayStatefulSet()
  • Loading branch information
pracucci authored Dec 14, 2021
2 parents 1eb46b0 + 4946c60 commit c6fcd7c
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions cortex/tsdb.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -255,13 +255,13 @@
$.util.readinessProbe +
$.jaeger_mixin,

store_gateway_statefulset:
statefulSet.new('store-gateway', 3, [$.store_gateway_container], store_gateway_data_pvc) +
statefulSet.mixin.spec.withServiceName('store-gateway') +
newStoreGatewayStatefulSet(name, container)::
statefulSet.new(name, 3, [$.store_gateway_container], store_gateway_data_pvc) +
statefulSet.mixin.spec.withServiceName(name) +
statefulSet.mixin.metadata.withNamespace($._config.namespace) +
statefulSet.mixin.metadata.withLabels({ name: 'store-gateway' }) +
statefulSet.mixin.spec.template.metadata.withLabels({ name: 'store-gateway' }) +
statefulSet.mixin.spec.selector.withMatchLabels({ name: 'store-gateway' }) +
statefulSet.mixin.metadata.withLabels({ name: name }) +
statefulSet.mixin.spec.template.metadata.withLabels({ name: name }) +
statefulSet.mixin.spec.selector.withMatchLabels({ name: name }) +
statefulSet.mixin.spec.template.spec.securityContext.withRunAsUser(0) +
statefulSet.mixin.spec.updateStrategy.withType('RollingUpdate') +
statefulSet.mixin.spec.template.spec.withTerminationGracePeriodSeconds(120) +
Expand All @@ -272,6 +272,8 @@
statefulSet.mixin.spec.withPodManagementPolicy('Parallel') +
$.util.configVolumeMount($._config.overrides_configmap, '/etc/cortex'),

store_gateway_statefulset: self.newStoreGatewayStatefulSet('store-gateway', $.store_gateway_container),

store_gateway_service:
$.util.serviceFor($.store_gateway_statefulset),

Expand Down

0 comments on commit c6fcd7c

Please sign in to comment.