Skip to content

Commit 879a182

Browse files
author
Debakel Orakel
committed
Switch preset to extra-small by default
This PR uses extra-small preset by default. The deployment strategy `SimpleScalable` is deprecated and only available with presets `legacy` and `none`. Every other preset uses deployment strategy `Distributed`
1 parent acb5349 commit 879a182

136 files changed

Lines changed: 6631 additions & 1866 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

class/defaults.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ parameters:
3232
registry: ghcr.io
3333
repository: jkroepke/access-log-exporter
3434

35-
preset: legacy
35+
preset: extra-small
3636

3737
components:
3838
# Read Path

class/loki.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ parameters:
3030
output_path: ${_instance}/10_helm_loki
3131
helm_values_files:
3232
- ${_base_directory}/helmcharts/loki/${loki:charts:loki:version}/${loki:preset}.yaml
33+
- ${_base_directory}/helmcharts/loki/${loki:charts:loki:version}/${_instance}-components.yaml
3334
- ${_base_directory}/helmcharts/loki/${loki:charts:loki:version}/${_instance}-configs.yaml
3435
- ${_base_directory}/helmcharts/loki/${loki:charts:loki:version}/${_instance}-overrides.yaml
3536
helm_params:

component/helm_values.jsonnet

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ local components = com.makeMergeable({
4141
} + com.makeMergeable(params.components.indexGateway),
4242
// Ingress Configuration
4343
gateway: {
44-
[if params.components.gateway.enabled then 'enabledNonEnterprise']: params.components.gateway.enabled,
45-
extraEnvFrom: [ { secretRef: { name: '%s-bucket-secret' % inv.parameters._instance } } ],
4644
extraArgs: [ '-config.expand-env=true' ],
4745
nodeSelector: std.get(params.components.gateway, 'nodeSelector', globalConfig.nodeSelector),
4846
} + com.makeMergeable(params.components.gateway),
@@ -204,6 +202,7 @@ local hardRestrictions = com.makeMergeable({
204202
});
205203

206204
{
205+
['%s-components' % inv.parameters._instance]: components + caches + experimental,
207206
['%s-configs' % inv.parameters._instance]: openshift + images + global + loki + ingress,
208207
['%s-overrides' % inv.parameters._instance]: params.helm_values + hardRestrictions,
209208
}
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
= Upgrade component version v0 to v1
2+
3+
Version 1.x is a major overhaul of the configuration parameters of the component,
4+
https://github.com/projectsyn/component-loki/releases/tag/v1.0.0[see Release Notes] for more details.
5+
6+
The component has lots of options to configure each part of the Loki installation.
7+
Please have a look at the xref:references/parameters.adoc[parameters documentation] for reference.
8+
9+
[IMPORTANT]
10+
====
11+
This component will no longer support Helm charts from grafana/loki.
12+
Instead it uses Helm charts from grafana-community > v17.x of Loki.
13+
====
14+
15+
16+
== Explanation of configuration changes
17+
18+
=== Migrate to Deployment Mode `Distributed`
19+
20+
[IMPORTANT]
21+
====
22+
Prior version of this component used the deployment mode `SimpleScalable`, see https://grafana.com/docs/loki/latest/get-started/deployment-modes/#simple-scalable[Loki Documentation].
23+
This mode is deprecated and will be removed with Loki v4.
24+
Only the preset `legacy` will support `SimpleScalable`, but it is strongly adviced to switch away from `SimpleScalable` and `legacy`.
25+
====
26+
27+
==== Step 1
28+
29+
Deploy v1.x of this component with the following parameters:
30+
31+
[source,yaml]
32+
----
33+
preset: legacy <1>
34+
helm_values:
35+
deploymentMode: SimpleScalable<->Distributed <2>
36+
----
37+
<1> Uses `legacy` preset for component configuration.
38+
<2> Prepares for the transition to `Distributed`.
39+
40+
==== Step 2
41+
42+
Remove the parameters from "Step 1" and deploy again.
43+
44+
=== New Default Resource Requests
45+
46+
[IMPORTANT]
47+
====
48+
This component changes its default resource requests and limits, please check the output of your catalog compilation and adjust if needed.
49+
See xref:references/parameters.adoc#_components[components] and xref:references/parameters.adoc#_caches[caches] to adjust your settings.
50+
====
51+
52+
This component supports the following presets:
53+
54+
* `none`: Use the Helm charts defaults.
55+
* `legacy`: Component defaults for migrating to v1.
56+
* `extra-small`: Component defaults for small production deployments (default).
57+
58+
=== legacy `globalNodeSelector`
59+
60+
The values for the global node selector has moved to `global.nodeSelector`.
61+
62+
[TIP]
63+
====
64+
This change is backward compatible, but migrating the values to the new structure is recommended.
65+
====
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
* xref:index.adoc[Home]
22
* xref:references/parameters.adoc[Parameters]
3+
* xref:how-tos/upgrade-loki-v0-v1.adoc[]

tests/golden/defaults/loki/loki/10_helm_loki/loki/templates/backend/query-scheduler-discovery.yaml

Lines changed: 0 additions & 28 deletions
This file was deleted.

tests/golden/defaults/loki/loki/10_helm_loki/loki/templates/backend/workload.yaml

Lines changed: 0 additions & 215 deletions
This file was deleted.

tests/golden/extra-config/loki/loki/10_helm_loki/loki/templates/read/pdb.yaml renamed to tests/golden/defaults/loki/loki/10_helm_loki/loki/templates/chunks-cache/pdb.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,15 @@ apiVersion: policy/v1
22
kind: PodDisruptionBudget
33
metadata:
44
labels:
5-
app.kubernetes.io/component: read
5+
app.kubernetes.io/component: memcached-chunks-cache
66
app.kubernetes.io/instance: loki
77
app.kubernetes.io/name: loki
8-
app.kubernetes.io/version: 3.7.2
9-
helm.sh/chart: loki-17.4.11
10-
name: loki-read
8+
name: loki-chunks-cache
119
namespace: syn-loki
1210
spec:
1311
maxUnavailable: 1
1412
selector:
1513
matchLabels:
16-
app.kubernetes.io/component: read
14+
app.kubernetes.io/component: memcached-chunks-cache
1715
app.kubernetes.io/instance: loki
1816
app.kubernetes.io/name: loki

tests/golden/defaults/loki/loki/10_helm_loki/loki/templates/chunks-cache/statefulset.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ metadata:
1313
namespace: syn-loki
1414
spec:
1515
podManagementPolicy: Parallel
16-
replicas: 1
16+
replicas: 2
1717
selector:
1818
matchLabels:
1919
app.kubernetes.io/component: memcached-chunks-cache
@@ -66,10 +66,10 @@ spec:
6666
timeoutSeconds: 3
6767
resources:
6868
limits:
69-
memory: 9830Mi
69+
memory: 4Gi
7070
requests:
7171
cpu: 500m
72-
memory: 9830Mi
72+
memory: 4Gi
7373
securityContext:
7474
allowPrivilegeEscalation: false
7575
capabilities:

0 commit comments

Comments
 (0)