Skip to content

Commit

Permalink
feat(platform): add flag enableMetricsServer for cluster feature
Browse files Browse the repository at this point in the history
Signed-off-by: Feng Kun <[email protected]>
  • Loading branch information
kevinfeng authored and tke-robot committed Sep 4, 2020
1 parent 34a9ea2 commit eae6810
Show file tree
Hide file tree
Showing 7 changed files with 393 additions and 343 deletions.
6 changes: 6 additions & 0 deletions api/openapi/zz_generated.openapi.go

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

2 changes: 2 additions & 0 deletions api/platform/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,8 @@ type ClusterFeature struct {
// For kube-apiserver authorization webhook
// +optional
AuthzWebhookAddr *AuthzWebhookAddr
// +optional
EnableMetricsServer bool
}

type HA struct {
Expand Down
718 changes: 375 additions & 343 deletions api/platform/v1/generated.pb.go

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions api/platform/v1/generated.proto

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

2 changes: 2 additions & 0 deletions api/platform/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,8 @@ type ClusterFeature struct {
// For kube-apiserver authorization webhook
// +optional
AuthzWebhookAddr *AuthzWebhookAddr `json:"authzWebhookAddr,omitempty" protobuf:"bytes,11,opt,name=authzWebhookAddr"`
// +optional
EnableMetricsServer bool `json:"enableMetricsServer,omitempty" protobuf:"bytes,12,opt,name=enableMetricsServer"`
}

type HA struct {
Expand Down
2 changes: 2 additions & 0 deletions api/platform/v1/zz_generated.conversion.go

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

3 changes: 3 additions & 0 deletions pkg/platform/provider/baremetal/cluster/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -1054,6 +1054,9 @@ func (p *Provider) EnsureGPUManager(ctx context.Context, c *v1.Cluster) error {
}

func (p *Provider) EnsureMetricsServer(ctx context.Context, c *v1.Cluster) error {
if !c.Cluster.Spec.Features.EnableMetricsServer {
return nil
}
client, err := c.Clientset()
if err != nil {
return err
Expand Down

0 comments on commit eae6810

Please sign in to comment.