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
- Variables
- func SetupLogstashIndexer(k8sManager manager.Manager) (err error)
- func SetupLogstashWebhookWithManager(logger *logrus.Entry) controller.WebhookRegister
- type Logstash
- type LogstashDeploymentSpec
- type LogstashList
- type LogstashPkiSpec
- type LogstashSpec
- type LogstashStatus
- type LogstashTlsSpec
Constants ¶
const (
LogstashAnnotationKey = "logstash.k8s.webcenter.fr"
)
Variables ¶
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 ¶
SetupLogstashIndexer setup indexer for Logstash
func SetupLogstashWebhookWithManager ¶
func SetupLogstashWebhookWithManager(logger *logrus.Entry) controller.WebhookRegister
SetupWebhookWithManager will setup the manager to manage the webhooks
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},{ServiceAccount,v1},{RoleBinding,rbac.authorization.k8s.io/v1},{Route,route.openshift.io/v1}} +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase",description="Phase" +kubebuilder:printcolumn:name="Certs",type="string",JSONPath=".status.certSecret",description="secret ref that store certs" +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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Logstash.
func (*Logstash) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Logstash) DeepCopyObject ¶
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) IsPersistence ¶
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 ¶
func (in *LogstashDeploymentSpec) DeepCopy() *LogstashDeploymentSpec
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) HasBeatCertificate ¶
func (h LogstashPkiSpec) HasBeatCertificate() bool
HasBeatCertificate return true if PKI use to generate beat certificates
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
// +operator-sdk:csv:customresourcedefinitions:type=spec
// +optional
// +kubebuilder:pruning:PreserveUnknownFields
Config *apis.MapAny `json:"config,omitempty"`
// ExtraConfigs is extra config files store on config directory
// The key is the file name and the value is the contend file
// +operator-sdk:csv:customresourcedefinitions:type=spec
// +optional
ExtraConfigs map[string]string `json:"extraConfigs,omitempty"`
// Pipeline is the pipeline specification
// The key is the file stored on logstash/pipelines. The contend is the logstash rules as string
// +operator-sdk:csv:customresourcedefinitions:type=spec
// +optional
// +kubebuilder:pruning:PreserveUnknownFields
Pipelines map[string]string `json:"pipelines,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
Patterns map[string]string `json:"patterns,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"`
// Routes permit to declare some routes
// The name is decorated with cluster name and so on
// +operator-sdk:csv:customresourcedefinitions:type=spec
// +kubebuilder:pruning:PreserveUnknownFields
// +optional
Routes []shared.Route `json:"routes,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 {
multiphase.DefaultMultiPhaseObjectStatus `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.