observability

package
v0.0.0-...-fbbe22e Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func ConfigmapsForTLS

func ConfigmapsForTLS(t obsv1.TLSSpec) []string

ConfigmapsForTLS returns the unique set of configmap names for a TLS spec

func DeployAsDeployment

func DeployAsDeployment(forwarder obs.ClusterLogForwarder) bool

DeployAsDeployment evaluates the spec to determine if the collector will be deployed as a deployment. Collector is not a daemonset if the only input source is an HTTP receiver Enabled through an annotation

func FilterMap

func FilterMap(spec obs.ClusterLogForwarderSpec) map[string]*obs.FilterSpec

FilterMap returns a map of filter names to FilterSpec.

func IsValidSpec

func IsValidSpec(forwarder obs.ClusterLogForwarder) bool

IsValidSpec evaluates the status conditions to determine if the spec is valid

func MaxRecordsPerSecond

func MaxRecordsPerSecond(input obs.InputSpec) (int64, bool)

func NewCondition

func NewCondition(conditionType string, status metav1.ConditionStatus, reason, message string) metav1.Condition

func NewConditionFromPrefix

func NewConditionFromPrefix(prefix, name string, conditionMet bool, reason, message string) metav1.Condition

func NewSecretReference

func NewSecretReference(keyName, secretName string) *obs.SecretReference

NewSecretReference returns a SecretReference with the given key name and secret

func OutputTypeUnknown

func OutputTypeUnknown(t obsv1.OutputType) error

func PruneConditions

func PruneConditions(conditions *[]metav1.Condition, spec NameList, conditionTypePrefix string)

PruneConditions keeps only those conditions that match names from the spec

func RemoveConditionByType

func RemoveConditionByType(conditions *[]metav1.Condition, conditionType string)

RemoveCondition removes a condition by type

func SecretReferences

func SecretReferences(o obsv1.OutputSpec) []*obsv1.SecretReference

SecretReferences returns a list of the keys associated with an output. It is possible for a list entry to be nil if it was not specified for the output

func SecretReferencesAsValueReferences

func SecretReferencesAsValueReferences(o obsv1.OutputSpec) (configs []*obsv1.ValueReference)

func SecretsForTLS

func SecretsForTLS(t obsv1.TLSSpec) []string

SecretsForTLS returns the unique set of secret names for a TLS spec

func SetCondition

func SetCondition(conditions *[]metav1.Condition, newCond metav1.Condition) bool

SetCondition adds (or updates) the set of conditions with the given condition. It returns a boolean value indicating whether the set condition is new or was a change to the existing condition with the same type.

func Threshold

func Threshold(ls *obs.LimitSpec) (int64, bool)

func ValueReferences

func ValueReferences(t obsv1.TLSSpec) []*obsv1.ValueReference

ValueReferences returns a slice of ValueReferences, converting SecretReferences as necessary

Types

type ConfigMaps

type ConfigMaps map[string]*corev1.ConfigMap

func (ConfigMaps) Names

func (c ConfigMaps) Names() (names []string)

type Filters

type Filters []obs.FilterSpec

func (Filters) Names

func (filters Filters) Names() (names []string)

Names returns a slice of filter names

type Inputs

type Inputs []obs.InputSpec

func (Inputs) ConfigmapNames

func (inputs Inputs) ConfigmapNames() []string

ConfigmapNames returns a unique set of unordered configmap names

func (Inputs) HasAnyAuditSource

func (inputs Inputs) HasAnyAuditSource() bool

func (Inputs) HasAuditSource

func (inputs Inputs) HasAuditSource(logSource obs.AuditSource) bool

func (Inputs) HasContainerSource

func (inputs Inputs) HasContainerSource() bool

func (Inputs) HasJournalSource

func (inputs Inputs) HasJournalSource() bool

func (Inputs) HasReceiverSource

func (inputs Inputs) HasReceiverSource() bool

func (Inputs) InputTypes

func (inputs Inputs) InputTypes() []obs.InputType

InputTypes returns a unique set of input types

func (Inputs) Map

func (inputs Inputs) Map() map[string]obs.InputSpec

Map returns a map of input name to input spec

func (Inputs) Names

func (inputs Inputs) Names() (names []string)

Names returns a slice of input names

func (Inputs) SecretNames

func (inputs Inputs) SecretNames() []string

SecretNames returns a unique set of unordered secret names

type NameList

type NameList interface {
	Names() []string
}

NameList provides a list of names for any resource implementing Names

type Outputs

type Outputs []obsv1.OutputSpec

func (Outputs) ConfigmapNames

func (outputs Outputs) ConfigmapNames() []string

ConfigmapNames returns a unique set of unordered configmap names

func (Outputs) Map

func (outputs Outputs) Map() map[string]obsv1.OutputSpec

Map returns a map of output name to output spec

func (Outputs) Names

func (outputs Outputs) Names() (names []string)

Names returns a slice of output names

func (Outputs) NeedServiceAccountToken

func (outputs Outputs) NeedServiceAccountToken() bool

NeedServiceAccountToken returns true if any output needs to be configured to use the token associated with the service account

func (Outputs) SecretNames

func (outputs Outputs) SecretNames() []string

SecretNames returns a unique set of unordered secret names

type Pipelines

type Pipelines []obs.PipelineSpec

func (Pipelines) Map

func (pipeline Pipelines) Map() map[string]obs.PipelineSpec

Map returns a map of pipeline names to pipeline spec

func (Pipelines) Names

func (pipeline Pipelines) Names() (names []string)

Names returns a slice of pipeline names

type Secrets

type Secrets map[string]*corev1.Secret

Secrets is a map of secrets

func (Secrets) AsString

func (s Secrets) AsString(key *obs.SecretReference) string

AsString returns the value of the given secret with key if it exists or empty

func (Secrets) AsStringFromBearerToken

func (s Secrets) AsStringFromBearerToken(key *obs.BearerToken) string

AsStringFromBearerToken returns the value of the BearerToken if it exists or empty

func (Secrets) Hash64a

func (s Secrets) Hash64a() string

Hash64a returns an FNV-1a representation of the secrets

func (Secrets) Names

func (s Secrets) Names() (names []string)

func (Secrets) Path

func (s Secrets) Path(key *obs.SecretReference) string

Path returns the path to the given secret key if it exists or empty

func (Secrets) Value

func (s Secrets) Value(key *obs.SecretReference) []byte

Value returns the content of the given secret with key if it exists or nil

type Tuning

type Tuning struct {
	obs.BaseOutputTuningSpec
	Compression string
}

func NewTuning

func NewTuning(spec obs.OutputSpec) Tuning

Jump to

Keyboard shortcuts

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