Skip to content

Commit f221bec

Browse files
author
Ole Markus With
committed
Add metrics-server addon
1 parent e06a007 commit f221bec

File tree

11 files changed

+514
-0
lines changed

11 files changed

+514
-0
lines changed

k8s/crds/kops.k8s.io_clusters.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2082,6 +2082,16 @@ spec:
20822082
masterPublicName:
20832083
description: MasterPublicName is the external DNS name for the master nodes
20842084
type: string
2085+
metricsServer:
2086+
description: MetricsServerConfig determines the metrics server configuration.
2087+
properties:
2088+
enabled:
2089+
description: 'Enabled enables the metrics server. Default: false'
2090+
type: boolean
2091+
image:
2092+
description: 'Image is the docker container used. Default: the latest supported image for the specified kubernetes version.'
2093+
type: string
2094+
type: object
20852095
networkCIDR:
20862096
description: NetworkCIDR is the CIDR used for the AWS VPC / GCE Network, or otherwise allocated to k8s This is a real CIDR, not the internal k8s network On AWS, it maps to the VPC CIDR. It is not required on GCE.
20872097
type: string

pkg/apis/kops/cluster.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,8 @@ type ClusterSpec struct {
160160

161161
// NodeTerminationHandlerConfig determines the cluster autoscaler configuration.
162162
NodeTerminationHandler *NodeTerminationHandlerConfig `json:"nodeTerminationHandler,omitempty"`
163+
// MetricsServerConfig determines the metrics server configuration.
164+
MetricsServer *MetricsServerConfig `json:"metricsServer,omitempty"`
163165

164166
// Networking configuration
165167
Networking *NetworkingSpec `json:"networking,omitempty"`

pkg/apis/kops/componentconfig.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -801,6 +801,16 @@ type ClusterAutoscalerConfig struct {
801801
Image *string `json:"image,omitempty"`
802802
}
803803

804+
// MetricsServerConfig determines the metrics server configuration.
805+
type MetricsServerConfig struct {
806+
// Enabled enables the metrics server.
807+
// Default: false
808+
Enabled *bool `json:"enabled,omitempty"`
809+
// Image is the docker container used.
810+
// Default: the latest supported image for the specified kubernetes version.
811+
Image *string `json:"image,omitempty"`
812+
}
813+
804814
// HasAdmissionController checks if a specific admission controller is enabled
805815
func (c *KubeAPIServerConfig) HasAdmissionController(name string) bool {
806816
for _, x := range c.AdmissionControl {

pkg/apis/kops/v1alpha2/cluster.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,8 @@ type ClusterSpec struct {
159159

160160
// NodeTerminationHandlerConfig determines the cluster autoscaler configuration.
161161
NodeTerminationHandler *NodeTerminationHandlerConfig `json:"nodeTerminationHandler,omitempty"`
162+
// MetricsServerConfig determines the metrics server configuration.
163+
MetricsServer *MetricsServerConfig `json:"metricsServer,omitempty"`
162164

163165
// Networking configuration
164166
Networking *NetworkingSpec `json:"networking,omitempty"`

pkg/apis/kops/v1alpha2/componentconfig.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -802,6 +802,16 @@ type ClusterAutoscalerConfig struct {
802802
Image *string `json:"image,omitempty"`
803803
}
804804

805+
// MetricsServerConfig determines the metrics server configuration.
806+
type MetricsServerConfig struct {
807+
// Enabled enables the metrics server.
808+
// Default: false
809+
Enabled *bool `json:"enabled,omitempty"`
810+
// Image is the docker container used.
811+
// Default: the latest supported image for the specified kubernetes version.
812+
Image *string `json:"image,omitempty"`
813+
}
814+
805815
// HasAdmissionController checks if a specific admission controller is enabled
806816
func (c *KubeAPIServerConfig) HasAdmissionController(name string) bool {
807817
for _, x := range c.AdmissionControl {

pkg/apis/kops/v1alpha2/zz_generated.conversion.go

Lines changed: 50 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/apis/kops/v1alpha2/zz_generated.deepcopy.go

Lines changed: 31 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/apis/kops/zz_generated.deepcopy.go

Lines changed: 31 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)