Add missing index-gateway to pod status map

pull/4945/head
Periklis Tsirakidis 4 years ago
parent 4feee18825
commit caa0b7f2ea
  1. 11
      operator/api/v1beta1/lokistack_types.go
  2. 15
      operator/api/v1beta1/zz_generated.deepcopy.go
  3. 10
      operator/bundle/manifests/loki-operator.clusterserviceversion.yaml
  4. 12
      operator/bundle/manifests/loki.openshift.io_lokistacks.yaml
  5. 11
      operator/config/crd/bases/loki.openshift.io_lokistacks.yaml
  6. 10
      operator/config/manifests/bases/loki-operator.clusterserviceversion.yaml
  7. 2
      operator/internal/external/k8s/k8sfakes/fake_builder.go
  8. 7
      operator/internal/status/components.go

@ -579,6 +579,13 @@ type LokiStackComponentStatus struct {
// +operator-sdk:csv:customresourcedefinitions:type=status,xDescriptors="urn:alm:descriptor:com.tectonic.ui:podStatuses",displayName="Distributor",order=1
Distributor PodStatusMap `json:"distributor,omitempty"`
// IndexGateway is a map to the per pod status of the index gateway statefulset
//
// +optional
// +kubebuilder:validation:Optional
// +operator-sdk:csv:customresourcedefinitions:type=status,xDescriptors="urn:alm:descriptor:com.tectonic.ui:podStatuses",displayName="IndexGateway",order=6
IndexGateway PodStatusMap `json:"indexGateway,omitempty"`
// Ingester is a map to the per pod status of the ingester statefulset
//
// +optional
@ -586,14 +593,14 @@ type LokiStackComponentStatus struct {
// +operator-sdk:csv:customresourcedefinitions:type=status,xDescriptors="urn:alm:descriptor:com.tectonic.ui:podStatuses",displayName="Ingester",order=2
Ingester PodStatusMap `json:"ingester,omitempty"`
// Querier is a map to the per pod status of the querier statefulset
// Querier is a map to the per pod status of the querier deployment
//
// +optional
// +kubebuilder:validation:Optional
// +operator-sdk:csv:customresourcedefinitions:type=status,xDescriptors="urn:alm:descriptor:com.tectonic.ui:podStatuses",displayName="Querier",order=3
Querier PodStatusMap `json:"querier,omitempty"`
// QueryFrontend is a map to the per pod status of the query frontend deployment.
// QueryFrontend is a map to the per pod status of the query frontend deployment
//
// +optional
// +kubebuilder:validation:Optional

@ -220,6 +220,21 @@ func (in *LokiStackComponentStatus) DeepCopyInto(out *LokiStackComponentStatus)
(*out)[key] = outVal
}
}
if in.IndexGateway != nil {
in, out := &in.IndexGateway, &out.IndexGateway
*out = make(PodStatusMap, len(*in))
for key, val := range *in {
var outVal []string
if val == nil {
(*out)[key] = nil
} else {
in, out := &val, &outVal
*out = make([]string, len(*in))
copy(*out, *in)
}
(*out)[key] = outVal
}
}
if in.Ingester != nil {
in, out := &in.Ingester, &out.Ingester
*out = make(PodStatusMap, len(*in))

@ -382,13 +382,13 @@ spec:
path: components.ingester
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:podStatuses
- description: Querier is a map to the per pod status of the querier statefulset
- description: Querier is a map to the per pod status of the querier deployment
displayName: Querier
path: components.querier
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:podStatuses
- description: QueryFrontend is a map to the per pod status of the query frontend
deployment.
deployment
displayName: Query Frontend
path: components.queryFrontend
x-descriptors:
@ -404,6 +404,12 @@ spec:
path: components.gateway
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:podStatuses
- description: IndexGateway is a map to the per pod status of the index gateway
statefulset
displayName: IndexGateway
path: components.indexGateway
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:podStatuses
- description: Conditions of the Loki deployment health.
displayName: Conditions
path: conditions

@ -834,6 +834,14 @@ spec:
description: Gateway is a map to the per pod status of the lokistack
gateway deployment.
type: object
indexGateway:
additionalProperties:
items:
type: string
type: array
description: IndexGateway is a map to the per pod status of the
index gateway statefulset
type: object
ingester:
additionalProperties:
items:
@ -848,7 +856,7 @@ spec:
type: string
type: array
description: Querier is a map to the per pod status of the querier
statefulset
deployment
type: object
queryFrontend:
additionalProperties:
@ -856,7 +864,7 @@ spec:
type: string
type: array
description: QueryFrontend is a map to the per pod status of the
query frontend deployment.
query frontend deployment
type: object
type: object
conditions:

@ -608,6 +608,13 @@ spec:
type: array
description: Gateway is a map to the per pod status of the lokistack gateway deployment.
type: object
indexGateway:
additionalProperties:
items:
type: string
type: array
description: IndexGateway is a map to the per pod status of the index gateway statefulset
type: object
ingester:
additionalProperties:
items:
@ -620,14 +627,14 @@ spec:
items:
type: string
type: array
description: Querier is a map to the per pod status of the querier statefulset
description: Querier is a map to the per pod status of the querier deployment
type: object
queryFrontend:
additionalProperties:
items:
type: string
type: array
description: QueryFrontend is a map to the per pod status of the query frontend deployment.
description: QueryFrontend is a map to the per pod status of the query frontend deployment
type: object
type: object
conditions:

@ -361,13 +361,13 @@ spec:
path: components.ingester
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:podStatuses
- description: Querier is a map to the per pod status of the querier statefulset
- description: Querier is a map to the per pod status of the querier deployment
displayName: Querier
path: components.querier
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:podStatuses
- description: QueryFrontend is a map to the per pod status of the query frontend
deployment.
deployment
displayName: Query Frontend
path: components.queryFrontend
x-descriptors:
@ -383,6 +383,12 @@ spec:
path: components.gateway
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:podStatuses
- description: IndexGateway is a map to the per pod status of the index gateway
statefulset
displayName: IndexGateway
path: components.indexGateway
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:podStatuses
- description: Conditions of the Loki deployment health.
displayName: Conditions
path: conditions

@ -4,8 +4,8 @@ package k8sfakes
import (
"sync"
"github.com/grafana/loki-operator/internal/external/k8s"
"github.com/go-logr/logr"
"github.com/grafana/loki-operator/internal/external/k8s"
"sigs.k8s.io/controller-runtime/pkg/builder"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/controller"

@ -46,11 +46,16 @@ func SetComponentsStatus(ctx context.Context, k k8s.Client, req ctrl.Request) er
return kverrors.Wrap(err, "failed lookup LokiStack component pods status", "name", manifests.LabelQueryFrontendComponent)
}
s.Status.Components.Ingester, err = appendPodStatus(ctx, k, manifests.LabelIngesterComponent, s.Name, s.Namespace)
s.Status.Components.IndexGateway, err = appendPodStatus(ctx, k, manifests.LabelIndexGatewayComponent, s.Name, s.Namespace)
if err != nil {
return kverrors.Wrap(err, "failed lookup LokiStack component pods status", "name", manifests.LabelIngesterComponent)
}
s.Status.Components.Ingester, err = appendPodStatus(ctx, k, manifests.LabelIngesterComponent, s.Name, s.Namespace)
if err != nil {
return kverrors.Wrap(err, "failed lookup LokiStack component pods status", "name", manifests.LabelIndexGatewayComponent)
}
s.Status.Components.Gateway, err = appendPodStatus(ctx, k, manifests.LabelGatewayComponent, s.Name, s.Namespace)
if err != nil {
return kverrors.Wrap(err, "failed lookup LokiStack component pods status", "name", manifests.LabelGatewayComponent)

Loading…
Cancel
Save