Skip to content
Open
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
11 changes: 11 additions & 0 deletions pkg/kwokctl/components/kueue.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ func BuildKueueComponent(conf BuildKueueComponentConfig) (component internalvers
var volumes []internalversion.Volume
var ports []internalversion.Port
var envs []internalversion.Env
var metric *internalversion.ComponentMetric

envs = append(envs,
internalversion.Env{
Expand Down Expand Up @@ -154,6 +155,15 @@ func BuildKueueComponent(conf BuildKueueComponentConfig) (component internalvers
args = append(args, "--zap-log-level="+log.ToZapLevel(conf.Verbosity))
}

metric = &internalversion.ComponentMetric{
Scheme: schemeHTTPS,
Host: conf.ProjectName + "-" + consts.ComponentKueue + ":8443",
Path: metricsPath,
CertPath: pkiAdminCertPath,
KeyPath: pkiAdminKeyPath,
InsecureSkipVerify: true,
}

component = internalversion.Component{
Name: consts.ComponentKueue,
Version: conf.Version.String(),
Expand All @@ -168,6 +178,7 @@ func BuildKueueComponent(conf BuildKueueComponentConfig) (component internalvers
Ports: ports,
WorkDir: conf.Workdir,
Envs: envs,
Metric: metric,
}

if len(conf.RawManifests) != 0 {
Expand Down
1 change: 1 addition & 0 deletions test/e2e/kwokctl/docker/metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ func TestMetrics(t *testing.T) {
consts.ComponentKwokController,
consts.ComponentPrometheus,
consts.ComponentMetricsServer,
consts.ComponentKueue,
).Feature()
testEnv.Test(t, f0)
}
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,19 @@ scrape_configs:
static_configs:
- targets:
- 127.0.0.1:9090
- enable_http2: true
follow_redirects: true
honor_timestamps: true
job_name: kueue
metrics_path: /metrics
scheme: https
static_configs:
- targets:
- kwok-<CLUSTER_NAME>-kueue:8443
tls_config:
cert_file: /etc/kubernetes/pki/admin.crt
insecure_skip_verify: true
key_file: /etc/kubernetes/pki/admin.key
EOF
cat <<EOF ><ROOT_DIR>/workdir/clusters/<CLUSTER_NAME>/kubeconfig.yaml
apiVersion: v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,19 @@ scrape_configs:
static_configs:
- targets:
- 127.0.0.1:9090
- enable_http2: true
follow_redirects: true
honor_timestamps: true
job_name: kueue
metrics_path: /metrics
scheme: https
static_configs:
- targets:
- kwok-<CLUSTER_NAME>-kueue:8443
tls_config:
cert_file: /etc/kubernetes/pki/admin.crt
insecure_skip_verify: true
key_file: /etc/kubernetes/pki/admin.key
EOF
cat <<EOF ><ROOT_DIR>/workdir/clusters/<CLUSTER_NAME>/kubeconfig.yaml
apiVersion: v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,19 @@ scrape_configs:
static_configs:
- targets:
- 127.0.0.1:9090
- enable_http2: true
follow_redirects: true
honor_timestamps: true
job_name: kueue
metrics_path: /metrics
scheme: https
static_configs:
- targets:
- kwok-<CLUSTER_NAME>-kueue:8443
tls_config:
cert_file: /etc/kubernetes/pki/admin.crt
insecure_skip_verify: true
key_file: /etc/kubernetes/pki/admin.key
EOF
cat <<EOF ><ROOT_DIR>/workdir/clusters/<CLUSTER_NAME>/kubeconfig.yaml
apiVersion: v1
Expand Down
1 change: 1 addition & 0 deletions test/e2e/kwokctl/nerdctl/metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ func TestMetrics(t *testing.T) {
consts.ComponentKwokController,
consts.ComponentPrometheus,
consts.ComponentMetricsServer,
consts.ComponentKueue,
).Feature()
testEnv.Test(t, f0)
}
1 change: 1 addition & 0 deletions test/e2e/kwokctl/podman/metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ func TestMetrics(t *testing.T) {
consts.ComponentKwokController,
consts.ComponentPrometheus,
consts.ComponentMetricsServer,
consts.ComponentKueue,
).Feature()
testEnv.Test(t, f0)
}
Loading