Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 48 additions & 4 deletions api/observability/v1/output_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -372,23 +372,50 @@ type Cloudwatch struct {

// GroupName defines the strategy for grouping logstreams
//
// The GroupName can be a combination of static and dynamic values consisting of field paths followed by "\|\|" followed by another field path or a static value.
// The GroupName can be a combination of static and dynamic values consisting of field paths followed by "||" followed by another field path or a static value.
//
// A dynamic value is encased in single curly brackets "{}" and MUST end with a static fallback value separated with "\|\|".
// A dynamic value is encased in single curly brackets "{}" and MUST end with a static fallback value separated with "||".
//
// Static values can only contain alphanumeric characters along with dashes, underscores, dots and forward slashes.
//
// Example:
//
// 1. foo-{.bar\|\|"none"}
//
// 2. {.foo\|\|.bar\|\|"missing"}
//
// 3. foo.{.bar.baz\|\|.qux.quux.corge\|\|.grault\|\|"nil"}-waldo.fred{.plugh\|\|"none"}
//
// +kubebuilder:validation:Pattern:=`^(([a-zA-Z0-9-_.\/])*(\{(\.[a-zA-Z0-9_]+|\."[^"]+")+((\|\|)(\.[a-zA-Z0-9_]+|\.?"[^"]+")+)*\|\|"[^"]*"\})*)*$`
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Group Name",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:text"}
GroupName string `json:"groupName"`

// GroupClass defines the log class to be used when creating a log group for the first time.
// Allowed values are "standard" and "infrequent_access"
//
// The log group class cannot be changed once the group is created.
//
// NOTE: The "delivery" log class is not supported due to its limited feature set and complex constraints
//
// +kubebuilder:validation:Optional
// +kubebuilder:default=standard
// +kubebuilder:validation:Enum=standard;infrequent_access;infrequentAccess
GroupClass string `json:"groupClass,omitempty"`

// Tags is a map of key-value pairs that are applied to the CloudWatch log group.
//
///* OPTIONALLY??
// The values can be a combination of static and dynamic values, using the same
// templating syntax as GroupName.
//
// The key must be a valid AWS Tag key.
// The value must follow the same pattern as GroupName.
// NOTE: kubebuilder doesn't directly validate map values in this way
//*/
//
// +kubebuilder:validation:Optional
// +nullable
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="User-Defined Tags"
// +kubebuilder:validation:MaxProperties:=10
Tags map[string]string `json:"tags,omitempty"`
}

// AwsAuthType sets the authentication type used for CloudWatch.
Expand Down Expand Up @@ -1473,4 +1500,21 @@ type S3 struct {
// +kubebuilder:validation:Optional
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Custom Endpoint URL",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:text"}
URL string `json:"url,omitempty"`

// Tags is a map of key-value pairs that are applied to the CloudWatch log group.
//
///* OPTIONALLY??
// The values can be a combination of static and dynamic values, using the same
// templating syntax as GroupName.
//
// The key must be a valid AWS Tag key.
// The value must follow the same pattern as GroupName.
// NOTE: kubebuilder doesn't directly validate map values in this way
//*/
//
// +kubebuilder:validation:Optional
// +nullable
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="User-Defined Tags"
// +kubebuilder:validation:MaxProperties:=10
Tags map[string]string `json:"tags,omitempty"`
}
7 changes: 7 additions & 0 deletions api/observability/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -2045,27 +2045,55 @@ spec:
- message: Additional type specific spec is required for
authentication
rule: self.type != 'iamRole' || has(self.iamRole)
groupClass:
default: standard
description: |-
GroupClass defines the log class to be used when creating a log group for the first time.
Allowed values are "standard" and "infrequent_access"

The log group class cannot be changed once the group is created.

NOTE: The "delivery" log class is not supported due to its limited feature set and complex constraints
enum:
- standard
- infrequent_access
- infrequentAccess
type: string
groupName:
description: |-
GroupName defines the strategy for grouping logstreams

The GroupName can be a combination of static and dynamic values consisting of field paths followed by "\|\|" followed by another field path or a static value.
The GroupName can be a combination of static and dynamic values consisting of field paths followed by "||" followed by another field path or a static value.

A dynamic value is encased in single curly brackets "{}" and MUST end with a static fallback value separated with "\|\|".
A dynamic value is encased in single curly brackets "{}" and MUST end with a static fallback value separated with "||".

Static values can only contain alphanumeric characters along with dashes, underscores, dots and forward slashes.

Example:

1. foo-{.bar\|\|"none"}

2. {.foo\|\|.bar\|\|"missing"}

3. foo.{.bar.baz\|\|.qux.quux.corge\|\|.grault\|\|"nil"}-waldo.fred{.plugh\|\|"none"}
pattern: ^(([a-zA-Z0-9-_.\/])*(\{(\.[a-zA-Z0-9_]+|\."[^"]+")+((\|\|)(\.[a-zA-Z0-9_]+|\.?"[^"]+")+)*\|\|"[^"]*"\})*)*$
type: string
region:
type: string
tags:
additionalProperties:
type: string
description: |-
Tags is a map of key-value pairs that are applied to the CloudWatch log group.
/* OPTIONALLY??
The values can be a combination of static and dynamic values, using the same
templating syntax as GroupName.

The map key must be a valid AWS Tag key.
The map value must follow the same pattern as GroupName.
NOTE: kubebuilder doesn't directly validate map values in this way
*/
maxProperties: 10
nullable: true
type: object
tuning:
description: Tuning specs tuning for the output
nullable: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2045,27 +2045,55 @@ spec:
- message: Additional type specific spec is required for
authentication
rule: self.type != 'iamRole' || has(self.iamRole)
groupClass:
default: standard
description: |-
GroupClass defines the log class to be used when creating a log group for the first time.
Allowed values are "standard" and "infrequent_access"

The log group class cannot be changed once the group is created.

NOTE: The "delivery" log class is not supported due to its limited feature set and complex constraints
enum:
- standard
- infrequent_access
- infrequentAccess
type: string
groupName:
description: |-
GroupName defines the strategy for grouping logstreams

The GroupName can be a combination of static and dynamic values consisting of field paths followed by "\|\|" followed by another field path or a static value.
The GroupName can be a combination of static and dynamic values consisting of field paths followed by "||" followed by another field path or a static value.

A dynamic value is encased in single curly brackets "{}" and MUST end with a static fallback value separated with "\|\|".
A dynamic value is encased in single curly brackets "{}" and MUST end with a static fallback value separated with "||".

Static values can only contain alphanumeric characters along with dashes, underscores, dots and forward slashes.

Example:

1. foo-{.bar\|\|"none"}

2. {.foo\|\|.bar\|\|"missing"}

3. foo.{.bar.baz\|\|.qux.quux.corge\|\|.grault\|\|"nil"}-waldo.fred{.plugh\|\|"none"}
pattern: ^(([a-zA-Z0-9-_.\/])*(\{(\.[a-zA-Z0-9_]+|\."[^"]+")+((\|\|)(\.[a-zA-Z0-9_]+|\.?"[^"]+")+)*\|\|"[^"]*"\})*)*$
type: string
region:
type: string
tags:
additionalProperties:
type: string
description: |-
Tags is a map of key-value pairs that are applied to the CloudWatch log group.
/* OPTIONALLY??
The values can be a combination of static and dynamic values, using the same
templating syntax as GroupName.

The map key must be a valid AWS Tag key.
The map value must follow the same pattern as GroupName.
NOTE: kubebuilder doesn't directly validate map values in this way
*/
maxProperties: 10
nullable: true
type: object
tuning:
description: Tuning specs tuning for the output
nullable: true
Expand Down
18 changes: 14 additions & 4 deletions config/manifests/bases/cluster-logging.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -549,18 +549,16 @@ spec:
- description: |-
GroupName defines the strategy for grouping logstreams

The GroupName can be a combination of static and dynamic values consisting of field paths followed by "\|\|" followed by another field path or a static value.
The GroupName can be a combination of static and dynamic values consisting of field paths followed by "||" followed by another field path or a static value.

A dynamic value is encased in single curly brackets "{}" and MUST end with a static fallback value separated with "\|\|".
A dynamic value is encased in single curly brackets "{}" and MUST end with a static fallback value separated with "||".

Static values can only contain alphanumeric characters along with dashes, underscores, dots and forward slashes.

Example:

1. foo-{.bar\|\|"none"}

2. {.foo\|\|.bar\|\|"missing"}

3. foo.{.bar.baz\|\|.qux.quux.corge\|\|.grault\|\|"nil"}-waldo.fred{.plugh\|\|"none"}
displayName: Group Name
path: outputs[0].cloudwatch.groupName
Expand All @@ -570,6 +568,18 @@ spec:
path: outputs[0].cloudwatch.region
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:text
- description: |-
Tags is a map of key-value pairs that are applied to the CloudWatch log group.
/* OPTIONALLY??
The values can be a combination of static and dynamic values, using the same
templating syntax as GroupName.

The map key must be a valid AWS Tag key.
The map value must follow the same pattern as GroupName.
NOTE: kubebuilder doesn't directly validate map values in this way
*/
displayName: User-Defined Tags
path: outputs[0].cloudwatch.tags
- description: Tuning specs tuning for the output
displayName: Tuning Options
path: outputs[0].cloudwatch.tuning
Expand Down
Loading