Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPodResourceUsage ¶
func GetPodResourceUsage(pc promv1.API, obj metav1.ObjectMeta) core.ResourceList
Types ¶
type BasicAuth ¶
type BasicAuth struct { Username string `yaml:"username" json:"username"` Password string `yaml:"password,omitempty" json:"password,omitempty"` PasswordFile string `yaml:"password_file,omitempty" json:"password_file,omitempty"` }
BasicAuth contains basic HTTP authentication credentials.
type ChangeStats ¶
type ClientBuilder ¶
type ClientBuilder struct {
// contains filtered or unexported fields
}
func NewBuilder ¶
func NewBuilder(mgr manager.Manager, flags *Config) (*ClientBuilder, error)
func (*ClientBuilder) GetPrometheusClient ¶
func (r *ClientBuilder) GetPrometheusClient() (promv1.API, error)
func (*ClientBuilder) Reconcile ¶
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.8.3/pkg/reconcile
func (*ClientBuilder) Setup ¶
func (r *ClientBuilder) Setup() error
type Config ¶
type Config struct { // The address where metrics will be sent Addr string // The HTTP basic authentication credentials for the targets. BasicAuth BasicAuth `yaml:"basic_auth,omitempty" json:"basic_auth,omitempty"` // The bearer token for the targets. Deprecated in favour of // Authorization.Credentials. BearerToken string `yaml:"bearer_token,omitempty" json:"bearer_token,omitempty"` // The bearer token file for the targets. Deprecated in favour of // Authorization.CredentialsFile. BearerTokenFile string `yaml:"bearer_token_file,omitempty" json:"bearer_token_file,omitempty"` // HTTP proxy server to use to connect to the targets. ProxyURL string `yaml:"proxy_url,omitempty" json:"proxy_url,omitempty"` // TLSConfig to use to connect to the targets. TLSConfig prom_config.TLSConfig `yaml:"tls_config,omitempty" json:"tls_config,omitempty"` }
func NewPrometheusConfig ¶
func NewPrometheusConfig() *Config
func ToPrometheusConfig ¶
func ToPrometheusConfig(cfg *rest.Config, ref appcatalog.ServiceReference) (*Config, error)
func (*Config) AddGoFlags ¶
func (*Config) ToHTTPClientConfig ¶
func (p *Config) ToHTTPClientConfig() (*prom_config.HTTPClientConfig, error)
Click to show internal directories.
Click to hide internal directories.