Skip to content

Commit

Permalink
[Helm] Fix admin-cache max connections (#7632)
Browse files Browse the repository at this point in the history
* [Helm] Fix admin-cache max connections

* Enable caches in enterprise test

* Enable only the admin cache

* Fix typo

* Push updated tests

* rebase main and add back all caches

* Update CHANGELOG
  • Loading branch information
Logiraptor authored Mar 15, 2024
1 parent 44e3ebc commit f377ac3
Show file tree
Hide file tree
Showing 19 changed files with 777 additions and 0 deletions.
1 change: 1 addition & 0 deletions operations/helm/charts/mimir-distributed/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ Entries should include a reference to the Pull Request that introduced the chang
* [BUGFIX] Metamonitoring: update dashboards to drop unsupported `step` parameter in targets. #7157
* [BUGFIX] Recording rules: drop rules for metrics removed in 2.0: `cortex_memcache_request_duration_seconds` and `cortex_cache_request_duration_seconds`. #7514
* [BUGFIX] Store-gateway: setting "resources.requests.memory" with a quantity that used power-of-ten SI suffix, caused an error. #7506
* [BUGFIX] admin-cache: set max connections to fix failure to start #7632

## 5.2.2

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,33 @@ testing:

rollout_operator:
enabled: false

admin-cache:
enabled: true
replicas: 1
resources:
<<: *ci_resources

chunks-cache:
enabled: true
replicas: 1
resources:
<<: *ci_resources

index-cache:
enabled: true
replicas: 1
resources:
<<: *ci_resources

metadata-cache:
enabled: true
replicas: 1
resources:
<<: *ci_resources

results-cache:
enabled: true
replicas: 1
resources:
<<: *ci_resources
3 changes: 3 additions & 0 deletions operations/helm/charts/mimir-distributed/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3465,6 +3465,9 @@ admin-cache:
# -- Maximum item memory for admin-cache (in MB).
maxItemMemory: 1

# -- Maximum number of connections allowed
connectionLimit: 16384

# -- Extra init containers for admin-cache pods
initContainers: []

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
# Source: mimir-distributed/templates/admin-cache/admin-cache-pdb.yaml
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: test-enterprise-configmap-values-mimir-admin-cache
labels:
app.kubernetes.io/name: mimir
app.kubernetes.io/instance: test-enterprise-configmap-values
app.kubernetes.io/component: admin-cache
app.kubernetes.io/managed-by: Helm
namespace: "citestns"
spec:
selector:
matchLabels:
app.kubernetes.io/name: mimir
app.kubernetes.io/instance: test-enterprise-configmap-values
app.kubernetes.io/component: admin-cache
maxUnavailable: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
---
# Source: mimir-distributed/templates/admin-cache/admin-cache-statefulset.yaml
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: test-enterprise-configmap-values-mimir-admin-cache
labels:
app.kubernetes.io/name: mimir
app.kubernetes.io/instance: test-enterprise-configmap-values
app.kubernetes.io/component: memcached
app.kubernetes.io/managed-by: Helm
annotations:
{}
namespace: "citestns"
spec:
podManagementPolicy: Parallel
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: mimir
app.kubernetes.io/instance: test-enterprise-configmap-values
app.kubernetes.io/component: admin-cache
updateStrategy:
type: RollingUpdate
serviceName: test-enterprise-configmap-values-mimir-admin-cache

template:
metadata:
labels:
app.kubernetes.io/name: mimir
app.kubernetes.io/instance: test-enterprise-configmap-values
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: admin-cache
annotations:
minio-secret-version: "42"

spec:
serviceAccountName: test-enterprise-configmap-values-mimir
securityContext:
fsGroup: 10001
runAsGroup: 10001
runAsNonRoot: true
runAsUser: 10001
seccompProfile:
type: RuntimeDefault

terminationGracePeriodSeconds: 60
containers:
- name: memcached
image: memcached:1.6.24-alpine
imagePullPolicy: IfNotPresent
resources:
limits: null
requests: null
ports:
- containerPort: 11211
name: client
args:
- -m 64
- --extended=modern,track_sizes
- -I 1m
- -c 16384
- -v
- -u 11211
env:
envFrom:
- secretRef:
name: mimir-minio-secret
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
- name: exporter
image: prom/memcached-exporter:v0.14.2
imagePullPolicy: IfNotPresent
ports:
- containerPort: 9150
name: http-metrics
args:
- "--memcached.address=localhost:11211"
- "--web.listen-address=0.0.0.0:9150"
resources:
limits: {}
requests: {}
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
# Source: mimir-distributed/templates/admin-cache/admin-cache-svc-headless.yaml
apiVersion: v1
kind: Service
metadata:
name: test-enterprise-configmap-values-mimir-admin-cache
labels:
app.kubernetes.io/name: mimir
app.kubernetes.io/instance: test-enterprise-configmap-values
app.kubernetes.io/component: admin-cache
app.kubernetes.io/managed-by: Helm
annotations:
{}
namespace: "citestns"
spec:
type: ClusterIP
clusterIP: None
ports:
- name: memcached-client
port: 11211
targetPort: 11211

- name: http-metrics
port: 9150
targetPort: 9150

selector:
app.kubernetes.io/name: mimir
app.kubernetes.io/instance: test-enterprise-configmap-values
app.kubernetes.io/component: admin-cache
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
# Source: mimir-distributed/templates/chunks-cache/chunks-cache-pdb.yaml
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: test-enterprise-configmap-values-mimir-chunks-cache
labels:
app.kubernetes.io/name: mimir
app.kubernetes.io/instance: test-enterprise-configmap-values
app.kubernetes.io/component: chunks-cache
app.kubernetes.io/managed-by: Helm
namespace: "citestns"
spec:
selector:
matchLabels:
app.kubernetes.io/name: mimir
app.kubernetes.io/instance: test-enterprise-configmap-values
app.kubernetes.io/component: chunks-cache
maxUnavailable: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
---
# Source: mimir-distributed/templates/chunks-cache/chunks-cache-statefulset.yaml
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: test-enterprise-configmap-values-mimir-chunks-cache
labels:
app.kubernetes.io/name: mimir
app.kubernetes.io/instance: test-enterprise-configmap-values
app.kubernetes.io/component: memcached
app.kubernetes.io/managed-by: Helm
annotations:
{}
namespace: "citestns"
spec:
podManagementPolicy: Parallel
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: mimir
app.kubernetes.io/instance: test-enterprise-configmap-values
app.kubernetes.io/component: chunks-cache
updateStrategy:
type: RollingUpdate
serviceName: test-enterprise-configmap-values-mimir-chunks-cache

template:
metadata:
labels:
app.kubernetes.io/name: mimir
app.kubernetes.io/instance: test-enterprise-configmap-values
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: chunks-cache
annotations:
minio-secret-version: "42"

spec:
serviceAccountName: test-enterprise-configmap-values-mimir
securityContext:
fsGroup: 10001
runAsGroup: 10001
runAsNonRoot: true
runAsUser: 10001
seccompProfile:
type: RuntimeDefault

terminationGracePeriodSeconds: 60
containers:
- name: memcached
image: memcached:1.6.24-alpine
imagePullPolicy: IfNotPresent
resources:
limits: null
requests: null
ports:
- containerPort: 11211
name: client
args:
- -m 8192
- --extended=modern,track_sizes
- -I 1m
- -c 16384
- -v
- -u 11211
env:
envFrom:
- secretRef:
name: mimir-minio-secret
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
- name: exporter
image: prom/memcached-exporter:v0.14.2
imagePullPolicy: IfNotPresent
ports:
- containerPort: 9150
name: http-metrics
args:
- "--memcached.address=localhost:11211"
- "--web.listen-address=0.0.0.0:9150"
resources:
limits: {}
requests: {}
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
# Source: mimir-distributed/templates/chunks-cache/chunks-cache-svc-headless.yaml
apiVersion: v1
kind: Service
metadata:
name: test-enterprise-configmap-values-mimir-chunks-cache
labels:
app.kubernetes.io/name: mimir
app.kubernetes.io/instance: test-enterprise-configmap-values
app.kubernetes.io/component: chunks-cache
app.kubernetes.io/managed-by: Helm
annotations:
{}
namespace: "citestns"
spec:
type: ClusterIP
clusterIP: None
ports:
- name: memcached-client
port: 11211
targetPort: 11211

- name: http-metrics
port: 9150
targetPort: 9150

selector:
app.kubernetes.io/name: mimir
app.kubernetes.io/instance: test-enterprise-configmap-values
app.kubernetes.io/component: chunks-cache
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
# Source: mimir-distributed/templates/index-cache/index-cache-pdb.yaml
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: test-enterprise-configmap-values-mimir-index-cache
labels:
app.kubernetes.io/name: mimir
app.kubernetes.io/instance: test-enterprise-configmap-values
app.kubernetes.io/component: index-cache
app.kubernetes.io/managed-by: Helm
namespace: "citestns"
spec:
selector:
matchLabels:
app.kubernetes.io/name: mimir
app.kubernetes.io/instance: test-enterprise-configmap-values
app.kubernetes.io/component: index-cache
maxUnavailable: 1
Loading

0 comments on commit f377ac3

Please sign in to comment.