k8shandler

package
v0.0.0-...-43fc741 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConfigMap

func NewConfigMap(configmapName string, namespace string, data map[string]string) *corev1.ConfigMap

NewConfigMap stubs an instance of Configmap

func NewCronJob

func NewCronJob(cronjobName, namespace, loggingComponent, component string, cronjobSpec batch.CronJobSpec) *batch.CronJob

NewCronJob stubs an instance of a cronjob

func NewDaemonSet

func NewDaemonSet(daemonsetName, namespace, loggingComponent, component, impl string, podSpec core.PodSpec) *apps.DaemonSet

NewDaemonSet stubs an instance of a daemonset

func NewDeployment

func NewDeployment(deploymentName string, namespace string, loggingComponent string, component string, podSpec core.PodSpec) *apps.Deployment

NewDeployment stubs an instance of a Deployment

func NewPodSpec

func NewPodSpec(serviceAccountName string, containers []core.Container, volumes []core.Volume, nodeSelector map[string]string, tolerations []core.Toleration) core.PodSpec

NewPodSpec is a constructor to instaniate a new PodSpec. Notice that all Aggregated Logging relevant pods are (force-)allocated to linux nodes, see https://jira.coreos.com/browse/LOG-411

func NewSecret

func NewSecret(secretName string, namespace string, data map[string][]byte) *core.Secret

NewSecret stubs an instance of a secret

func Reconcile

func Reconcile(cl *logging.ClusterLogging, forwarder *logging.ClusterLogForwarder, requestClient client.Client, reader client.Reader, r record.EventRecorder, clusterVersion, clusterID string, resourceNames *factory.ForwarderResourceNames) (err error)

Types

type ClusterLoggingRequest

type ClusterLoggingRequest struct {
	Client client.Client
	Reader client.Reader

	ClusterVersion string
	//ClusterID is the unique identifier of the cluster in which the operator is deployed
	ClusterID string

	Cluster       *logging.ClusterLogging
	EventRecorder record.EventRecorder

	// Forwarder is a logforwarder instance
	Forwarder *logging.ClusterLogForwarder

	// OutputSecrets are retrieved during validation and used for generation.
	OutputSecrets map[string]*corev1.Secret

	// Custom resource names for custom CLF
	ResourceNames *factory.ForwarderResourceNames

	// Owner of collector resources
	ResourceOwner metav1.OwnerReference

	// Vector log level
	// Default is `warn`: https://issues.redhat.com/browse/LOG-3435
	LogLevel string
	// contains filtered or unexported fields
}

func NewClusterLoggingRequest

func NewClusterLoggingRequest(cl *logging.ClusterLogging, forwarder *logging.ClusterLogForwarder, requestClient client.Client, reader client.Reader, r record.EventRecorder, clusterVersion, clusterID string, resourceNames *factory.ForwarderResourceNames) ClusterLoggingRequest

func (*ClusterLoggingRequest) CreateOrUpdateCollection

func (clusterRequest *ClusterLoggingRequest) CreateOrUpdateCollection() (err error)

CreateOrUpdateCollection component of the cluster

func (*ClusterLoggingRequest) Delete

func (clusterRequest *ClusterLoggingRequest) Delete(object client.Object) error

func (*ClusterLoggingRequest) Get

func (clusterRequest *ClusterLoggingRequest) Get(objectName string, object client.Object) error

func (*ClusterLoggingRequest) GetClusterResource

func (clusterRequest *ClusterLoggingRequest) GetClusterResource(objectName string, object client.Object) error

func (*ClusterLoggingRequest) GetCronJobList

func (clusterRequest *ClusterLoggingRequest) GetCronJobList(selector map[string]string) (*batch.CronJobList, error)

GetCronJobList retrieves the list of cronjobs with a given selector in namespace

func (*ClusterLoggingRequest) GetDaemonSetList

func (clusterRequest *ClusterLoggingRequest) GetDaemonSetList(selector map[string]string) (*apps.DaemonSetList, error)

GetDaemonSetList lists DS in namespace with given selector

func (*ClusterLoggingRequest) GetDeploymentList

func (clusterRequest *ClusterLoggingRequest) GetDeploymentList(selector map[string]string) (*apps.DeploymentList, error)

GetDeploymentList returns a list for a give namespace and selector

func (*ClusterLoggingRequest) GetPodList

func (clusterRequest *ClusterLoggingRequest) GetPodList(selector map[string]string) (*core.PodList, error)

GetPodList for a given selector and namespace

func (*ClusterLoggingRequest) GetReplicaSetList

func (clusterRequest *ClusterLoggingRequest) GetReplicaSetList(selector map[string]string) (*apps.ReplicaSetList, error)

func (*ClusterLoggingRequest) GetSecret

func (clusterRequest *ClusterLoggingRequest) GetSecret(secretName string) (*core.Secret, error)

func (*ClusterLoggingRequest) GetServiceList

func (clusterRequest *ClusterLoggingRequest) GetServiceList(key, val, namespace string) (*core.ServiceList, error)

GetServiceList returns a list of services based on a key/value label and namespace

func (*ClusterLoggingRequest) IncludesManagedStorage

func (clusterRequest *ClusterLoggingRequest) IncludesManagedStorage() bool

func (*ClusterLoggingRequest) IsLegacyDeployment

func (clusterRequest *ClusterLoggingRequest) IsLegacyDeployment() bool

func (*ClusterLoggingRequest) List

func (clusterRequest *ClusterLoggingRequest) List(selector map[string]string, object client.ObjectList) error

func (*ClusterLoggingRequest) RemoveConfigMap

func (clusterRequest *ClusterLoggingRequest) RemoveConfigMap(configmapName string) error

RemoveConfigMap with a given name and namespace

func (*ClusterLoggingRequest) RemoveCronJob

func (clusterRequest *ClusterLoggingRequest) RemoveCronJob(cronjobName string) error

RemoveCronJob with given name and namespace

func (*ClusterLoggingRequest) RemoveDaemonset

func (clusterRequest *ClusterLoggingRequest) RemoveDaemonset(daemonsetName string) error

RemoveDaemonset with given name and namespace

func (*ClusterLoggingRequest) RemoveDeployment

func (clusterRequest *ClusterLoggingRequest) RemoveDeployment(deploymentName string) error

RemoveDeployment of given name and namespace

func (*ClusterLoggingRequest) RemoveInputService

func (clusterRequest *ClusterLoggingRequest) RemoveInputService(serviceName string) error

RemoveInputService with given name and namespace

func (*ClusterLoggingRequest) RemoveInputServices

func (clusterRequest *ClusterLoggingRequest) RemoveInputServices(currOwner []metav1.OwnerReference, removeAllServices bool) error

func (*ClusterLoggingRequest) RemoveSecret

func (clusterRequest *ClusterLoggingRequest) RemoveSecret(secretName string) error

RemoveSecret with the given name in namespace

func (*ClusterLoggingRequest) RemoveService

func (clusterRequest *ClusterLoggingRequest) RemoveService(serviceName string) error

RemoveService with given name and namespace

func (*ClusterLoggingRequest) RemoveServiceAccount

func (clusterRequest *ClusterLoggingRequest) RemoveServiceAccount() error

RemoveServiceAccount of given name and namespace

func (*ClusterLoggingRequest) SetOutputSecrets

func (clusterRequest *ClusterLoggingRequest) SetOutputSecrets()

func (*ClusterLoggingRequest) Update

func (clusterRequest *ClusterLoggingRequest) Update(object client.Object) (err error)

Update the runtime Object or return error

func (*ClusterLoggingRequest) UpdateCondition

func (clusterRequest *ClusterLoggingRequest) UpdateCondition(t logging.ConditionType, message string, reason logging.ConditionReason, status corev1.ConditionStatus) error

func (*ClusterLoggingRequest) UpdateStatus

func (clusterRequest *ClusterLoggingRequest) UpdateStatus(object client.Object) (err error)

UpdateStatus modifies the status sub-resource or returns an error.

Jump to

Keyboard shortcuts

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