Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

operator: Add PodAntiAffinity overwrites per component #9408

Merged
merged 2 commits into from
May 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions operator/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## Main

- [9408](https://github.com/grafana/loki/pull/9408) **JoaoBraveCoding**: Add PodAntiAffinity overwrites per component
- [9429](https://github.com/grafana/loki/pull/9429) **aminesnow**: Add default TopologySpreadContraints to Gateway
- [9418](https://github.com/grafana/loki/pull/9418) **JoaoBraveCoding**: Add default TopologySpreadContaints to Querier
- [9383](https://github.com/grafana/loki/pull/9383) **JoaoBraveCoding**: Add default TopologySpreadContaints to Distributor
Expand Down
8 changes: 8 additions & 0 deletions operator/apis/loki/v1/lokistack_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,14 @@ type LokiComponentSpec struct {
// +optional
// +kubebuilder:validation:Optional
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`

// PodAntiAffinity defines the pod anti affinity scheduling rules to schedule pods
// of a component.
//
// +optional
// +kubebuilder:validation:Optional
JoaoBraveCoding marked this conversation as resolved.
Show resolved Hide resolved
// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors="urn:alm:descriptor:com.tectonic.ui:podAntiAffinity",displayName="PodAntiAffinity"
PodAntiAffinity *corev1.PodAntiAffinity `json:"podAntiAffinity,omitempty"`
}

// LokiTemplateSpec defines the template of all requirements to configure
Expand Down
5 changes: 5 additions & 0 deletions operator/apis/loki/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ metadata:
categories: OpenShift Optional, Logging & Tracing
certified: "false"
containerImage: docker.io/grafana/loki-operator:main-ac1c1fd
createdAt: "2023-05-05T07:23:07Z"
createdAt: "2023-05-09T09:43:36Z"
description: The Community Loki Operator provides Kubernetes native deployment
and management of Loki and related logging components.
operators.operatorframework.io/builder: operator-sdk-unknown
Expand Down Expand Up @@ -546,6 +546,12 @@ spec:
- description: Compactor defines the compaction component spec.
displayName: Compactor pods
path: template.compactor
- description: PodAntiAffinity defines the pod anti affinity scheduling rules
to schedule pods of a component.
displayName: PodAntiAffinity
path: template.compactor.podAntiAffinity
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:podAntiAffinity
- description: Replicas defines the number of replica pods of the component.
displayName: Replicas
path: template.compactor.replicas
Expand All @@ -554,6 +560,12 @@ spec:
- description: Distributor defines the distributor component spec.
displayName: Distributor pods
path: template.distributor
- description: PodAntiAffinity defines the pod anti affinity scheduling rules
to schedule pods of a component.
displayName: PodAntiAffinity
path: template.distributor.podAntiAffinity
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:podAntiAffinity
- description: Replicas defines the number of replica pods of the component.
displayName: Replicas
path: template.distributor.replicas
Expand All @@ -562,6 +574,12 @@ spec:
- description: Gateway defines the lokistack gateway component spec.
displayName: Gateway pods
path: template.gateway
- description: PodAntiAffinity defines the pod anti affinity scheduling rules
to schedule pods of a component.
displayName: PodAntiAffinity
path: template.gateway.podAntiAffinity
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:podAntiAffinity
- description: Replicas defines the number of replica pods of the component.
displayName: Replicas
path: template.gateway.replicas
Expand All @@ -570,6 +588,12 @@ spec:
- description: IndexGateway defines the index gateway component spec.
displayName: Index Gateway pods
path: template.indexGateway
- description: PodAntiAffinity defines the pod anti affinity scheduling rules
to schedule pods of a component.
displayName: PodAntiAffinity
path: template.indexGateway.podAntiAffinity
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:podAntiAffinity
- description: Replicas defines the number of replica pods of the component.
displayName: Replicas
path: template.indexGateway.replicas
Expand All @@ -578,6 +602,12 @@ spec:
- description: Ingester defines the ingester component spec.
displayName: Ingester pods
path: template.ingester
- description: PodAntiAffinity defines the pod anti affinity scheduling rules
to schedule pods of a component.
displayName: PodAntiAffinity
path: template.ingester.podAntiAffinity
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:podAntiAffinity
- description: Replicas defines the number of replica pods of the component.
displayName: Replicas
path: template.ingester.replicas
Expand All @@ -586,6 +616,12 @@ spec:
- description: Querier defines the querier component spec.
displayName: Querier pods
path: template.querier
- description: PodAntiAffinity defines the pod anti affinity scheduling rules
to schedule pods of a component.
displayName: PodAntiAffinity
path: template.querier.podAntiAffinity
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:podAntiAffinity
- description: Replicas defines the number of replica pods of the component.
displayName: Replicas
path: template.querier.replicas
Expand All @@ -594,6 +630,12 @@ spec:
- description: QueryFrontend defines the query frontend component spec.
displayName: Query Frontend pods
path: template.queryFrontend
- description: PodAntiAffinity defines the pod anti affinity scheduling rules
to schedule pods of a component.
displayName: PodAntiAffinity
path: template.queryFrontend.podAntiAffinity
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:podAntiAffinity
- description: Replicas defines the number of replica pods of the component.
displayName: Replicas
path: template.queryFrontend.replicas
Expand All @@ -602,6 +644,12 @@ spec:
- description: Ruler defines the ruler component spec.
displayName: Ruler pods
path: template.ruler
- description: PodAntiAffinity defines the pod anti affinity scheduling rules
to schedule pods of a component.
displayName: PodAntiAffinity
path: template.ruler.podAntiAffinity
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:podAntiAffinity
- description: Replicas defines the number of replica pods of the component.
displayName: Replicas
path: template.ruler.replicas
Expand Down
Loading