add component status to cluster status (#2160)

This commit is contained in:
zryfish
2020-06-05 14:51:05 +08:00
committed by GitHub
parent 98b34a7760
commit bb4d3fee7a
163 changed files with 3431 additions and 1889 deletions

View File

@@ -128,6 +128,11 @@ type ClusterStatus struct {
// Region is the name of the region in which all of the nodes in the cluster exist. e.g. 'us-east1'.
// +optional
Region *string `json:"region,omitempty"`
// Configz is status of components enabled in the member cluster. This is synchronized with member cluster
// every amount of time, like 5 minutes.
// +optional
Configz map[string]bool `json:"configz,omitempty"`
}
// +genclient

View File

@@ -1,7 +1,7 @@
// +build !ignore_autogenerated
/*
Copyright 2019 The KubeSphere authors.
Copyright 2020 The KubeSphere Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -136,6 +136,13 @@ func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus) {
*out = new(string)
**out = **in
}
if in.Configz != nil {
in, out := &in.Configz, &out.Configz
*out = make(map[string]bool, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterStatus.