diff --git a/operator/CHANGELOG.md b/operator/CHANGELOG.md index e7c713d2c99df..61fa6b087ebbd 100644 --- a/operator/CHANGELOG.md +++ b/operator/CHANGELOG.md @@ -1,5 +1,6 @@ ## Main +- [9315](https://github.com/grafana/loki/pull/9315) **aminesnow**: Add zone awareness spec to LokiStack - [9339](https://github.com/grafana/loki/pull/9339) **JoaoBraveCoding**: Add default PodAntiAffinity to Ruler - [9329](https://github.com/grafana/loki/pull/9329) **JoaoBraveCoding**: Add default PodAntiAffinity to Ingester - [9262](https://github.com/grafana/loki/pull/9262) **btaani**: Add PodDisruptionBudget to the Ruler diff --git a/operator/apis/loki/v1/lokistack_types.go b/operator/apis/loki/v1/lokistack_types.go index 4eeddec2b7a05..e0bf4139042fc 100644 --- a/operator/apis/loki/v1/lokistack_types.go +++ b/operator/apis/loki/v1/lokistack_types.go @@ -766,6 +766,7 @@ type LokiStackSpec struct { // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Cluster Proxy" Proxy *ClusterProxy `json:"proxy,omitempty"` + // Deprecated: Please use replication.factor instead. This field will be removed in future versions of this CRD. // ReplicationFactor defines the policy for log stream replication. // // +optional @@ -774,7 +775,14 @@ type LokiStackSpec struct { // +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors="urn:alm:descriptor:com.tectonic.ui:number",displayName="Replication Factor" ReplicationFactor int32 `json:"replicationFactor,omitempty"` - // Rules defines the spec for the ruler component + // Replication defines the configuration for Loki data replication. + // + // +optional + // +kubebuilder:validation:Optional + // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Replication Spec" + Replication *ReplicationSpec `json:"replication,omitempty"` + + // Rules defines the spec for the ruler component. // // +optional // +kubebuilder:validation:Optional @@ -788,7 +796,7 @@ type LokiStackSpec struct { // +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors="urn:alm:descriptor:com.tectonic.ui:advanced",displayName="Rate Limiting" Limits *LimitsSpec `json:"limits,omitempty"` - // Template defines the resource/limits/tolerations/nodeselectors per component + // Template defines the resource/limits/tolerations/nodeselectors per component. // // +optional // +kubebuilder:validation:Optional @@ -803,6 +811,40 @@ type LokiStackSpec struct { Tenants *TenantsSpec `json:"tenants,omitempty"` } +type ReplicationSpec struct { + // Factor defines the policy for log stream replication. + // + // +optional + // +kubebuilder:validation:Optional + // +kubebuilder:validation:Minimum:=1 + // +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors="urn:alm:descriptor:com.tectonic.ui:number",displayName="Replication Factor" + Factor int32 `json:"factor,omitempty"` + + // Zones defines an array of ZoneSpec that the scheduler will try to satisfy. + // + // +optional + // +kubebuilder:validation:Optional + // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Zones Spec" + Zones []ZoneSpec `json:"zones,omitempty"` +} + +// ZoneSpec defines the spec to support zone-aware component deployments. +type ZoneSpec struct { + // MaxSkew describes the maximum degree to which Pods can be unevenly distributed. + // + // +required + // +kubebuilder:default:=1 + // +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors="urn:alm:descriptor:com.tectonic.ui:number",displayName="Max Skew" + MaxSkew int `json:"maxSkew"` + + // TopologyKey is the key that defines a topology in the Nodes' labels. + // + // +required + // +kubebuilder:validation:Required + // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Topology Key" + TopologyKey string `json:"topologyKey"` +} + // LokiStackConditionType deifnes the type of condition types of a Loki deployment. type LokiStackConditionType string diff --git a/operator/apis/loki/v1/v1.go b/operator/apis/loki/v1/v1.go index 219edcedd8320..4863cd693623b 100644 --- a/operator/apis/loki/v1/v1.go +++ b/operator/apis/loki/v1/v1.go @@ -57,6 +57,12 @@ var ( ErrSchemaRetroactivelyChanged = errors.New("Cannot retroactively change schema") // ErrHeaderAuthCredentialsConflict when both Credentials and CredentialsFile are used in a header authentication client. ErrHeaderAuthCredentialsConflict = errors.New("credentials and credentialsFile cannot be used at the same time") + // ErrReplicationZonesNodes when there is an error retrieving nodes with replication zones labels. + ErrReplicationZonesNodes = errors.New("Failed to retrieve nodes for zone replication") + // ErrReplicationFactorToZonesRatio when the replication factor defined is greater than the number of available zones. + ErrReplicationFactorToZonesRatio = errors.New("replication factor is greater than the number of available zones") + // ErrReplicationSpecConflict when both the ReplicationSpec and depricated ReplicationFactor are used. + ErrReplicationSpecConflict = errors.New("replicationSpec and replicationFactor (deprecated) cannot be used at the same time") // ErrRuleMustMatchNamespace indicates that an expression used in an alerting or recording rule is missing // matchers for a namespace. diff --git a/operator/apis/loki/v1/zz_generated.deepcopy.go b/operator/apis/loki/v1/zz_generated.deepcopy.go index d30a5b8bfeef0..9eba6833e012e 100644 --- a/operator/apis/loki/v1/zz_generated.deepcopy.go +++ b/operator/apis/loki/v1/zz_generated.deepcopy.go @@ -770,6 +770,11 @@ func (in *LokiStackSpec) DeepCopyInto(out *LokiStackSpec) { *out = new(ClusterProxy) **out = **in } + if in.Replication != nil { + in, out := &in.Replication, &out.Replication + *out = new(ReplicationSpec) + (*in).DeepCopyInto(*out) + } if in.Rules != nil { in, out := &in.Rules, &out.Rules *out = new(RulesSpec) @@ -1303,6 +1308,26 @@ func (in *RemoteWriteSpec) DeepCopy() *RemoteWriteSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ReplicationSpec) DeepCopyInto(out *ReplicationSpec) { + *out = *in + if in.Zones != nil { + in, out := &in.Zones, &out.Zones + *out = make([]ZoneSpec, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicationSpec. +func (in *ReplicationSpec) DeepCopy() *ReplicationSpec { + if in == nil { + return nil + } + out := new(ReplicationSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RetentionLimitSpec) DeepCopyInto(out *RetentionLimitSpec) { *out = *in @@ -1613,3 +1638,18 @@ func (in *TenantsSpec) DeepCopy() *TenantsSpec { in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ZoneSpec) DeepCopyInto(out *ZoneSpec) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ZoneSpec. +func (in *ZoneSpec) DeepCopy() *ZoneSpec { + if in == nil { + return nil + } + out := new(ZoneSpec) + in.DeepCopyInto(out) + return out +} diff --git a/operator/bundle/community-openshift/manifests/loki-operator.clusterserviceversion.yaml b/operator/bundle/community-openshift/manifests/loki-operator.clusterserviceversion.yaml index 4494c360e97f4..56cf062946f42 100644 --- a/operator/bundle/community-openshift/manifests/loki-operator.clusterserviceversion.yaml +++ b/operator/bundle/community-openshift/manifests/loki-operator.clusterserviceversion.yaml @@ -438,12 +438,36 @@ spec: - description: NoProxy configures the NO_PROXY/no_proxy env variable. displayName: NoProxy path: proxy.noProxy - - description: ReplicationFactor defines the policy for log stream replication. + - description: Replication defines the configuration for Loki data replication. + displayName: Replication Spec + path: replication + - description: Factor defines the policy for log stream replication. + displayName: Replication Factor + path: replication.factor + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:number + - description: Zones defines an array of ZoneSpec that the scheduler will try + to satisfy. + displayName: Zones Spec + path: replication.zones + - description: MaxSkew describes the maximum degree to which Pods can be unevenly + distributed. + displayName: Max Skew + path: replication.zones[0].maxSkew + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:number + - description: TopologyKey is the key that defines a topology in the Nodes' + labels. + displayName: Topology Key + path: replication.zones[0].topologyKey + - description: 'Deprecated: Please use replication.factor instead. This field + will be removed in future versions of this CRD. ReplicationFactor defines + the policy for log stream replication.' displayName: Replication Factor path: replicationFactor x-descriptors: - urn:alm:descriptor:com.tectonic.ui:number - - description: Rules defines the spec for the ruler component + - description: Rules defines the spec for the ruler component. displayName: Rules path: rules x-descriptors: @@ -514,7 +538,7 @@ spec: x-descriptors: - urn:alm:descriptor:io.kubernetes:StorageClass - description: Template defines the resource/limits/tolerations/nodeselectors - per component + per component. displayName: Node Placement path: template x-descriptors: diff --git a/operator/bundle/community-openshift/manifests/loki.grafana.com_lokistacks.yaml b/operator/bundle/community-openshift/manifests/loki.grafana.com_lokistacks.yaml index 2fa9f521e9533..65b38988f4f8b 100644 --- a/operator/bundle/community-openshift/manifests/loki.grafana.com_lokistacks.yaml +++ b/operator/bundle/community-openshift/manifests/loki.grafana.com_lokistacks.yaml @@ -335,13 +335,45 @@ spec: description: NoProxy configures the NO_PROXY/no_proxy env variable. type: string type: object + replication: + description: Replication defines the configuration for Loki data replication. + properties: + factor: + description: Factor defines the policy for log stream replication. + format: int32 + minimum: 1 + type: integer + zones: + description: Zones defines an array of ZoneSpec that the scheduler + will try to satisfy. + items: + description: ZoneSpec defines the spec to support zone-aware + component deployments. + properties: + maxSkew: + default: 1 + description: MaxSkew describes the maximum degree to which + Pods can be unevenly distributed. + type: integer + topologyKey: + description: TopologyKey is the key that defines a topology + in the Nodes' labels. + type: string + required: + - maxSkew + - topologyKey + type: object + type: array + type: object replicationFactor: - description: ReplicationFactor defines the policy for log stream replication. + description: 'Deprecated: Please use replication.factor instead. This + field will be removed in future versions of this CRD. ReplicationFactor + defines the policy for log stream replication.' format: int32 minimum: 1 type: integer rules: - description: Rules defines the spec for the ruler component + description: Rules defines the spec for the ruler component. properties: enabled: description: Enabled defines a flag to enable/disable the ruler @@ -530,7 +562,7 @@ spec: type: string template: description: Template defines the resource/limits/tolerations/nodeselectors - per component + per component. properties: compactor: description: Compactor defines the compaction component spec. diff --git a/operator/bundle/community/manifests/loki-operator.clusterserviceversion.yaml b/operator/bundle/community/manifests/loki-operator.clusterserviceversion.yaml index 4dda0d8186343..ad1c201ec1b05 100644 --- a/operator/bundle/community/manifests/loki-operator.clusterserviceversion.yaml +++ b/operator/bundle/community/manifests/loki-operator.clusterserviceversion.yaml @@ -438,12 +438,36 @@ spec: - description: NoProxy configures the NO_PROXY/no_proxy env variable. displayName: NoProxy path: proxy.noProxy - - description: ReplicationFactor defines the policy for log stream replication. + - description: Replication defines the configuration for Loki data replication. + displayName: Replication Spec + path: replication + - description: Factor defines the policy for log stream replication. + displayName: Replication Factor + path: replication.factor + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:number + - description: Zones defines an array of ZoneSpec that the scheduler will try + to satisfy. + displayName: Zones Spec + path: replication.zones + - description: MaxSkew describes the maximum degree to which Pods can be unevenly + distributed. + displayName: Max Skew + path: replication.zones[0].maxSkew + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:number + - description: TopologyKey is the key that defines a topology in the Nodes' + labels. + displayName: Topology Key + path: replication.zones[0].topologyKey + - description: 'Deprecated: Please use replication.factor instead. This field + will be removed in future versions of this CRD. ReplicationFactor defines + the policy for log stream replication.' displayName: Replication Factor path: replicationFactor x-descriptors: - urn:alm:descriptor:com.tectonic.ui:number - - description: Rules defines the spec for the ruler component + - description: Rules defines the spec for the ruler component. displayName: Rules path: rules x-descriptors: @@ -514,7 +538,7 @@ spec: x-descriptors: - urn:alm:descriptor:io.kubernetes:StorageClass - description: Template defines the resource/limits/tolerations/nodeselectors - per component + per component. displayName: Node Placement path: template x-descriptors: diff --git a/operator/bundle/community/manifests/loki.grafana.com_lokistacks.yaml b/operator/bundle/community/manifests/loki.grafana.com_lokistacks.yaml index cde876b838388..2109df5b68b53 100644 --- a/operator/bundle/community/manifests/loki.grafana.com_lokistacks.yaml +++ b/operator/bundle/community/manifests/loki.grafana.com_lokistacks.yaml @@ -335,13 +335,45 @@ spec: description: NoProxy configures the NO_PROXY/no_proxy env variable. type: string type: object + replication: + description: Replication defines the configuration for Loki data replication. + properties: + factor: + description: Factor defines the policy for log stream replication. + format: int32 + minimum: 1 + type: integer + zones: + description: Zones defines an array of ZoneSpec that the scheduler + will try to satisfy. + items: + description: ZoneSpec defines the spec to support zone-aware + component deployments. + properties: + maxSkew: + default: 1 + description: MaxSkew describes the maximum degree to which + Pods can be unevenly distributed. + type: integer + topologyKey: + description: TopologyKey is the key that defines a topology + in the Nodes' labels. + type: string + required: + - maxSkew + - topologyKey + type: object + type: array + type: object replicationFactor: - description: ReplicationFactor defines the policy for log stream replication. + description: 'Deprecated: Please use replication.factor instead. This + field will be removed in future versions of this CRD. ReplicationFactor + defines the policy for log stream replication.' format: int32 minimum: 1 type: integer rules: - description: Rules defines the spec for the ruler component + description: Rules defines the spec for the ruler component. properties: enabled: description: Enabled defines a flag to enable/disable the ruler @@ -530,7 +562,7 @@ spec: type: string template: description: Template defines the resource/limits/tolerations/nodeselectors - per component + per component. properties: compactor: description: Compactor defines the compaction component spec. diff --git a/operator/bundle/openshift/manifests/loki-operator.clusterserviceversion.yaml b/operator/bundle/openshift/manifests/loki-operator.clusterserviceversion.yaml index b165660cef34d..9c0816cb6f2ca 100644 --- a/operator/bundle/openshift/manifests/loki-operator.clusterserviceversion.yaml +++ b/operator/bundle/openshift/manifests/loki-operator.clusterserviceversion.yaml @@ -150,7 +150,7 @@ metadata: categories: OpenShift Optional, Logging & Tracing certified: "false" containerImage: quay.io/openshift-logging/loki-operator:v0.1.0 - createdAt: "2023-04-26T13:24:45Z" + createdAt: "2023-05-02T10:32:20Z" description: | The Loki Operator for OCP provides a means for configuring and managing a Loki stack for cluster logging. ## Prerequisites and Requirements @@ -451,12 +451,36 @@ spec: - description: NoProxy configures the NO_PROXY/no_proxy env variable. displayName: NoProxy path: proxy.noProxy - - description: ReplicationFactor defines the policy for log stream replication. + - description: Replication defines the configuration for Loki data replication. + displayName: Replication Spec + path: replication + - description: Factor defines the policy for log stream replication. + displayName: Replication Factor + path: replication.factor + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:number + - description: Zones defines an array of ZoneSpec that the scheduler will try + to satisfy. + displayName: Zones Spec + path: replication.zones + - description: MaxSkew describes the maximum degree to which Pods can be unevenly + distributed. + displayName: Max Skew + path: replication.zones[0].maxSkew + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:number + - description: TopologyKey is the key that defines a topology in the Nodes' + labels. + displayName: Topology Key + path: replication.zones[0].topologyKey + - description: 'Deprecated: Please use replication.factor instead. This field + will be removed in future versions of this CRD. ReplicationFactor defines + the policy for log stream replication.' displayName: Replication Factor path: replicationFactor x-descriptors: - urn:alm:descriptor:com.tectonic.ui:number - - description: Rules defines the spec for the ruler component + - description: Rules defines the spec for the ruler component. displayName: Rules path: rules x-descriptors: @@ -527,7 +551,7 @@ spec: x-descriptors: - urn:alm:descriptor:io.kubernetes:StorageClass - description: Template defines the resource/limits/tolerations/nodeselectors - per component + per component. displayName: Node Placement path: template x-descriptors: diff --git a/operator/bundle/openshift/manifests/loki.grafana.com_lokistacks.yaml b/operator/bundle/openshift/manifests/loki.grafana.com_lokistacks.yaml index 7e58cfa685539..5e304b86bf270 100644 --- a/operator/bundle/openshift/manifests/loki.grafana.com_lokistacks.yaml +++ b/operator/bundle/openshift/manifests/loki.grafana.com_lokistacks.yaml @@ -335,13 +335,45 @@ spec: description: NoProxy configures the NO_PROXY/no_proxy env variable. type: string type: object + replication: + description: Replication defines the configuration for Loki data replication. + properties: + factor: + description: Factor defines the policy for log stream replication. + format: int32 + minimum: 1 + type: integer + zones: + description: Zones defines an array of ZoneSpec that the scheduler + will try to satisfy. + items: + description: ZoneSpec defines the spec to support zone-aware + component deployments. + properties: + maxSkew: + default: 1 + description: MaxSkew describes the maximum degree to which + Pods can be unevenly distributed. + type: integer + topologyKey: + description: TopologyKey is the key that defines a topology + in the Nodes' labels. + type: string + required: + - maxSkew + - topologyKey + type: object + type: array + type: object replicationFactor: - description: ReplicationFactor defines the policy for log stream replication. + description: 'Deprecated: Please use replication.factor instead. This + field will be removed in future versions of this CRD. ReplicationFactor + defines the policy for log stream replication.' format: int32 minimum: 1 type: integer rules: - description: Rules defines the spec for the ruler component + description: Rules defines the spec for the ruler component. properties: enabled: description: Enabled defines a flag to enable/disable the ruler @@ -530,7 +562,7 @@ spec: type: string template: description: Template defines the resource/limits/tolerations/nodeselectors - per component + per component. properties: compactor: description: Compactor defines the compaction component spec. diff --git a/operator/config/crd/bases/loki.grafana.com_lokistacks.yaml b/operator/config/crd/bases/loki.grafana.com_lokistacks.yaml index 0e59d766a2e8d..d55aa81b29c2e 100644 --- a/operator/config/crd/bases/loki.grafana.com_lokistacks.yaml +++ b/operator/config/crd/bases/loki.grafana.com_lokistacks.yaml @@ -318,13 +318,45 @@ spec: description: NoProxy configures the NO_PROXY/no_proxy env variable. type: string type: object + replication: + description: Replication defines the configuration for Loki data replication. + properties: + factor: + description: Factor defines the policy for log stream replication. + format: int32 + minimum: 1 + type: integer + zones: + description: Zones defines an array of ZoneSpec that the scheduler + will try to satisfy. + items: + description: ZoneSpec defines the spec to support zone-aware + component deployments. + properties: + maxSkew: + default: 1 + description: MaxSkew describes the maximum degree to which + Pods can be unevenly distributed. + type: integer + topologyKey: + description: TopologyKey is the key that defines a topology + in the Nodes' labels. + type: string + required: + - maxSkew + - topologyKey + type: object + type: array + type: object replicationFactor: - description: ReplicationFactor defines the policy for log stream replication. + description: 'Deprecated: Please use replication.factor instead. This + field will be removed in future versions of this CRD. ReplicationFactor + defines the policy for log stream replication.' format: int32 minimum: 1 type: integer rules: - description: Rules defines the spec for the ruler component + description: Rules defines the spec for the ruler component. properties: enabled: description: Enabled defines a flag to enable/disable the ruler @@ -513,7 +545,7 @@ spec: type: string template: description: Template defines the resource/limits/tolerations/nodeselectors - per component + per component. properties: compactor: description: Compactor defines the compaction component spec. diff --git a/operator/config/manifests/community-openshift/bases/loki-operator.clusterserviceversion.yaml b/operator/config/manifests/community-openshift/bases/loki-operator.clusterserviceversion.yaml index 0eb945874e1bc..6ae0e63883804 100644 --- a/operator/config/manifests/community-openshift/bases/loki-operator.clusterserviceversion.yaml +++ b/operator/config/manifests/community-openshift/bases/loki-operator.clusterserviceversion.yaml @@ -351,12 +351,36 @@ spec: - description: NoProxy configures the NO_PROXY/no_proxy env variable. displayName: NoProxy path: proxy.noProxy - - description: ReplicationFactor defines the policy for log stream replication. + - description: Replication defines the configuration for Loki data replication. + displayName: Replication Spec + path: replication + - description: Factor defines the policy for log stream replication. + displayName: Replication Factor + path: replication.factor + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:number + - description: Zones defines an array of ZoneSpec that the scheduler will try + to satisfy. + displayName: Zones Spec + path: replication.zones + - description: MaxSkew describes the maximum degree to which Pods can be unevenly + distributed. + displayName: Max Skew + path: replication.zones[0].maxSkew + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:number + - description: TopologyKey is the key that defines a topology in the Nodes' + labels. + displayName: Topology Key + path: replication.zones[0].topologyKey + - description: 'Deprecated: Please use replication.factor instead. This field + will be removed in future versions of this CRD. ReplicationFactor defines + the policy for log stream replication.' displayName: Replication Factor path: replicationFactor x-descriptors: - urn:alm:descriptor:com.tectonic.ui:number - - description: Rules defines the spec for the ruler component + - description: Rules defines the spec for the ruler component. displayName: Rules path: rules x-descriptors: @@ -427,7 +451,7 @@ spec: x-descriptors: - urn:alm:descriptor:io.kubernetes:StorageClass - description: Template defines the resource/limits/tolerations/nodeselectors - per component + per component. displayName: Node Placement path: template x-descriptors: diff --git a/operator/config/manifests/community/bases/loki-operator.clusterserviceversion.yaml b/operator/config/manifests/community/bases/loki-operator.clusterserviceversion.yaml index 2f441271cbf99..a1194efee4f14 100644 --- a/operator/config/manifests/community/bases/loki-operator.clusterserviceversion.yaml +++ b/operator/config/manifests/community/bases/loki-operator.clusterserviceversion.yaml @@ -351,12 +351,36 @@ spec: - description: NoProxy configures the NO_PROXY/no_proxy env variable. displayName: NoProxy path: proxy.noProxy - - description: ReplicationFactor defines the policy for log stream replication. + - description: Replication defines the configuration for Loki data replication. + displayName: Replication Spec + path: replication + - description: Factor defines the policy for log stream replication. + displayName: Replication Factor + path: replication.factor + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:number + - description: Zones defines an array of ZoneSpec that the scheduler will try + to satisfy. + displayName: Zones Spec + path: replication.zones + - description: MaxSkew describes the maximum degree to which Pods can be unevenly + distributed. + displayName: Max Skew + path: replication.zones[0].maxSkew + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:number + - description: TopologyKey is the key that defines a topology in the Nodes' + labels. + displayName: Topology Key + path: replication.zones[0].topologyKey + - description: 'Deprecated: Please use replication.factor instead. This field + will be removed in future versions of this CRD. ReplicationFactor defines + the policy for log stream replication.' displayName: Replication Factor path: replicationFactor x-descriptors: - urn:alm:descriptor:com.tectonic.ui:number - - description: Rules defines the spec for the ruler component + - description: Rules defines the spec for the ruler component. displayName: Rules path: rules x-descriptors: @@ -427,7 +451,7 @@ spec: x-descriptors: - urn:alm:descriptor:io.kubernetes:StorageClass - description: Template defines the resource/limits/tolerations/nodeselectors - per component + per component. displayName: Node Placement path: template x-descriptors: diff --git a/operator/config/manifests/openshift/bases/loki-operator.clusterserviceversion.yaml b/operator/config/manifests/openshift/bases/loki-operator.clusterserviceversion.yaml index 565abac2d9e73..beeb299074274 100644 --- a/operator/config/manifests/openshift/bases/loki-operator.clusterserviceversion.yaml +++ b/operator/config/manifests/openshift/bases/loki-operator.clusterserviceversion.yaml @@ -363,12 +363,36 @@ spec: - description: NoProxy configures the NO_PROXY/no_proxy env variable. displayName: NoProxy path: proxy.noProxy - - description: ReplicationFactor defines the policy for log stream replication. + - description: Replication defines the configuration for Loki data replication. + displayName: Replication Spec + path: replication + - description: Factor defines the policy for log stream replication. + displayName: Replication Factor + path: replication.factor + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:number + - description: Zones defines an array of ZoneSpec that the scheduler will try + to satisfy. + displayName: Zones Spec + path: replication.zones + - description: MaxSkew describes the maximum degree to which Pods can be unevenly + distributed. + displayName: Max Skew + path: replication.zones[0].maxSkew + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:number + - description: TopologyKey is the key that defines a topology in the Nodes' + labels. + displayName: Topology Key + path: replication.zones[0].topologyKey + - description: 'Deprecated: Please use replication.factor instead. This field + will be removed in future versions of this CRD. ReplicationFactor defines + the policy for log stream replication.' displayName: Replication Factor path: replicationFactor x-descriptors: - urn:alm:descriptor:com.tectonic.ui:number - - description: Rules defines the spec for the ruler component + - description: Rules defines the spec for the ruler component. displayName: Rules path: rules x-descriptors: @@ -439,7 +463,7 @@ spec: x-descriptors: - urn:alm:descriptor:io.kubernetes:StorageClass - description: Template defines the resource/limits/tolerations/nodeselectors - per component + per component. displayName: Node Placement path: template x-descriptors: diff --git a/operator/docs/operator/api.md b/operator/docs/operator/api.md index d504a742dd7a5..7aaa5e4bca670 100644 --- a/operator/docs/operator/api.md +++ b/operator/docs/operator/api.md @@ -1602,7 +1602,15 @@ are degraded or the cluster cannot connect to object storage.
"1x.extra-small"
"1x.demo"
SizeOneXDemo defines the size of a single Loki deployment +with tiny resource requirements and without HA support. +This size is intended to run in single-node clusters on laptops, +it is only useful for very light testing, demonstrations, or prototypes. +There are no ingestion/query performance guarantees. +DO NOT USE THIS IN PRODUCTION!
+"1x.extra-small"
SizeOneXExtraSmall defines the size of a single Loki deployment with extra small resources/limits requirements and without HA support. This size is ultimately dedicated for development and demo purposes. @@ -1729,7 +1737,22 @@ int32
ReplicationFactor defines the policy for log stream replication.
+Deprecated: Please use replication.factor instead. This field will be removed in future versions of this CRD. +ReplicationFactor defines the policy for log stream replication.
+replication
Replication defines the configuration for Loki data replication.
Rules defines the spec for the ruler component
+Rules defines the spec for the ruler component.
Template defines the resource/limits/tolerations/nodeselectors per component
+Template defines the resource/limits/tolerations/nodeselectors per component.
"azure"
"alibabacloud"
ObjectStorageSecretAlibabaCloud when using AlibabaCloud OSS for Loki storage
+"azure"
ObjectStorageSecretAzure when using Azure for Loki storage
"gcs"
+(Appears on:LokiStackSpec) +
+Field | +Description | +
---|---|
+factor + +int32 + + |
+
+(Optional)
+ Factor defines the policy for log stream replication. + |
+
+zones + + +[]ZoneSpec + + + |
+
+(Optional)
+ Zones defines an array of ZoneSpec that the scheduler will try to satisfy. + |
+
(Appears on:LimitsTemplateSpec) @@ -3897,6 +3966,46 @@ AuthorizationSpec + +## ZoneSpec { #loki-grafana-com-v1-ZoneSpec } +
+(Appears on:ReplicationSpec) +
+ZoneSpec defines the spec to support zone-aware component deployments.
+Field | +Description | +
---|---|
+maxSkew + +int + + |
+
+ MaxSkew describes the maximum degree to which Pods can be unevenly distributed. + |
+
+topologyKey + +string + + |
+
+ TopologyKey is the key that defines a topology in the Nodes’ labels. + |
+