From b147e6ccba237276b7cc2d6dff8f8cda1fd09aed Mon Sep 17 00:00:00 2001 From: Gerard Vanloo Date: Wed, 16 Nov 2022 16:20:22 -0500 Subject: [PATCH] operator: Remove default value from replicationFactor field (#7711) --- operator/CHANGELOG.md | 1 + operator/apis/loki/v1/lokistack_types.go | 3 +-- operator/bundle/manifests/loki.grafana.com_lokistacks.yaml | 5 ++--- operator/config/crd/bases/loki.grafana.com_lokistacks.yaml | 5 ++--- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/operator/CHANGELOG.md b/operator/CHANGELOG.md index 59fd5830ec..22f005edaf 100644 --- a/operator/CHANGELOG.md +++ b/operator/CHANGELOG.md @@ -1,5 +1,6 @@ ## Main +- [7711](https://github.com/grafana/loki/pull/7711) **Red-GV**: Remove default value from replicationFactor field - [7617](https://github.com/grafana/loki/pull/7617) **Red-GV**: Modify ingestionRate for respective shirt size - [7592](https://github.com/grafana/loki/pull/7592) **aminesnow**: Update API docs generation using gen-crd-api-reference-docs - [7448](https://github.com/grafana/loki/pull/7448) **periklis**: Add TLS support for compactor delete client diff --git a/operator/apis/loki/v1/lokistack_types.go b/operator/apis/loki/v1/lokistack_types.go index 2dd07aac89..a8edcf08a6 100644 --- a/operator/apis/loki/v1/lokistack_types.go +++ b/operator/apis/loki/v1/lokistack_types.go @@ -707,9 +707,8 @@ type LokiStackSpec struct { // +optional // +kubebuilder:validation:Optional // +kubebuilder:validation:Minimum:=1 - // +kubebuilder:default:=1 // +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors="urn:alm:descriptor:com.tectonic.ui:number",displayName="Replication Factor" - ReplicationFactor int32 `json:"replicationFactor"` + ReplicationFactor int32 `json:"replicationFactor,omitempty"` // Rules defines the spec for the ruler component // diff --git a/operator/bundle/manifests/loki.grafana.com_lokistacks.yaml b/operator/bundle/manifests/loki.grafana.com_lokistacks.yaml index d38be3da2a..1755a52f88 100644 --- a/operator/bundle/manifests/loki.grafana.com_lokistacks.yaml +++ b/operator/bundle/manifests/loki.grafana.com_lokistacks.yaml @@ -52,7 +52,7 @@ spec: metadata: type: object spec: - description: LokiStackSpec defines the desired state of LokiStack + description: LokiStack CR spec field. properties: limits: description: Limits defines the limits to be applied to log stream @@ -314,7 +314,6 @@ spec: type: boolean type: object replicationFactor: - default: 1 description: ReplicationFactor defines the policy for log stream replication. format: int32 minimum: 1 @@ -1135,7 +1134,7 @@ spec: - storageClassName type: object status: - description: LokiStackStatus defines the observed state of LokiStack + description: LokiStack CR spec Status. properties: components: description: Components provides summary of all Loki pod status grouped diff --git a/operator/config/crd/bases/loki.grafana.com_lokistacks.yaml b/operator/config/crd/bases/loki.grafana.com_lokistacks.yaml index fd9444c6d5..75be110297 100644 --- a/operator/config/crd/bases/loki.grafana.com_lokistacks.yaml +++ b/operator/config/crd/bases/loki.grafana.com_lokistacks.yaml @@ -35,7 +35,7 @@ spec: metadata: type: object spec: - description: LokiStackSpec defines the desired state of LokiStack + description: LokiStack CR spec field. properties: limits: description: Limits defines the limits to be applied to log stream @@ -297,7 +297,6 @@ spec: type: boolean type: object replicationFactor: - default: 1 description: ReplicationFactor defines the policy for log stream replication. format: int32 minimum: 1 @@ -1118,7 +1117,7 @@ spec: - storageClassName type: object status: - description: LokiStackStatus defines the observed state of LokiStack + description: LokiStack CR spec Status. properties: components: description: Components provides summary of all Loki pod status grouped