Skip to content
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
6 changes: 3 additions & 3 deletions Gopkg.lock

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

2 changes: 1 addition & 1 deletion Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ required = [

[[constraint]]
name = "github.com/openshift/elasticsearch-operator"
branch = "master-post-release"
branch = "master"

[prune]
go-tests = true
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export IMAGE_TAG
MAIN_PKG=cmd/manager/main.go
export CSV_FILE=$(CURPATH)/manifests/latest
export NAMESPACE?=openshift-logging
export EO_CSV_FILE=$(CURPATH)/vendor/github.com/openshift/elasticsearch-operator/controller-manifests/elasticsearch-operator.v4.1.0.clusterserviceversion.yaml
export EO_CSV_FILE=$(CURPATH)/vendor/github.com/openshift/elasticsearch-operator/manifests/latest

PKGS=$(shell go list ./... | grep -v -E '/vendor/|/test|/examples')

Expand Down
84 changes: 58 additions & 26 deletions pkg/apis/logging/v1/clusterlogging_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,9 @@ type ClusterLoggingStatus struct {
LogStore LogStoreStatus `json:"logStore"`
Collection CollectionStatus `json:"collection"`
Curation CurationStatus `json:"curation"`
Message string `json:"message"`
Conditions []ClusterCondition `json:"clusterConditions,omitempty"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// This is the struct that will contain information pertinent to Log visualization (Kibana)
type VisualizationSpec struct {
Type VisualizationType `json:"type"`
Expand Down Expand Up @@ -100,6 +98,7 @@ type CuratorSpec struct {
Schedule string `json:"schedule"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// ClusterLogging is the Schema for the clusterloggings API
// +k8s:openapi-gen=true
type ClusterLogging struct {
Expand All @@ -115,24 +114,29 @@ type VisualizationStatus struct {
}

type KibanaStatus struct {
Replicas int32 `json:"replicas"`
Deployment string `json:"deployment"`
ReplicaSets []string `json:"replicaSets"`
Pods PodStateMap `json:"pods"`
Replicas int32 `json:"replicas"`
Deployment string `json:"deployment"`
ReplicaSets []string `json:"replicaSets"`
Pods PodStateMap `json:"pods"`
Conditions map[string][]ClusterCondition `json:"clusterCondition,omitempty"`
}

type LogStoreStatus struct {
ElasticsearchStatus []ElasticsearchStatus `json:"elasticsearchStatus,omitempty"`
}

type ElasticsearchStatus struct {
ClusterName string `json:"clusterName"`
NodeCount int32 `json:"nodeCount"`
ReplicaSets []string `json:"replicaSets"`
Deployments []string `json:"deployments"`
StatefulSets []string `json:"statefulSets"`
ClusterHealth string `json:"clusterHealth"`
Pods map[ElasticsearchRoleType]PodStateMap `json:"pods"`
ClusterName string `json:"clusterName"`
NodeCount int32 `json:"nodeCount"`
ReplicaSets []string `json:"replicaSets,omitempty"`
Deployments []string `json:"deployments,omitempty"`
StatefulSets []string `json:"statefulSets,omitempty"`
ClusterHealth string `json:"clusterHealth,omitempty"`
Cluster elasticsearch.ClusterHealth `json:"cluster"`
Pods map[ElasticsearchRoleType]PodStateMap `json:"pods"`
ShardAllocationEnabled elasticsearch.ShardAllocationState `json:shardAllocationEnabled`
ClusterConditions []elasticsearch.ClusterCondition `json:"clusterConditions,omitempty"`
NodeConditions map[string][]elasticsearch.ClusterCondition `json:"nodeConditions,omitempty"`
}

type CollectionStatus struct {
Expand All @@ -148,21 +152,24 @@ type EventCollectionStatus struct {
}

type FluentdCollectorStatus struct {
DaemonSet string `json:"daemonSet"`
Nodes map[string]string `json:"nodes"`
Pods PodStateMap `json:"pods"`
DaemonSet string `json:"daemonSet"`
Nodes map[string]string `json:"nodes"`
Pods PodStateMap `json:"pods"`
Conditions map[string][]ClusterCondition `json:"clusterCondition,omitempty"`
}

type RsyslogCollectorStatus struct {
DaemonSet string `json:"daemonSet"`
Nodes map[string]string `json:"Nodes"`
Pods PodStateMap `json:"pods"`
DaemonSet string `json:"daemonSet"`
Nodes map[string]string `json:"Nodes"`
Pods PodStateMap `json:"pods"`
Conditions map[string][]ClusterCondition `json:"clusterCondition,omitempty"`
}

type FluentdNormalizerStatus struct {
Replicas int32 `json:"replicas"`
ReplicaSets []string `json:"replicaSets"`
Pods PodStateMap `json:"pods"`
Replicas int32 `json:"replicas"`
ReplicaSets []string `json:"replicaSets"`
Pods PodStateMap `json:"pods"`
Conditions map[string][]ClusterCondition `json:"clusterCondition,omitempty"`
}

type NormalizerStatus struct {
Expand All @@ -174,9 +181,10 @@ type CurationStatus struct {
}

type CuratorStatus struct {
CronJob string `json:"cronJobs"`
Schedule string `json:"schedules"`
Suspended bool `json:"suspended"`
CronJob string `json:"cronJobs"`
Schedule string `json:"schedules"`
Suspended bool `json:"suspended"`
Conditions map[string][]ClusterCondition `json:"clusterCondition,omitempty"`
}

type PodStateMap map[PodStateType][]string
Expand Down Expand Up @@ -236,6 +244,30 @@ const (
ManagementStateUnmanaged ManagementState = "Unmanaged"
)

// ConditionStatus contains details for the current condition of this elasticsearch cluster.
// Status: the status of the condition.
// LastTransitionTime: Last time the condition transitioned from one status to another.
// Reason: Unique, one-word, CamelCase reason for the condition's last transition.
// Message: Human-readable message indicating details about last transition.
type ClusterCondition struct {
Type ClusterConditionType `json:"type"`
Status v1.ConditionStatus `json:"status"`
LastTransitionTime metav1.Time `json:"lastTransitionTime"`
Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"`
Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"`
}

// ClusterConditionType is a valid value for ClusterCondition.Type
type ClusterConditionType string

const (
IncorrectCRName ClusterConditionType = "IncorrectCRName"
ContainerWaiting ClusterConditionType = "ContainerWaiting"
ContainerTerminated ClusterConditionType = "ContainerTerminated"
Unschedulable ClusterConditionType = "Unschedulable"
NodeStorage ClusterConditionType = "NodeStorage"
)

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// ClusterLoggingList contains a list of ClusterLogging
Expand Down
Loading