internal

package
v3.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 34 Imported by: 0

Documentation

Index

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

This section is empty.

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
	KubeSecretTypes       []string
	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) Listen

func (exporter *Exporter) Listen() error

Listen : Listen for requests

func (*Exporter) ListenAndServe

func (exporter *Exporter) ListenAndServe() error

ListenAndServe : Convenience function to start exporter

func (*Exporter) Serve

func (exporter *Exporter) Serve() error

Serve : Actually reply to requests

func (*Exporter) Shutdown

func (exporter *Exporter) Shutdown() error

Shutdown : Properly tear down server

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL