Documentation ¶
Index ¶
- Constants
- type KubernetesBackend
- type KubernetesConfigSpec
- type TrackedPod
- func (tp *TrackedPod) AnnotationEquals(key string, value string) bool
- func (tp *TrackedPod) AnnotationExists(key string, def string) bool
- func (tp *TrackedPod) AnnotationGet(key string) string
- func (tp *TrackedPod) AnnotationMatches(key string, pattern string) bool
- func (tp *TrackedPod) AnnotationOrDefault(key string, def string) string
- func (tp *TrackedPod) ConfigEquals(key string, value string) bool
- func (tp *TrackedPod) ConfigExists(key string, def string) bool
- func (tp *TrackedPod) ConfigFile() string
- func (tp *TrackedPod) ConfigGet(key string) string
- func (tp *TrackedPod) ConfigMatches(key string, pattern string) bool
- func (tp *TrackedPod) ConfigOrDefault(key string, def string) string
- func (tc *TrackedPod) EnvEquals(key string, value string) bool
- func (tc *TrackedPod) EnvExists(key string) bool
- func (tc *TrackedPod) EnvGet(key string) string
- func (tc *TrackedPod) EnvMatches(key string, pattern string) bool
- func (tc *TrackedPod) EnvOrDefault(key string, def string) string
- func (tc *TrackedPod) LabelEquals(key string, value string) bool
- func (tc *TrackedPod) LabelExists(key string) bool
- func (tc *TrackedPod) LabelExistsAllOf(labels ...string) bool
- func (tc *TrackedPod) LabelExistsAnyOf(labels ...string) bool
- func (tc *TrackedPod) LabelGet(key string) string
- func (tc *TrackedPod) LabelMatches(key string, pattern string) bool
- func (tc *TrackedPod) LabelOrDefault(key string, def string) string
- func (tp *TrackedPod) TargetIP() string
Constants ¶
View Source
const ( NAME = "kubernetes" LOG_PREFIX = "[kubernetes]" RUN_MODE_UNKNOWN = 0 RUN_MODE_INTERNAL = 1 RUN_MODE_EXTERNAL = 2 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KubernetesBackend ¶
type KubernetesBackend struct {
// contains filtered or unexported fields
}
func NewBackend ¶
func NewBackend() *KubernetesBackend
func (*KubernetesBackend) Clean ¶
func (backend *KubernetesBackend) Clean()
func (*KubernetesBackend) GetRunMode ¶
func (backend *KubernetesBackend) GetRunMode() int
func (*KubernetesBackend) Init ¶
func (backend *KubernetesBackend) Init(spec *backend.BackendConfigSpec)
func (*KubernetesBackend) Name ¶
func (backend *KubernetesBackend) Name() string
func (*KubernetesBackend) Run ¶
func (backend *KubernetesBackend) Run()
func (*KubernetesBackend) Status ¶
func (backend *KubernetesBackend) Status() int
type KubernetesConfigSpec ¶
type KubernetesConfigSpec struct { AutoConfPrefix string `envconfig:"AUTO_CONF_PREFIX",default:"kubernetes_"` NodeNameOverride string `envconfig:"NODE_NAME_OVERRIDE"` TagNamespace bool `envconfig:"TAG_NAMESPACE" default:"true"` TagPodName bool `envconfig:"TAG_POD_NAME" default:"true"` TagLabelsWhitelistStr string `envconfig:"TAG_LABELS_WHITELIST"` TagLabelsBlacklistStr string `envconfig:"TAG_LABELS_BLACKLIST"` TagLabelsWhitelist []string `ignored:"true"` TagLabelsBlacklist []string `ignored:"true"` KubeConfig string `envconfig:"KUBE_CONFIG"` }
func LoadConfig ¶
func LoadConfig() *KubernetesConfigSpec
type TrackedPod ¶
type TrackedPod struct { UID types.UID Name string Pod *corev1.Pod PodIP string Config map[string]string Tags map[string]string Env map[string]string // contains filtered or unexported fields }
TrackedPod is used to maintain state about already processed containers and to be able to remove their configurations easily
func NewTrackedPod ¶
func NewTrackedPod(backend *KubernetesBackend, pod *corev1.Pod) *TrackedPod
Create new config and populate it from environment
func (*TrackedPod) AnnotationEquals ¶
func (tp *TrackedPod) AnnotationEquals(key string, value string) bool
func (*TrackedPod) AnnotationExists ¶
func (tp *TrackedPod) AnnotationExists(key string, def string) bool
func (*TrackedPod) AnnotationGet ¶
func (tp *TrackedPod) AnnotationGet(key string) string
func (*TrackedPod) AnnotationMatches ¶
func (tp *TrackedPod) AnnotationMatches(key string, pattern string) bool
func (*TrackedPod) AnnotationOrDefault ¶
func (tp *TrackedPod) AnnotationOrDefault(key string, def string) string
func (*TrackedPod) ConfigEquals ¶
func (tp *TrackedPod) ConfigEquals(key string, value string) bool
func (*TrackedPod) ConfigExists ¶
func (tp *TrackedPod) ConfigExists(key string, def string) bool
func (*TrackedPod) ConfigFile ¶
func (tp *TrackedPod) ConfigFile() string
func (*TrackedPod) ConfigGet ¶
func (tp *TrackedPod) ConfigGet(key string) string
func (*TrackedPod) ConfigMatches ¶
func (tp *TrackedPod) ConfigMatches(key string, pattern string) bool
func (*TrackedPod) ConfigOrDefault ¶
func (tp *TrackedPod) ConfigOrDefault(key string, def string) string
func (*TrackedPod) EnvExists ¶
func (tc *TrackedPod) EnvExists(key string) bool
func (*TrackedPod) EnvGet ¶
func (tc *TrackedPod) EnvGet(key string) string
func (*TrackedPod) EnvMatches ¶
func (tc *TrackedPod) EnvMatches(key string, pattern string) bool
func (*TrackedPod) EnvOrDefault ¶
func (tc *TrackedPod) EnvOrDefault(key string, def string) string
func (*TrackedPod) LabelEquals ¶
func (tc *TrackedPod) LabelEquals(key string, value string) bool
func (*TrackedPod) LabelExists ¶
func (tc *TrackedPod) LabelExists(key string) bool
func (*TrackedPod) LabelExistsAllOf ¶
func (tc *TrackedPod) LabelExistsAllOf(labels ...string) bool
func (*TrackedPod) LabelExistsAnyOf ¶
func (tc *TrackedPod) LabelExistsAnyOf(labels ...string) bool
func (*TrackedPod) LabelGet ¶
func (tc *TrackedPod) LabelGet(key string) string
func (*TrackedPod) LabelMatches ¶
func (tc *TrackedPod) LabelMatches(key string, pattern string) bool
func (*TrackedPod) LabelOrDefault ¶
func (tc *TrackedPod) LabelOrDefault(key string, def string) string
func (*TrackedPod) TargetIP ¶
func (tp *TrackedPod) TargetIP() string
Click to show internal directories.
Click to hide internal directories.