Documentation
¶
Index ¶
- Constants
- Variables
- func AddConfigmapVolumes(podSpec *v1.PodSpec, configMaps internalobs.ConfigMaps) (results []string)
- func AddSecretVolumes(podSpec *v1.PodSpec, secrets vectorhelpers.Secrets) []string
- func AddSecurityContextTo(container *v1.Container) *v1.Container
- func AddServiceAccountProjectedVolume(podSpec *v1.PodSpec, inputs internalobs.Inputs, outputs internalobs.Outputs, ...) bool
- func AddVolumeMounts(collector *v1.Container, names []string, path func(string) string)
- func AddWebIdentityTokenEnvVars(collector *v1.Container, region, roleARN, tokenPath string)
- func ReconcileTrustedCABundleConfigMap(er record.EventRecorder, k8sClient client.Client, namespace, name string, ...) error
- func Remove(k8sClient client.Client, namespace, name string) (err error)
- func RemoveDeployment(k8sClient client.Client, namespace, name string) (err error)
- func RemoveOrphanedInputServices(client kubernetes.Client, reader kubernetes.Reader, namespace string, ...) error
- func WaitForTrustedCAToBePopulated(k8sClient client.Client, namespace, name string, ...) *corev1.ConfigMap
- type CommonLabelVisitor
- type Factory
- func (f *Factory) CollectorResourceRequirements() v1.ResourceRequirements
- func (f *Factory) NewCollectorContainer(inputs internalobs.Inputs, secretVolumes, configmapVolumes []string, ...) *v1.Container
- func (f *Factory) NewDaemonSet(namespace, name string, trustedCABundle *v1.ConfigMap, ...) *apps.DaemonSet
- func (f *Factory) NewDeployment(namespace, name string, trustedCABundle *v1.ConfigMap, ...) *apps.Deployment
- func (f *Factory) NewPodSpec(trustedCABundle *v1.ConfigMap, spec obs.ClusterLogForwarderSpec, ...) *v1.PodSpec
- func (f *Factory) NodeSelector() map[string]string
- func (f *Factory) ReconcileCollectorConfig(er record.EventRecorder, k8sClient client.Client, reader client.Reader, ...) error
- func (f *Factory) ReconcileDaemonset(er record.EventRecorder, k8sClient client.Client, namespace string, ...) error
- func (f *Factory) ReconcileDeployment(er record.EventRecorder, k8sClient client.Client, namespace string, ...) error
- func (f *Factory) ReconcileInputServices(er record.EventRecorder, k8sClient kubernetes.Client, ...) error
- func (f *Factory) Tolerations() []v1.Toleration
- type PodLabelVisitor
- type Visitor
Constants ¶
const ( MetricsPort = int32(24231) MetricsPortName = "metrics" )
Variables ¶
var ( DefaultPollInterval = 5 * time.Second DefaultTimeOut = 30 * time.Second )
Functions ¶
func AddConfigmapVolumes ¶
func AddConfigmapVolumes(podSpec *v1.PodSpec, configMaps internalobs.ConfigMaps) (results []string)
AddConfigmapVolumes adds configmap volumes to the pod spec for the unique set of configmaps and returns the list of the named volumes where the names are of the format 'config-<ConfigMap.Name>'
func AddSecretVolumes ¶
func AddSecretVolumes(podSpec *v1.PodSpec, secrets vectorhelpers.Secrets) []string
AddSecretVolumes adds secret volumes to the pod spec for the unique set of output secrets and returns the list of the names
func AddServiceAccountProjectedVolume ¶
func AddServiceAccountProjectedVolume(podSpec *v1.PodSpec, inputs internalobs.Inputs, outputs internalobs.Outputs, audience string) bool
AddServiceAccountProjectedVolume adds ServiceAccountTokenProjection to the podspec and returns the named sa volume
func AddVolumeMounts ¶
AddVolumeMounts to the collector container
func AddWebIdentityTokenEnvVars ¶
AddWebIdentityTokenEnvVars Appends web identity env vars based on attributes of the secret and forwarder spec
func ReconcileTrustedCABundleConfigMap ¶
func ReconcileTrustedCABundleConfigMap(er record.EventRecorder, k8sClient client.Client, namespace, name string, owner metav1.OwnerReference) error
ReconcileTrustedCABundleConfigMap creates or returns an existing Trusted CA Bundle ConfigMap. By setting label "config.openshift.io/inject-trusted-cabundle: true", the cert is automatically filled/updated.
func RemoveDeployment ¶
func RemoveOrphanedInputServices ¶
func RemoveOrphanedInputServices(client kubernetes.Client, reader kubernetes.Reader, namespace string, spec obs.ClusterLogForwarderSpec, resourceNames factory.ForwarderResourceNames, currOwner metav1.OwnerReference, removeAllServices bool) error
RemoveOrphanedInputServices removes receiver input services not owned by the given owner
Types ¶
type CommonLabelVisitor ¶
type Factory ¶
type Factory struct { ConfigHash string CollectorSpec obs.CollectorSpec ClusterID string ImageName string Visit Visitor Secrets map[string]*v1.Secret ConfigMaps map[string]*v1.ConfigMap ForwarderSpec obs.ClusterLogForwarderSpec CommonLabelInitializer CommonLabelVisitor PodLabelVisitor PodLabelVisitor ResourceNames *factory.ForwarderResourceNames LogLevel string // contains filtered or unexported fields }
func (*Factory) CollectorResourceRequirements ¶
func (f *Factory) CollectorResourceRequirements() v1.ResourceRequirements
CollectorResourceRequirements returns the resource requirements for a given collector implementation or it's default if none are specified
func (*Factory) NewCollectorContainer ¶
func (f *Factory) NewCollectorContainer(inputs internalobs.Inputs, secretVolumes, configmapVolumes []string, addServiceAccountVolume bool, clusterID string) *v1.Container
NewCollectorContainer is a constructor for creating the collector container spec. Note the secretNames are assumed to be a unique list
func (*Factory) NewDaemonSet ¶
func (*Factory) NewDeployment ¶
func (f *Factory) NewDeployment(namespace, name string, trustedCABundle *v1.ConfigMap, tlsProfileSpec configv1.TLSProfileSpec) *apps.Deployment
func (*Factory) NewPodSpec ¶
func (*Factory) NodeSelector ¶
func (*Factory) ReconcileCollectorConfig ¶
func (f *Factory) ReconcileCollectorConfig(er record.EventRecorder, k8sClient client.Client, reader client.Reader, namespace, collectorConfig string, owner metav1.OwnerReference) error
ReconcileCollectorConfig reconciles a collector config specifically for the collector defined by the factory
func (*Factory) ReconcileDaemonset ¶
func (f *Factory) ReconcileDaemonset(er record.EventRecorder, k8sClient client.Client, namespace string, trustedCABundle *corev1.ConfigMap, owner metav1.OwnerReference) error
ReconcileDaemonset reconciles a daemonset specifically for the collector defined by the factory
func (*Factory) ReconcileDeployment ¶
func (f *Factory) ReconcileDeployment(er record.EventRecorder, k8sClient client.Client, namespace string, trustedCABundle *corev1.ConfigMap, owner metav1.OwnerReference) error
ReconcileDeployment reconciles a deployment specifically for the collector defined by the factory
func (*Factory) ReconcileInputServices ¶
func (f *Factory) ReconcileInputServices(er record.EventRecorder, k8sClient kubernetes.Client, k8sReader kubernetes.Reader, namespace, selectorComponent string, owner metav1.OwnerReference, visitors func(o runtime.Object)) error
ReconcileInputServices evaluates receiver inputs and deploys services for them
func (*Factory) Tolerations ¶
func (f *Factory) Tolerations() []v1.Toleration