diff --git a/class/defaults.yml b/class/defaults.yml index e989638..51db920 100644 --- a/class/defaults.yml +++ b/class/defaults.yml @@ -27,7 +27,7 @@ parameters: endpoint: '' bucketnames: '${cluster:name}-logstore' spec: - size: 1x.demo + size: 1x.pico storage: schemas: - version: v12 @@ -40,11 +40,6 @@ parameters: storageClassName: '' tenants: mode: openshift-logging - limits: - global: - ingestion: - ingestionBurstSize: 9 - ingestionRate: 5 logmetrics: enabled: false spec: diff --git a/component/log_lokistack.libsonnet b/component/log_lokistack.libsonnet index 3b9da34..73602f6 100644 --- a/component/log_lokistack.libsonnet +++ b/component/log_lokistack.libsonnet @@ -8,8 +8,15 @@ local po = import 'lib/patch-operator.libsonnet'; local inv = kap.inventory(); local loki = inv.parameters.openshift4_logging.components.lokistack; - local lokistack_spec = { + [if loki.spec.size == '1x.demo' then 'limits']: { + global: { + ingestion: { + ingestionBurstSize: 9, + ingestionRate: 5, + }, + }, + }, template: { compactor: { [if loki.spec.size == '1x.demo' then 'replicas']: 1, diff --git a/tests/golden/defaults/openshift4-logging/openshift4-logging/30_loki_stack.yaml b/tests/golden/defaults/openshift4-logging/openshift4-logging/30_loki_stack.yaml index f859742..c70e599 100644 --- a/tests/golden/defaults/openshift4-logging/openshift4-logging/30_loki_stack.yaml +++ b/tests/golden/defaults/openshift4-logging/openshift4-logging/30_loki_stack.yaml @@ -8,12 +8,7 @@ metadata: name: loki name: loki spec: - limits: - global: - ingestion: - ingestionBurstSize: 9 - ingestionRate: 5 - size: 1x.demo + size: 1x.pico storage: schemas: - effectiveDate: '2022-06-01' @@ -28,34 +23,26 @@ spec: compactor: nodeSelector: node-role.kubernetes.io/infra: '' - replicas: 1 distributor: nodeSelector: node-role.kubernetes.io/infra: '' - replicas: 2 gateway: nodeSelector: node-role.kubernetes.io/infra: '' - replicas: 2 indexGateway: nodeSelector: node-role.kubernetes.io/infra: '' - replicas: 2 ingester: nodeSelector: node-role.kubernetes.io/infra: '' - replicas: 2 querier: nodeSelector: node-role.kubernetes.io/infra: '' - replicas: 2 queryFrontend: nodeSelector: node-role.kubernetes.io/infra: '' - replicas: 2 ruler: nodeSelector: node-role.kubernetes.io/infra: '' - replicas: 1 tenants: mode: openshift-logging diff --git a/tests/golden/master/openshift4-logging/openshift4-logging/30_loki_stack.yaml b/tests/golden/master/openshift4-logging/openshift4-logging/30_loki_stack.yaml index f859742..c70e599 100644 --- a/tests/golden/master/openshift4-logging/openshift4-logging/30_loki_stack.yaml +++ b/tests/golden/master/openshift4-logging/openshift4-logging/30_loki_stack.yaml @@ -8,12 +8,7 @@ metadata: name: loki name: loki spec: - limits: - global: - ingestion: - ingestionBurstSize: 9 - ingestionRate: 5 - size: 1x.demo + size: 1x.pico storage: schemas: - effectiveDate: '2022-06-01' @@ -28,34 +23,26 @@ spec: compactor: nodeSelector: node-role.kubernetes.io/infra: '' - replicas: 1 distributor: nodeSelector: node-role.kubernetes.io/infra: '' - replicas: 2 gateway: nodeSelector: node-role.kubernetes.io/infra: '' - replicas: 2 indexGateway: nodeSelector: node-role.kubernetes.io/infra: '' - replicas: 2 ingester: nodeSelector: node-role.kubernetes.io/infra: '' - replicas: 2 querier: nodeSelector: node-role.kubernetes.io/infra: '' - replicas: 2 queryFrontend: nodeSelector: node-role.kubernetes.io/infra: '' - replicas: 2 ruler: nodeSelector: node-role.kubernetes.io/infra: '' - replicas: 1 tenants: mode: openshift-logging