v1

package
v0.0.0-...-31fc70c Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package v1 contains API Schema definitions for the logstash v1 API group +kubebuilder:object:generate=true +groupName=logstash.k8s.webcenter.fr

Index

Constants

View Source
const (
	LogstashAnnotationKey = "logstash.k8s.webcenter.fr"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "logstash.k8s.webcenter.fr", Version: "v1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

func SetupLogstashIndexer

func SetupLogstashIndexer(k8sManager manager.Manager) (err error)

SetupLogstashIndexer setup indexer for Logstash

Types

type Logstash

type Logstash struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   LogstashSpec   `json:"spec,omitempty"`
	Status LogstashStatus `json:"status,omitempty"`
}

Logstash is the Schema for the logstashes API +operator-sdk:csv:customresourcedefinitions:resources={{Ingress,networking.k8s.io/v1},{ConfigMap,v1},{Service,v1},{Secret,v1},{StatefulSet,apps/v1},{NetworkPolicy,networking.k8s.io/v1},{PodDisruptionBudget,policy/v1}} +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase",description="Phase" +kubebuilder:printcolumn:name="Error",type="boolean",JSONPath=".status.isOnError",description="Is on error" +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status",description="health" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"

func (*Logstash) DeepCopy

func (in *Logstash) DeepCopy() *Logstash

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Logstash.

func (*Logstash) DeepCopyInto

func (in *Logstash) DeepCopyInto(out *Logstash)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Logstash) DeepCopyObject

func (in *Logstash) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Logstash) GetStatus

func (h *Logstash) GetStatus() object.MultiPhaseObjectStatus

GetStatus implement the object.MultiPhaseObject

func (*Logstash) IsPdb

func (h *Logstash) IsPdb() bool

IsPdb return true if PDB is enabled

func (*Logstash) IsPersistence

func (h *Logstash) IsPersistence() bool

IsPersistence return true if persistence is enabled

type LogstashDeploymentSpec

type LogstashDeploymentSpec struct {
	shared.Deployment `json:",inline"`

	// AntiAffinity permit to set anti affinity policy
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	// +optional
	AntiAffinity *shared.DeploymentAntiAffinitySpec `json:"antiAffinity,omitempty"`

	// PodDisruptionBudget is the pod disruption budget policy
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	// +optional
	PodDisruptionBudgetSpec *policyv1.PodDisruptionBudgetSpec `json:"podDisruptionBudget,omitempty"`

	// Node permit to set extra option on Node process
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	// +optional
	Jvm string `json:"jvm,omitempty"`

	// InitContainerResources permit to set resources on init containers
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	// +optional
	InitContainerResources *corev1.ResourceRequirements `json:"initContainerResources,omitempty"`

	// AdditionalVolumes permit to use additionnal volumes
	// Default is empty
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	// +optional
	AdditionalVolumes []shared.DeploymentVolumeSpec `json:"additionalVolumes,omitempty"`

	// Persistence is the spec to persist data
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	// +optional
	Persistence *shared.DeploymentPersistenceSpec `json:"persistence,omitempty"`

	// Ports is the list of container port to affect on logstash container
	// It can be usefull to expose beats input
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	// +optional
	Ports []corev1.ContainerPort `json:"ports,omitempty"`
}

func (*LogstashDeploymentSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LogstashDeploymentSpec.

func (*LogstashDeploymentSpec) DeepCopyInto

func (in *LogstashDeploymentSpec) DeepCopyInto(out *LogstashDeploymentSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type LogstashList

type LogstashList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Logstash `json:"items"`
}

LogstashList contains a list of Logstash

func (*LogstashList) DeepCopy

func (in *LogstashList) DeepCopy() *LogstashList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LogstashList.

func (*LogstashList) DeepCopyInto

func (in *LogstashList) DeepCopyInto(out *LogstashList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*LogstashList) DeepCopyObject

func (in *LogstashList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type LogstashPkiSpec

type LogstashPkiSpec struct {

	// Enabled permit to enabled the internal PKI
	// Default to true
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	// +optional
	// +kubebuilder:default=true
	Enabled *bool `json:"enabled,omitempty"`

	// ValidityDays is the number of days that certificates are valid
	// Default to 365
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	// +optional
	// +kubebuilder:default=365
	ValidityDays *int `json:"validityDays,omitempty"`

	// RenewalDays is the number of days before certificate expire to become effective renewal
	// Default to 30
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	// +optional
	// +kubebuilder:default=30
	RenewalDays *int `json:"renewalDays,omitempty"`

	// KeySize is the key size when generate privates keys
	// Default to 2048
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	// +optional
	// +kubebuilder:default=2048
	KeySize *int `json:"keySize,omitempty"`

	// Tls is the list of TLS certificates to manage
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	// +optional
	Tls map[string]LogstashTlsSpec `json:"tls,omitempty"`
}

func (*LogstashPkiSpec) DeepCopy

func (in *LogstashPkiSpec) DeepCopy() *LogstashPkiSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LogstashPkiSpec.

func (*LogstashPkiSpec) DeepCopyInto

func (in *LogstashPkiSpec) DeepCopyInto(out *LogstashPkiSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (LogstashPkiSpec) IsEnabled

func (h LogstashPkiSpec) IsEnabled() bool

isEnabled return true if PKI is enabled

type LogstashSpec

type LogstashSpec struct {
	shared.ImageSpec `json:",inline"`

	// ElasticsearchRef is the Elasticsearch ref to connect on.
	// It will expose CA certificate and Elasticsearch URL as encironment variable to use it in logstash setting
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	// +optional
	ElasticsearchRef shared.ElasticsearchRef `json:"elasticsearchRef,omitempty"`

	// Version is the logstash version to use
	// Default is use the latest
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	// +optional
	// +kubebuilder:default=latest
	Version string `json:"version,omitempty"`

	// PluginsList is the list of additionnal plugin to install on each logstash instance
	// Default is empty
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	// +optional
	PluginsList []string `json:"pluginsList,omitempty"`

	// Config is the Logstash config
	// The key is the file stored on logstash/config
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	// +optional
	Config map[string]string `json:"config,omitempty"`

	// Pipeline is the pipeline specification
	// The key is the file stored on logstash/pipelines
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	// +optional
	Pipeline map[string]string `json:"pipeline,omitempty"`

	// Patterns is the patterns specification used by grok
	// The key is the file stored on logstash/patterns
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	// +optional
	Pattern map[string]string `json:"pattern,omitempty"`

	// KeystoreSecretRef is the secret that store the security settings
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	// +optional
	KeystoreSecretRef *corev1.LocalObjectReference `json:"keystoreSecretRef,omitempty"`

	// Deployment permit to set the deployment settings
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	// +optional
	Deployment LogstashDeploymentSpec `json:"deployment,omitempty"`

	// Monitoring permit to monitor current cluster
	// Default, it not monitor cluster
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	// +optional
	Monitoring shared.MonitoringSpec `json:"monitoring,omitempty"`

	// Ingresses permit to declare some ingresses
	// The name is decorated with cluster name and so on
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	// +optional
	Ingresses []shared.Ingress `json:"ingresses,omitempty"`

	// Services permit to declare some services
	// The name is decorated with cluster name and so on
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	// +optional
	Services []shared.Service `json:"services,omitempty"`

	// Pki permit to manage certificates you can use for Logstash inputs
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	// +optional
	Pki LogstashPkiSpec `json:"pki,omitempty"`
}

LogstashSpec defines the desired state of Logstash +k8s:openapi-gen=true

func (*LogstashSpec) DeepCopy

func (in *LogstashSpec) DeepCopy() *LogstashSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LogstashSpec.

func (*LogstashSpec) DeepCopyInto

func (in *LogstashSpec) DeepCopyInto(out *LogstashSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type LogstashStatus

type LogstashStatus struct {
	apis.BasicMultiPhaseObjectStatus `json:",inline"`

	// CertSecretName is the secret name that store certs generated for inputs
	// +operator-sdk:csv:customresourcedefinitions:type=status
	CertSecretName string `json:"certSecret,omitempty"`
}

LogstashStatus defines the observed state of Logstash

func (*LogstashStatus) DeepCopy

func (in *LogstashStatus) DeepCopy() *LogstashStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LogstashStatus.

func (*LogstashStatus) DeepCopyInto

func (in *LogstashStatus) DeepCopyInto(out *LogstashStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type LogstashTlsSpec

type LogstashTlsSpec struct {
	shared.TlsSelfSignedCertificateSpec `json:",inline"`

	// Consumer it the service that will consume certificate
	// It support filebeat, logstash and custom
	// Default to custom
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	// +optional
	// +kubebuilder:default=custom
	Consumer string `json:"consumer,omitempty"`
}

func (*LogstashTlsSpec) DeepCopy

func (in *LogstashTlsSpec) DeepCopy() *LogstashTlsSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LogstashTlsSpec.

func (*LogstashTlsSpec) DeepCopyInto

func (in *LogstashTlsSpec) DeepCopyInto(out *LogstashTlsSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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