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
4 changes: 4 additions & 0 deletions controlplane/api/v1beta1/rke2controlplane_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,10 @@ type RKE2ServerConfig struct {
//+optional
CloudProviderConfigMap *corev1.ObjectReference `json:"cloudProviderConfigMap,omitempty"`

// SupervisorMetrics enables the RKE2 supervisor metrics endpoint on port 9345.
//+optional
SupervisorMetrics bool `json:"supervisorMetrics,omitempty"`

// EmbeddedRegistry enables the embedded registry.
//+optional
EmbeddedRegistry bool `json:"embeddedRegistry,omitempty"`
Expand Down
2 changes: 2 additions & 0 deletions controlplane/api/v1beta1/zz_generated.conversion.go

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

4 changes: 4 additions & 0 deletions controlplane/api/v1beta2/rke2controlplane_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,10 @@ type RKE2ServerConfig struct {
//+optional
CloudProviderConfigMap *corev1.ObjectReference `json:"cloudProviderConfigMap,omitempty"`

// SupervisorMetrics enables the RKE2 supervisor metrics endpoint on port 9345.
//+optional
SupervisorMetrics bool `json:"supervisorMetrics,omitempty"`

// EmbeddedRegistry enables the embedded registry.
//+optional
EmbeddedRegistry bool `json:"embeddedRegistry,omitempty"`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1395,6 +1395,10 @@ spec:
description: 'ServiceNodePortRange is the port range to reserve
for services with NodePort visibility (default: "30000-32767").'
type: string
supervisorMetrics:
description: SupervisorMetrics enables the RKE2 supervisor metrics
endpoint on port 9345.
type: boolean
tlsSan:
description: TLSSan Add additional hostname or IP as a Subject
Alternative Name in the TLS cert.
Expand Down Expand Up @@ -2988,6 +2992,10 @@ spec:
description: 'ServiceNodePortRange is the port range to reserve
for services with NodePort visibility (default: "30000-32767").'
type: string
supervisorMetrics:
description: SupervisorMetrics enables the RKE2 supervisor metrics
endpoint on port 9345.
type: boolean
tlsSan:
description: TLSSan Add additional hostname or IP as a Subject
Alternative Name in the TLS cert.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1445,6 +1445,10 @@ spec:
reserve for services with NodePort visibility (default:
"30000-32767").'
type: string
supervisorMetrics:
description: SupervisorMetrics enables the RKE2 supervisor
metrics endpoint on port 9345.
type: boolean
tlsSan:
description: TLSSan Add additional hostname or IP as a
Subject Alternative Name in the TLS cert.
Expand Down Expand Up @@ -3092,6 +3096,10 @@ spec:
reserve for services with NodePort visibility (default:
"30000-32767").'
type: string
supervisorMetrics:
description: SupervisorMetrics enables the RKE2 supervisor
metrics endpoint on port 9345.
type: boolean
tlsSan:
description: TLSSan Add additional hostname or IP as a
Subject Alternative Name in the TLS cert.
Expand Down
2 changes: 2 additions & 0 deletions pkg/rke2/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ type ServerConfig struct {
ServiceNodePortRange string `yaml:"service-node-port-range,omitempty"`
TLSSan []string `yaml:"tls-san,omitempty"`
EmbeddedRegistry bool `yaml:"embedded-registry,omitempty"`
SupervisorMetrics bool `yaml:"supervisor-metrics,omitempty"`
DatastoreEndpoint string `yaml:"datastore-endpoint,omitempty"`
DatastoreCAFile string `yaml:"datastore-cafile,omitempty"`
DatastoreCertFile string `yaml:"datastore-certfile,omitempty"`
Expand Down Expand Up @@ -400,6 +401,7 @@ func newRKE2ServerConfig(opts ServerConfigOpts) (*ServerConfig, []bootstrapv1.Fi
}

rke2ServerConfig.EmbeddedRegistry = opts.ServerConfig.EmbeddedRegistry
rke2ServerConfig.SupervisorMetrics = opts.ServerConfig.SupervisorMetrics

if opts.ServerConfig.ExternalDatastoreSecret != nil {
externalDatastoreSecret := &corev1.Secret{}
Expand Down
4 changes: 3 additions & 1 deletion pkg/rke2/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ var _ = Describe("RKE2ServerConfig", func() {
ExtraEnv: map[string]string{"testenv": "testenv"},
ExtraMounts: map[string]string{"testmount": "testmount"},
},
EmbeddedRegistry: true,
SupervisorMetrics: true,
EmbeddedRegistry: true,
ExternalDatastoreSecret: &corev1.ObjectReference{
Name: "test",
Namespace: "test",
Expand Down Expand Up @@ -233,6 +234,7 @@ var _ = Describe("RKE2ServerConfig", func() {
Expect(rke2ServerConfig.CloudControllerManagerExtraMounts).To(Equal(componentMapToSlice(extraMount, serverConfig.CloudControllerManager.ExtraMounts)))
Expect(rke2ServerConfig.CloudControllerManagerExtraEnv).To(Equal(componentMapToSlice(extraEnv, serverConfig.CloudControllerManager.ExtraEnv)))
Expect(rke2ServerConfig.Token).To(Equal(opts.Token))
Expect(rke2ServerConfig.SupervisorMetrics).To(BeTrue())
Expect(rke2ServerConfig.EmbeddedRegistry).To(BeTrue())
Expect(rke2ServerConfig.DatastoreEndpoint).To(Equal("test_endpoint"))
Expect(rke2ServerConfig.DatastoreCAFile).To(Equal("/etc/rancher/rke2/datastore-ca.crt"))
Expand Down