k8s.io/perf-tests/clusterloader2@v0.0.0-20240304094227-64bdb12da87e/pkg/provider/kcp.go (about) 1 /* 2 Copyright 2020 The Kubernetes Authors. 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 */ 16 17 package provider 18 19 import ( 20 clientset "k8s.io/client-go/kubernetes" 21 prom "k8s.io/perf-tests/clusterloader2/pkg/prometheus/clients" 22 ) 23 24 type KCPProvider struct { 25 features Features 26 } 27 28 func NewKCPProvider(_ map[string]string) Provider { 29 return &KCPProvider{ 30 features: Features{ 31 SupportProbe: false, 32 SupportSSHToMaster: false, 33 SupportImagePreload: false, 34 SupportEnablePrometheusServer: false, 35 SupportGrabMetricsFromKubelets: false, 36 SupportAccessAPIServerPprofEndpoint: false, 37 SupportResourceUsageMetering: true, 38 ShouldScrapeKubeProxy: false, 39 }, 40 } 41 } 42 43 func (p *KCPProvider) Name() string { 44 return KCPName 45 } 46 47 func (p *KCPProvider) Features() *Features { 48 return &p.features 49 } 50 51 func (p *KCPProvider) GetComponentProtocolAndPort(componentName string) (string, int, error) { 52 return getComponentProtocolAndPort(componentName) 53 } 54 55 func (p *KCPProvider) GetConfig() Config { 56 return Config{} 57 } 58 59 func (p *KCPProvider) RunSSHCommand(cmd, host string) (string, string, int, error) { 60 return "", "", 0, nil 61 } 62 63 func (p *KCPProvider) Metadata(client clientset.Interface) (map[string]string, error) { 64 return nil, nil 65 } 66 67 func (p *KCPProvider) GetManagedPrometheusClient() (prom.Client, error) { 68 return nil, ErrNoManagedPrometheus 69 }