Documentation ¶
Index ¶
- Variables
- func MatchingSecretKeys(types []KubeSecretType, secret *v1.Secret) iter.Seq[string]
- type Exporter
- func (exporter *Exporter) ConnectToKubernetesCluster(path string, rateLimiter flowcontrol.RateLimiter) error
- func (exporter *Exporter) DiscoverCertificates()
- func (exporter *Exporter) Listen() error
- func (exporter *Exporter) ListenAndServe() error
- func (exporter *Exporter) Serve() error
- func (exporter *Exporter) Shutdown() error
- type KubeSecretType
- type YAMLCertFormat
- type YAMLCertRef
Constants ¶
This section is empty.
Variables ¶
View Source
var BuildDateTime = ""
View Source
var DefaultYamlPaths = []YAMLCertRef{ { BasePathMatchExpr: "$.clusters", CertMatchSubExpr: "$.cluster[\"certificate-authority-data\"]", IDMatchSubExpr: "$.name", Format: YAMLCertFormatBase64, }, { BasePathMatchExpr: "$.clusters", CertMatchSubExpr: "$.cluster[\"certificate-authority\"]", IDMatchSubExpr: "$.name", Format: YAMLCertFormatFile, }, { BasePathMatchExpr: "$.users", CertMatchSubExpr: "$.user[\"client-certificate-data\"]", IDMatchSubExpr: "$.name", Format: YAMLCertFormatBase64, }, { BasePathMatchExpr: "$.users", CertMatchSubExpr: "$.user[\"client-certificate\"]", IDMatchSubExpr: "$.name", Format: YAMLCertFormatFile, }, }
DefaultYamlPaths : Pre-written paths for some k8s config files
View Source
var Revision = ""
View Source
var Version = "0.0.0"
Version and build informations set at link time
Functions ¶
func MatchingSecretKeys ¶ added in v3.18.0
Types ¶
type Exporter ¶
type Exporter struct { ListenAddress string SystemdSocket bool ConfigFile string Files []string Directories []string YAMLs []string YAMLPaths []YAMLCertRef TrimPathComponents int MaxCacheDuration time.Duration ExposeRelativeMetrics bool ExposeErrorMetrics bool ExposeLabels []string ConfigMapKeys []string KubeSecretTypes []KubeSecretType KubeIncludeNamespaces []string KubeExcludeNamespaces []string KubeIncludeLabels []string KubeExcludeLabels []string // contains filtered or unexported fields }
Exporter : Configuration (from command-line)
func (*Exporter) ConnectToKubernetesCluster ¶
func (exporter *Exporter) ConnectToKubernetesCluster(path string, rateLimiter flowcontrol.RateLimiter) error
ConnectToKubernetesCluster : Try connect to a cluster from inside if path is empty, otherwise try loading the kubeconfig at path "path"
func (*Exporter) DiscoverCertificates ¶
func (exporter *Exporter) DiscoverCertificates()
DiscoverCertificates : Parse all certs in a dry run with verbose logging
func (*Exporter) ListenAndServe ¶
ListenAndServe : Convenience function to start exporter
type KubeSecretType ¶ added in v3.18.0
func ParseSecretType ¶ added in v3.18.0
func ParseSecretType(s string) (KubeSecretType, error)
func (*KubeSecretType) Matches ¶ added in v3.18.0
func (kst *KubeSecretType) Matches(secretType, key string) bool
type YAMLCertFormat ¶
type YAMLCertFormat int
YAMLCertFormat : Type of cert encoding in YAML files
const ( YAMLCertFormatFile YAMLCertFormat = iota YAMLCertFormatBase64 = iota )
YAMLCertFormat : Impl
type YAMLCertRef ¶
type YAMLCertRef struct { BasePathMatchExpr string CertMatchSubExpr string IDMatchSubExpr string Format YAMLCertFormat }
YAMLCertRef : Contains information to access certificates in yaml files
Click to show internal directories.
Click to hide internal directories.