Skip to content

Commit 57de81d

Browse files
feat(operator): introduce 1x.pico size (#14407)
1 parent 8361cf2 commit 57de81d

File tree

10 files changed

+157
-19
lines changed

10 files changed

+157
-19
lines changed

‎operator/api/loki/v1/lokistack_types.go

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const (
2727

2828
// LokiStackSizeType declares the type for loki cluster scale outs.
2929
//
30-
// +kubebuilder:validation:Enum="1x.demo";"1x.extra-small";"1x.small";"1x.medium"
30+
// +kubebuilder:validation:Enum="1x.demo";"1x.pico";"1x.extra-small";"1x.small";"1x.medium"
3131
type LokiStackSizeType string
3232

3333
const (
@@ -39,10 +39,18 @@ const (
3939
// DO NOT USE THIS IN PRODUCTION!
4040
SizeOneXDemo LokiStackSizeType = "1x.demo"
4141

42+
// SizeOneXPico defines the size of a single Loki deployment
43+
// with extra small resources/limits requirements and HA support for all
44+
// Loki components. This size is dedicated for setup **without** the
45+
// requirement for single replication factor and auto-compaction.
46+
//
47+
// FIXME: Add clear description of ingestion/query performance expectations.
48+
SizeOneXPico LokiStackSizeType = "1x.pico"
49+
4250
// SizeOneXExtraSmall defines the size of a single Loki deployment
43-
// with extra small resources/limits requirements and without HA support.
44-
// This size is ultimately dedicated for development and demo purposes.
45-
// DO NOT USE THIS IN PRODUCTION!
51+
// with extra small resources/limits requirements and HA support for all
52+
// Loki components. This size is dedicated for setup **without** the
53+
// requirement for single replication factor and auto-compaction.
4654
//
4755
// FIXME: Add clear description of ingestion/query performance expectations.
4856
SizeOneXExtraSmall LokiStackSizeType = "1x.extra-small"

‎operator/bundle/community-openshift/manifests/loki-operator.clusterserviceversion.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ metadata:
150150
categories: OpenShift Optional, Logging & Tracing
151151
certified: "false"
152152
containerImage: docker.io/grafana/loki-operator:0.6.2
153-
createdAt: "2024-10-21T14:32:40Z"
153+
createdAt: "2024-10-23T18:05:45Z"
154154
description: The Community Loki Operator provides Kubernetes native deployment
155155
and management of Loki and related logging components.
156156
features.operators.openshift.io/disconnected: "true"

‎operator/bundle/community-openshift/manifests/loki.grafana.com_lokistacks.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -791,6 +791,7 @@ spec:
791791
out sizes.
792792
enum:
793793
- 1x.demo
794+
- 1x.pico
794795
- 1x.extra-small
795796
- 1x.small
796797
- 1x.medium

‎operator/bundle/community/manifests/loki-operator.clusterserviceversion.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ metadata:
150150
categories: OpenShift Optional, Logging & Tracing
151151
certified: "false"
152152
containerImage: docker.io/grafana/loki-operator:0.6.2
153-
createdAt: "2024-10-21T14:32:37Z"
153+
createdAt: "2024-10-23T18:05:43Z"
154154
description: The Community Loki Operator provides Kubernetes native deployment
155155
and management of Loki and related logging components.
156156
operators.operatorframework.io/builder: operator-sdk-unknown

‎operator/bundle/community/manifests/loki.grafana.com_lokistacks.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -792,6 +792,7 @@ spec:
792792
out sizes.
793793
enum:
794794
- 1x.demo
795+
- 1x.pico
795796
- 1x.extra-small
796797
- 1x.small
797798
- 1x.medium

‎operator/bundle/openshift/manifests/loki-operator.clusterserviceversion.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ metadata:
150150
categories: OpenShift Optional, Logging & Tracing
151151
certified: "false"
152152
containerImage: quay.io/openshift-logging/loki-operator:0.1.0
153-
createdAt: "2024-10-21T14:32:43Z"
153+
createdAt: "2024-10-23T18:05:47Z"
154154
description: |
155155
The Loki Operator for OCP provides a means for configuring and managing a Loki stack for cluster logging.
156156
## Prerequisites and Requirements

‎operator/bundle/openshift/manifests/loki.grafana.com_lokistacks.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -791,6 +791,7 @@ spec:
791791
out sizes.
792792
enum:
793793
- 1x.demo
794+
- 1x.pico
794795
- 1x.extra-small
795796
- 1x.small
796797
- 1x.medium

‎operator/config/crd/bases/loki.grafana.com_lokistacks.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,7 @@ spec:
773773
out sizes.
774774
enum:
775775
- 1x.demo
776+
- 1x.pico
776777
- 1x.extra-small
777778
- 1x.small
778779
- 1x.medium

‎operator/docs/operator/api.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1916,9 +1916,9 @@ DO NOT USE THIS IN PRODUCTION!</p>
19161916
</td>
19171917
</tr><tr><td><p>&#34;1x.extra-small&#34;</p></td>
19181918
<td><p>SizeOneXExtraSmall defines the size of a single Loki deployment
1919-
with extra small resources/limits requirements and without HA support.
1920-
This size is ultimately dedicated for development and demo purposes.
1921-
DO NOT USE THIS IN PRODUCTION!</p>
1919+
with extra small resources/limits requirements and HA support for all
1920+
Loki components. This size is dedicated for setup <strong>without</strong> the
1921+
requirement for single replication factor and auto-compaction.</p>
19221922
<p>FIXME: Add clear description of ingestion/query performance expectations.</p>
19231923
</td>
19241924
</tr><tr><td><p>&#34;1x.medium&#34;</p></td>
@@ -1928,6 +1928,13 @@ Loki components. This size is dedicated for setup <strong>with</strong> the
19281928
requirement for single replication factor and auto-compaction.</p>
19291929
<p>FIXME: Add clear description of ingestion/query performance expectations.</p>
19301930
</td>
1931+
</tr><tr><td><p>&#34;1x.pico&#34;</p></td>
1932+
<td><p>SizeOneXPico defines the size of a single Loki deployment
1933+
with extra small resources/limits requirements and HA support for all
1934+
Loki components. This size is dedicated for setup <strong>without</strong> the
1935+
requirement for single replication factor and auto-compaction.</p>
1936+
<p>FIXME: Add clear description of ingestion/query performance expectations.</p>
1937+
</td>
19311938
</tr><tr><td><p>&#34;1x.small&#34;</p></td>
19321939
<td><p>SizeOneXSmall defines the size of a single Loki deployment
19331940
with small resources/limits requirements and HA support for all

‎operator/internal/manifests/internal/sizes.go

Lines changed: 128 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,64 @@ var ResourceRequirementsTable = map[lokiv1.LokiStackSizeType]ComponentResources{
4848
PVCSize: resource.MustParse("10Gi"),
4949
},
5050
},
51+
lokiv1.SizeOneXPico: {
52+
Querier: corev1.ResourceRequirements{
53+
Requests: map[corev1.ResourceName]resource.Quantity{
54+
corev1.ResourceCPU: resource.MustParse("750m"),
55+
corev1.ResourceMemory: resource.MustParse("1.5Gi"),
56+
},
57+
},
58+
Ruler: ResourceRequirements{
59+
Requests: map[corev1.ResourceName]resource.Quantity{
60+
corev1.ResourceCPU: resource.MustParse("500m"),
61+
corev1.ResourceMemory: resource.MustParse("1Gi"),
62+
},
63+
PVCSize: resource.MustParse("10Gi"),
64+
},
65+
Ingester: ResourceRequirements{
66+
PVCSize: resource.MustParse("10Gi"),
67+
Requests: map[corev1.ResourceName]resource.Quantity{
68+
corev1.ResourceCPU: resource.MustParse("500m"),
69+
corev1.ResourceMemory: resource.MustParse("3Gi"),
70+
},
71+
PDBMinAvailable: 1,
72+
},
73+
Distributor: corev1.ResourceRequirements{
74+
Requests: map[corev1.ResourceName]resource.Quantity{
75+
corev1.ResourceCPU: resource.MustParse("500m"),
76+
corev1.ResourceMemory: resource.MustParse("500Mi"),
77+
},
78+
},
79+
QueryFrontend: corev1.ResourceRequirements{
80+
Requests: map[corev1.ResourceName]resource.Quantity{
81+
corev1.ResourceCPU: resource.MustParse("500m"),
82+
corev1.ResourceMemory: resource.MustParse("500Mi"),
83+
},
84+
},
85+
Compactor: ResourceRequirements{
86+
PVCSize: resource.MustParse("10Gi"),
87+
Requests: map[corev1.ResourceName]resource.Quantity{
88+
corev1.ResourceCPU: resource.MustParse("500m"),
89+
corev1.ResourceMemory: resource.MustParse("500Mi"),
90+
},
91+
},
92+
Gateway: corev1.ResourceRequirements{
93+
Requests: map[corev1.ResourceName]resource.Quantity{
94+
corev1.ResourceCPU: resource.MustParse("500m"),
95+
corev1.ResourceMemory: resource.MustParse("500Mi"),
96+
},
97+
},
98+
IndexGateway: ResourceRequirements{
99+
PVCSize: resource.MustParse("50Gi"),
100+
Requests: map[corev1.ResourceName]resource.Quantity{
101+
corev1.ResourceCPU: resource.MustParse("150m"),
102+
corev1.ResourceMemory: resource.MustParse("250Mi"),
103+
},
104+
},
105+
WALStorage: ResourceRequirements{
106+
PVCSize: resource.MustParse("150Gi"),
107+
},
108+
},
51109
lokiv1.SizeOneXExtraSmall: {
52110
Querier: corev1.ResourceRequirements{
53111
Requests: map[corev1.ResourceName]resource.Quantity{
@@ -283,6 +341,66 @@ var StackSizeTable = map[lokiv1.LokiStackSizeType]lokiv1.LokiStackSpec{
283341
},
284342
},
285343
},
344+
345+
lokiv1.SizeOneXPico: {
346+
Size: lokiv1.SizeOneXPico,
347+
Replication: &lokiv1.ReplicationSpec{
348+
Factor: 2,
349+
},
350+
Limits: &lokiv1.LimitsSpec{
351+
Global: &lokiv1.LimitsTemplateSpec{
352+
IngestionLimits: &lokiv1.IngestionLimitSpec{
353+
// Defaults from Loki docs
354+
IngestionRate: 4,
355+
IngestionBurstSize: 6,
356+
MaxGlobalStreamsPerTenant: 10000,
357+
MaxLabelNameLength: 1024,
358+
MaxLabelValueLength: 2048,
359+
MaxLabelNamesPerSeries: 30,
360+
MaxLineSize: 256000,
361+
PerStreamDesiredRate: 3,
362+
PerStreamRateLimit: 5,
363+
PerStreamRateLimitBurst: 15,
364+
},
365+
QueryLimits: &lokiv1.QueryLimitSpec{
366+
// Defaults from Loki docs
367+
MaxEntriesLimitPerQuery: 5000,
368+
MaxChunksPerQuery: 2000000,
369+
MaxQuerySeries: 500,
370+
QueryTimeout: "3m",
371+
CardinalityLimit: 100000,
372+
MaxVolumeSeries: 1000,
373+
},
374+
},
375+
},
376+
Template: &lokiv1.LokiTemplateSpec{
377+
Compactor: &lokiv1.LokiComponentSpec{
378+
Replicas: 1,
379+
},
380+
Distributor: &lokiv1.LokiComponentSpec{
381+
Replicas: 2,
382+
},
383+
Ingester: &lokiv1.LokiComponentSpec{
384+
Replicas: 3,
385+
},
386+
Querier: &lokiv1.LokiComponentSpec{
387+
Replicas: 2,
388+
},
389+
QueryFrontend: &lokiv1.LokiComponentSpec{
390+
Replicas: 2,
391+
},
392+
Gateway: &lokiv1.LokiComponentSpec{
393+
Replicas: 2,
394+
},
395+
IndexGateway: &lokiv1.LokiComponentSpec{
396+
Replicas: 2,
397+
},
398+
Ruler: &lokiv1.LokiComponentSpec{
399+
Replicas: 2,
400+
},
401+
},
402+
},
403+
286404
lokiv1.SizeOneXExtraSmall: {
287405
Size: lokiv1.SizeOneXExtraSmall,
288406
Replication: &lokiv1.ReplicationSpec{
@@ -292,15 +410,16 @@ var StackSizeTable = map[lokiv1.LokiStackSizeType]lokiv1.LokiStackSpec{
292410
Global: &lokiv1.LimitsTemplateSpec{
293411
IngestionLimits: &lokiv1.IngestionLimitSpec{
294412
// Defaults from Loki docs
295-
IngestionRate: 4,
296-
IngestionBurstSize: 6,
297-
MaxLabelNameLength: 1024,
298-
MaxLabelValueLength: 2048,
299-
MaxLabelNamesPerSeries: 30,
300-
MaxLineSize: 256000,
301-
PerStreamDesiredRate: 3,
302-
PerStreamRateLimit: 5,
303-
PerStreamRateLimitBurst: 15,
413+
IngestionRate: 4,
414+
IngestionBurstSize: 6,
415+
MaxGlobalStreamsPerTenant: 10000,
416+
MaxLabelNameLength: 1024,
417+
MaxLabelValueLength: 2048,
418+
MaxLabelNamesPerSeries: 30,
419+
MaxLineSize: 256000,
420+
PerStreamDesiredRate: 3,
421+
PerStreamRateLimit: 5,
422+
PerStreamRateLimitBurst: 15,
304423
},
305424
QueryLimits: &lokiv1.QueryLimitSpec{
306425
// Defaults from Loki docs

0 commit comments

Comments
 (0)