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
7 changes: 4 additions & 3 deletions api/v1alpha1/keepercluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,11 @@ type KeeperReplica struct {
Ready bool `json:"ready"`
// Error indicates that replica has a persistent error causing Pod startup failure.
Error bool `json:"error"`
// Updated indicates that replica Pod is updated to the latest StatefulSet revision.
Updated bool `json:"updated"`
// Mode indicates replica role, during latest reconcile.
// +optional
Mode string `json:"mode"`
// LastUpdate indicates latest status update time.
// +optional
LastUpdate metav1.Time `json:"lastUpdate,omitempty"`
}

// KeeperClusterStatus defines the observed state of KeeperCluster.
Expand All @@ -202,6 +201,8 @@ type KeeperClusterStatus struct {
CurrentRevision string `json:"currentRevision,omitempty"`
// CurrentRevision indicates latest requested KeeperCluster spec revision.
UpdateRevision string `json:"updateRevision,omitempty"`
// ObservedGeneration indicates lastest generation observed by controller.
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
}

// +genclient
Expand Down
3 changes: 1 addition & 2 deletions api/v1alpha1/zz_generated.deepcopy.go

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

14 changes: 10 additions & 4 deletions config/crd/bases/clickhouse.com_keeperclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1653,6 +1653,11 @@ spec:
description: CurrentRevision indicates latest applied KeeperCluster
spec revision.
type: string
observedGeneration:
description: ObservedGeneration indicates lastest generation observed
by controller.
format: int64
type: integer
readyReplicas:
description: ReadyReplicas Total number of replicas ready to server
requests.
Expand All @@ -1665,20 +1670,21 @@ spec:
description: Error indicates that replica has a persistent error
causing Pod startup failure.
type: boolean
lastUpdate:
description: LastUpdate indicates latest status update time.
format: date-time
type: string
mode:
description: Mode indicates replica role, during latest reconcile.
type: string
ready:
description: Ready indicates that replica is ready to accept
incoming connections.
type: boolean
updated:
description: Updated indicates that replica Pod is updated to
the latest StatefulSet revision.
type: boolean
required:
- error
- ready
- updated
type: object
description: Replicas Current replica state by Keeper ID.
type: object
Expand Down
7 changes: 6 additions & 1 deletion config/samples/v1alpha1_keepercluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ metadata:
app.kubernetes.io/managed-by: kustomize
name: test-keeper-cluster
spec:
replicas: 5
replicas: 3
image:
repository: "docker.io/clickhouse/clickhouse-keeper"
tag: latest
loggerConfig:
loggerLevel: warning
storage:
accessModes:
- ReadWriteOncePod
Expand Down
Loading