v1

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package v1 contains API Schema definitions for the lobster.io v1 API group +kubebuilder:object:generate=true +groupName=lobster.io

Index

Constants

View Source
const (
	PartitionAny = -1

	OAuthTypeUnencodedCredential = "UnencodedCredential"
	OAuthTypeAuthenzPrincipal    = "AuthenzPrincipal"
)
View Source
const (
	StatusInitInitializing = "initializing"
	StatusInitSucceeded    = "succeeded"
	StatusInitFailed       = "failed"

	LogExportRules = "logExportRules"
	LogMetricRules = "logMetricRules"
)
View Source
const (
	MinBucketInterval = 5 * time.Second
	MaxBucketInterval = time.Hour
)
View Source
const (
	ErrorEmptyField = "this field must not be empty"
)
View Source
const MaxS3Tags = 10

Variables

View Source
var (
	// GroupVersion is group version used to register these objects.
	GroupVersion = schema.GroupVersion{Group: "lobster.io", 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

This section is empty.

Types

type BasicBucket

type BasicBucket struct {
	// Address to export logs
	Destination string `json:"destination,omitempty"`
	// Deprecated; Root directory to store logs within external storage
	RootPath string `json:"rootPath,omitempty"`
	// Deprecated; An option(default `2006-01`) that sets the name of the sub-directory following `{Root path}` to a time-based layout
	TimeLayoutOfSubDirectory string `json:"timeLayoutOfSubDirectory,omitempty" default:"2006-01"`
	// Provide an option to convert '+' to '%2B' to address issues in certain web environments where '+' is misinterpreted
	ShouldEncodeFileName bool `json:"shouldEncodeFileName,omitempty"`
	// Path constructed from log metadata for exporting logs
	PathTemplate string `json:"pathTemplate,omitempty"`
}

func (*BasicBucket) DeepCopy

func (in *BasicBucket) DeepCopy() *BasicBucket

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

func (*BasicBucket) DeepCopyInto

func (in *BasicBucket) DeepCopyInto(out *BasicBucket)

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

func (BasicBucket) Validate

func (b BasicBucket) Validate() ValidationErrors

type Filter

type Filter struct {
	// Filter logs only for specific Namespace
	Namespace string `json:"namespace,omitempty"`
	// Filter logs only for specific Clusters
	Clusters []string `json:"clusters,omitempty"`
	// Filter logs only for specific Pod labels
	Labels []map[string]string `json:"labels,omitempty"`
	// Filter logs only for specific ReplicaSets/StatefulSets
	SetNames []string `json:"setNames,omitempty"`
	// Filter logs only for specific Pods
	Pods []string `json:"pods,omitempty"`
	// Filter logs only for specific Containers
	Containers []string `json:"containers,omitempty"`
	// Filter logs only for specific Sources
	Sources []Source `json:"sources,omitempty"`
	// Filter only logs that match the re2 expression(https://github.com/google/re2/wiki/Syntax)
	FilterIncludeExpr string `json:"include,omitempty"`
	// Filter only logs that do not match the re2 expression(https://github.com/google/re2/wiki/Syntax)
	FilterExcludeExpr string `json:"exclude,omitempty"`
}

func (*Filter) DeepCopy

func (in *Filter) DeepCopy() *Filter

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

func (*Filter) DeepCopyInto

func (in *Filter) DeepCopyInto(out *Filter)

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

func (Filter) Validate

func (f Filter) Validate() ValidationErrors

type Kafka added in v1.0.3

type Kafka struct {
	// Target kafka broker servers to send logs
	Brokers []string `json:"brokers,omitempty"`
	// TLS configuration
	TLS TLS `json:"tls,omitempty"`
	// SASL configuration
	SASL SASL `json:"sasl,omitempty"`
	// An identifier to distinguish request; default `lobster`
	ClientId string `json:"clientId,omitempty"`
	// Target topic to which logs will be exported (required)
	Topic string `json:"topic"`
	// Target partition to which logs will be exported (optional)
	Partition int32 `json:"partition,omitempty"`
	// Target key to which logs will be exported (optional)
	Key string `json:"key,omitempty"`
}

func (*Kafka) DeepCopy added in v1.0.3

func (in *Kafka) DeepCopy() *Kafka

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

func (*Kafka) DeepCopyInto added in v1.0.3

func (in *Kafka) DeepCopyInto(out *Kafka)

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

func (Kafka) Validate added in v1.0.3

func (k Kafka) Validate() ValidationErrors

type LobsterSink

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

	Spec   LobsterSinkSpec   `json:"spec,omitempty"`
	Status LobsterSinkStatus `json:"status,omitempty"`
}

LobsterSink is the Schema for the lobstersinks API.

func (*LobsterSink) DeepCopy

func (in *LobsterSink) DeepCopy() *LobsterSink

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

func (*LobsterSink) DeepCopyInto

func (in *LobsterSink) DeepCopyInto(out *LobsterSink)

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

func (*LobsterSink) DeepCopyObject

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

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

type LobsterSinkList

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

LobsterSinkList contains a list of LobsterSink.

func (*LobsterSinkList) DeepCopy

func (in *LobsterSinkList) DeepCopy() *LobsterSinkList

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

func (*LobsterSinkList) DeepCopyInto

func (in *LobsterSinkList) DeepCopyInto(out *LobsterSinkList)

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

func (*LobsterSinkList) DeepCopyObject

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

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

type LobsterSinkSpec

type LobsterSinkSpec struct {
	// Type that distinguishes logMetricRules and logExportRules
	SinkType string `json:"type,omitempty"`
	// Description of this custom resource
	Description string `json:"description,omitempty"`
	// Rules for generating log metrics
	LogMetricRules []LogMetricRule `json:"logMetricRules,omitempty"`
	// Rules for exporting logs
	LogExportRules []LogExportRule `json:"logExportRules,omitempty"`
	Limit          int             `json:"limit,omitempty"`
	TimeZone       string          `json:"timezone,omitempty"`
}

LobsterSinkSpec defines the desired state of LobsterSink.

func (*LobsterSinkSpec) DeepCopy

func (in *LobsterSinkSpec) DeepCopy() *LobsterSinkSpec

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

func (*LobsterSinkSpec) DeepCopyInto

func (in *LobsterSinkSpec) DeepCopyInto(out *LobsterSinkSpec)

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

type LobsterSinkStatus

type LobsterSinkStatus struct {
	Init string `json:"init,omitempty"`
}

LobsterSinkStatus defines the observed state of LobsterSink.

func (*LobsterSinkStatus) DeepCopy

func (in *LobsterSinkStatus) DeepCopy() *LobsterSinkStatus

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

func (*LobsterSinkStatus) DeepCopyInto

func (in *LobsterSinkStatus) DeepCopyInto(out *LobsterSinkStatus)

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

type LogExportRule

type LogExportRule struct {
	// Rule name
	Name string `json:"name,omitempty"`
	// Description of this rule
	Description string `json:"description,omitempty"`
	// Settings required to export logs to basic bucket
	BasicBucket *BasicBucket `json:"basicBucket,omitempty"`
	// Settings required to export logs to S3 bucket
	S3Bucket *S3Bucket `json:"s3Bucket,omitempty"`
	// Settings required to export logs to Kafka
	Kafka *Kafka `json:"kafka,omitempty"`
	// Generate metrics from logs by specifying the target or log content
	Filter Filter `json:"filter,omitempty"`
	// Interval to export logs
	Interval metav1.Duration `json:"interval,omitempty" swaggertype:"string" example:"time duration(e.g. 1m)"`
}

func (*LogExportRule) DeepCopy

func (in *LogExportRule) DeepCopy() *LogExportRule

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

func (*LogExportRule) DeepCopyInto

func (in *LogExportRule) DeepCopyInto(out *LogExportRule)

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

func (LogExportRule) GetFilter

func (r LogExportRule) GetFilter() Filter

func (LogExportRule) GetName

func (r LogExportRule) GetName() string

func (LogExportRule) GetNamespace

func (r LogExportRule) GetNamespace() string

func (LogExportRule) Validate

func (r LogExportRule) Validate() ValidationErrors

type LogMetricRule

type LogMetricRule struct {
	// Rule name
	Name string `json:"name,omitempty"`
	// Description of this rule
	Description string `json:"description,omitempty"`
	// Generate metrics from logs by specifying the target or log content
	Filter Filter `json:"filter,omitempty"`
}

func (*LogMetricRule) DeepCopy

func (in *LogMetricRule) DeepCopy() *LogMetricRule

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

func (*LogMetricRule) DeepCopyInto

func (in *LogMetricRule) DeepCopyInto(out *LogMetricRule)

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

func (LogMetricRule) GetFilter

func (r LogMetricRule) GetFilter() Filter

func (LogMetricRule) GetName

func (r LogMetricRule) GetName() string

func (LogMetricRule) GetNamespace

func (r LogMetricRule) GetNamespace() string

func (LogMetricRule) Validate

func (r LogMetricRule) Validate() ValidationErrors

type OAuthType added in v1.0.4

type OAuthType string

type S3Bucket

type S3Bucket struct {
	// S3 Address to export logs
	Destination string `json:"destination,omitempty"`
	// Deprecated; Root directory to store logs within external storage
	RootPath string `json:"rootPath,omitempty"`
	// Deprecated; An option(default `2006-01`) that sets the name of the sub-directory following `{Root path}` to a time-based layout
	TimeLayoutOfSubDirectory string `json:"timeLayoutOfSubDirectory,omitempty" default:"2006-01"`
	// S3 bucket name
	BucketName string `json:"bucketName,omitempty"`
	// S3 region
	Region string `json:"region,omitempty"`
	// S3 bucket access key
	AccessKey string `json:"accessKey,omitempty"`
	// S3 bucket secret key
	SecretKey string `json:"secretKey,omitempty"`
	// Tags for objects to be stored
	Tags Tags `json:"tags,omitempty"`
	// Provide an option to convert '+' to '%2B' to address issues in certain web environments where '+' is misinterpreted
	ShouldEncodeFileName bool `json:"shouldEncodeFileName,omitempty"`
	// Path constructed from log metadata for exporting logs
	PathTemplate string `json:"pathTemplate,omitempty"`
}

func (*S3Bucket) DeepCopy

func (in *S3Bucket) DeepCopy() *S3Bucket

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

func (*S3Bucket) DeepCopyInto

func (in *S3Bucket) DeepCopyInto(out *S3Bucket)

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

func (S3Bucket) Validate

func (s S3Bucket) Validate() ValidationErrors

type SASL added in v1.0.3

type SASL struct {
	// Whether or not to use SASL authentication
	Enable bool `json:"enable,omitempty"`
	// Enabled SASL mechanism
	Mechanism string `json:"mechanism,omitempty"`
	// SASL Protocol Version
	Version int16 `json:"version,omitempty"`
	// Kafka SASL handshake
	Handshake bool `json:"handshake,omitempty"`

	// SASL/PLAIN or SASL/SCRAM authentication
	User string `json:"user,omitempty"`
	// Password for SASL/PLAIN authentication
	Password string `json:"password,omitempty"`

	// Deprecated; OAuth access token
	AccessToken string `json:"accessToken,omitempty"`
	// Application's ID
	ClientID string `json:"clientId,omitempty"`
	// Application's secret
	ClientSecret string `json:"clientSecret,omitempty"`
	// TokenURL server endpoint to obtain the access token
	TokenURL string `json:"tokenUrl,omitempty"`
	// Scopes used to specify permission
	Scopes []string `json:"scopes,omitempty"`
	// Type for reflecting authentication server's specific requirements
	OAuthType OAuthType `json:"oAuthType,omitempty"`
}

func (*SASL) DeepCopy added in v1.0.3

func (in *SASL) DeepCopy() *SASL

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

func (*SASL) DeepCopyInto added in v1.0.3

func (in *SASL) DeepCopyInto(out *SASL)

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

type Source

type Source struct {
	Type string `json:"type,omitempty"`
	Path string `json:"path,omitempty"`
}

func (*Source) DeepCopy

func (in *Source) DeepCopy() *Source

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

func (*Source) DeepCopyInto

func (in *Source) DeepCopyInto(out *Source)

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

type TLS added in v1.0.3

type TLS struct {
	// Whether or not to use TLS
	Enable bool `json:"enable,omitempty"`
	// Whether or not to skip verification of CA certificate in client
	InsecureSkipVerify bool `json:"insecureSkipVerify,omitempty"`
	// CA certificate for TLS
	CaCertificate string `json:"caCertificate,omitempty"`
}

func (*TLS) DeepCopy added in v1.0.3

func (in *TLS) DeepCopy() *TLS

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

func (*TLS) DeepCopyInto added in v1.0.3

func (in *TLS) DeepCopyInto(out *TLS)

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

type Tags

type Tags map[string]string

func (Tags) DeepCopy

func (in Tags) DeepCopy() Tags

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

func (Tags) DeepCopyInto

func (in Tags) DeepCopyInto(out *Tags)

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

func (Tags) String

func (t Tags) String() string

The tag-set must be encoded as URL Query parameters.

type ValidationError added in v1.0.4

type ValidationError struct {
	Field   string `json:"field,omitempty"`
	Message string `json:"message,omitempty"`
}

func NewValidationError added in v1.0.4

func NewValidationError(field, message string) ValidationError

func (*ValidationError) DeepCopy added in v1.0.4

func (in *ValidationError) DeepCopy() *ValidationError

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

func (*ValidationError) DeepCopyInto added in v1.0.4

func (in *ValidationError) DeepCopyInto(out *ValidationError)

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

type ValidationErrors added in v1.0.4

type ValidationErrors []ValidationError

func (*ValidationErrors) AppendErrorWithFields added in v1.0.4

func (ve *ValidationErrors) AppendErrorWithFields(field, message string)

func (*ValidationErrors) AppendErrors added in v1.0.4

func (ve *ValidationErrors) AppendErrors(e ...ValidationError)

func (ValidationErrors) DeepCopy added in v1.0.4

func (in ValidationErrors) DeepCopy() ValidationErrors

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

func (ValidationErrors) DeepCopyInto added in v1.0.4

func (in ValidationErrors) DeepCopyInto(out *ValidationErrors)

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

func (ValidationErrors) IsEmpty added in v1.0.4

func (ve ValidationErrors) IsEmpty() bool

func (ValidationErrors) String added in v1.0.4

func (e ValidationErrors) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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