Skip to content

Commit c1356c2

Browse files
committed
Add fields to AzureBlob output plugin
Signed-off-by: BHYub <[email protected]>
1 parent 9f5f4fb commit c1356c2

File tree

8 files changed

+212
-0
lines changed

8 files changed

+212
-0
lines changed

apis/fluentbit/v1alpha2/plugins/output/azure_blob_types.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,17 @@ type AzureBlob struct {
2929
EmulatorMode string `json:"emulatorMode,omitempty"`
3030
// HTTP Service of the endpoint (if using EmulatorMode)
3131
Endpoint string `json:"endpoint,omitempty"`
32+
// Optional: Enables GZIP compression in the final blockblob file. This option isn't compatible when blob_type = appendblob.
33+
// +kubebuilder:validation:Enum:=on;off
34+
CompressBlob string `json:"compressBlob,omitempty"`
35+
// Enable buffering into disk before ingesting into Azure Blob.
36+
BufferingEnabled *bool `json:"bufferingEnabled,omitempty"`
37+
// Specifies the size of files to be uploaded in MB. Defaults to 200M.
38+
// +kubebuilder:default:="200M"
39+
UploadFileSize string `json:"uploadFileSize,omitempty"`
40+
// Optional. Specify a timeout for uploads. Fluent Bit will start ingesting buffer files which have been created more than x minutes ago and haven't reached upload_file_size limit yet. Defaults to 30m.
41+
// +kubebuilder:default:="30m"
42+
UploadTimeout string `json:"uploadTimeout,omitempty"`
3243
// Enable/Disable TLS Encryption. Azure services require TLS to be enabled.
3344
*plugins.TLS `json:"tls,omitempty"`
3445
// Include fluentbit networking options for this output-plugin
@@ -67,6 +78,10 @@ func (o *AzureBlob) Params(sl plugins.SecretLoader) (*params.KVs, error) {
6778
plugins.InsertKVString(kvs, "container_name", o.ContainerName)
6879
plugins.InsertKVString(kvs, "blob_type", o.BlobType)
6980
plugins.InsertKVString(kvs, "auto_create_container", o.AutoCreateContainer)
81+
plugins.InsertKVString(kvs, "compress_blob", o.CompressBlob)
82+
plugins.InsertKVField(kvs, "buffering_enabled", o.BufferingEnabled)
83+
plugins.InsertKVString(kvs, "upload_file_size", o.UploadFileSize)
84+
plugins.InsertKVString(kvs, "upload_timeout", o.UploadTimeout)
7085
plugins.InsertKVString(kvs, "path", o.Path)
7186
plugins.InsertKVString(kvs, "emulator_mode", o.EmulatorMode)
7287
plugins.InsertKVString(kvs, "endpoint", o.Endpoint)

apis/fluentbit/v1alpha2/plugins/output/zz_generated.deepcopy.go

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusteroutputs.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,18 @@ spec:
6565
- appendblob
6666
- blockblob
6767
type: string
68+
bufferingEnabled:
69+
description: Enable buffering into disk before ingesting into
70+
Azure Blob.
71+
type: boolean
72+
compressBlob:
73+
description: 'Optional: Enables GZIP compression in the final
74+
blockblob file. This option isn''t compatible when blob_type
75+
= appendblob.'
76+
enum:
77+
- "on"
78+
- "off"
79+
type: string
6880
containerName:
6981
description: Name of the container that will contain the blobs
7082
type: string
@@ -240,6 +252,18 @@ spec:
240252
description: Hostname to be used for TLS SNI extension
241253
type: string
242254
type: object
255+
uploadFileSize:
256+
default: 200M
257+
description: Specifies the size of files to be uploaded in MB.
258+
Defaults to 200M.
259+
type: string
260+
uploadTimeout:
261+
default: 30m
262+
description: Optional. Specify a timeout for uploads. Fluent Bit
263+
will start ingesting buffer files which have been created more
264+
than x minutes ago and haven't reached upload_file_size limit
265+
yet. Defaults to 30m.
266+
type: string
243267
required:
244268
- accountName
245269
- containerName

charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_outputs.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,18 @@ spec:
6565
- appendblob
6666
- blockblob
6767
type: string
68+
bufferingEnabled:
69+
description: Enable buffering into disk before ingesting into
70+
Azure Blob.
71+
type: boolean
72+
compressBlob:
73+
description: 'Optional: Enables GZIP compression in the final
74+
blockblob file. This option isn''t compatible when blob_type
75+
= appendblob.'
76+
enum:
77+
- "on"
78+
- "off"
79+
type: string
6880
containerName:
6981
description: Name of the container that will contain the blobs
7082
type: string
@@ -240,6 +252,18 @@ spec:
240252
description: Hostname to be used for TLS SNI extension
241253
type: string
242254
type: object
255+
uploadFileSize:
256+
default: 200M
257+
description: Specifies the size of files to be uploaded in MB.
258+
Defaults to 200M.
259+
type: string
260+
uploadTimeout:
261+
default: 30m
262+
description: Optional. Specify a timeout for uploads. Fluent Bit
263+
will start ingesting buffer files which have been created more
264+
than x minutes ago and haven't reached upload_file_size limit
265+
yet. Defaults to 30m.
266+
type: string
243267
required:
244268
- accountName
245269
- containerName

config/crd/bases/fluentbit.fluent.io_clusteroutputs.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,18 @@ spec:
6565
- appendblob
6666
- blockblob
6767
type: string
68+
bufferingEnabled:
69+
description: Enable buffering into disk before ingesting into
70+
Azure Blob.
71+
type: boolean
72+
compressBlob:
73+
description: 'Optional: Enables GZIP compression in the final
74+
blockblob file. This option isn''t compatible when blob_type
75+
= appendblob.'
76+
enum:
77+
- "on"
78+
- "off"
79+
type: string
6880
containerName:
6981
description: Name of the container that will contain the blobs
7082
type: string
@@ -240,6 +252,18 @@ spec:
240252
description: Hostname to be used for TLS SNI extension
241253
type: string
242254
type: object
255+
uploadFileSize:
256+
default: 200M
257+
description: Specifies the size of files to be uploaded in MB.
258+
Defaults to 200M.
259+
type: string
260+
uploadTimeout:
261+
default: 30m
262+
description: Optional. Specify a timeout for uploads. Fluent Bit
263+
will start ingesting buffer files which have been created more
264+
than x minutes ago and haven't reached upload_file_size limit
265+
yet. Defaults to 30m.
266+
type: string
243267
required:
244268
- accountName
245269
- containerName

config/crd/bases/fluentbit.fluent.io_outputs.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,18 @@ spec:
6565
- appendblob
6666
- blockblob
6767
type: string
68+
bufferingEnabled:
69+
description: Enable buffering into disk before ingesting into
70+
Azure Blob.
71+
type: boolean
72+
compressBlob:
73+
description: 'Optional: Enables GZIP compression in the final
74+
blockblob file. This option isn''t compatible when blob_type
75+
= appendblob.'
76+
enum:
77+
- "on"
78+
- "off"
79+
type: string
6880
containerName:
6981
description: Name of the container that will contain the blobs
7082
type: string
@@ -240,6 +252,18 @@ spec:
240252
description: Hostname to be used for TLS SNI extension
241253
type: string
242254
type: object
255+
uploadFileSize:
256+
default: 200M
257+
description: Specifies the size of files to be uploaded in MB.
258+
Defaults to 200M.
259+
type: string
260+
uploadTimeout:
261+
default: 30m
262+
description: Optional. Specify a timeout for uploads. Fluent Bit
263+
will start ingesting buffer files which have been created more
264+
than x minutes ago and haven't reached upload_file_size limit
265+
yet. Defaults to 30m.
266+
type: string
243267
required:
244268
- accountName
245269
- containerName

manifests/setup/fluent-operator-crd.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4187,6 +4187,18 @@ spec:
41874187
- appendblob
41884188
- blockblob
41894189
type: string
4190+
bufferingEnabled:
4191+
description: Enable buffering into disk before ingesting into
4192+
Azure Blob.
4193+
type: boolean
4194+
compressBlob:
4195+
description: 'Optional: Enables GZIP compression in the final
4196+
blockblob file. This option isn''t compatible when blob_type
4197+
= appendblob.'
4198+
enum:
4199+
- "on"
4200+
- "off"
4201+
type: string
41904202
containerName:
41914203
description: Name of the container that will contain the blobs
41924204
type: string
@@ -4362,6 +4374,18 @@ spec:
43624374
description: Hostname to be used for TLS SNI extension
43634375
type: string
43644376
type: object
4377+
uploadFileSize:
4378+
default: 200M
4379+
description: Specifies the size of files to be uploaded in MB.
4380+
Defaults to 200M.
4381+
type: string
4382+
uploadTimeout:
4383+
default: 30m
4384+
description: Optional. Specify a timeout for uploads. Fluent Bit
4385+
will start ingesting buffer files which have been created more
4386+
than x minutes ago and haven't reached upload_file_size limit
4387+
yet. Defaults to 30m.
4388+
type: string
43654389
required:
43664390
- accountName
43674391
- containerName
@@ -33213,6 +33237,18 @@ spec:
3321333237
- appendblob
3321433238
- blockblob
3321533239
type: string
33240+
bufferingEnabled:
33241+
description: Enable buffering into disk before ingesting into
33242+
Azure Blob.
33243+
type: boolean
33244+
compressBlob:
33245+
description: 'Optional: Enables GZIP compression in the final
33246+
blockblob file. This option isn''t compatible when blob_type
33247+
= appendblob.'
33248+
enum:
33249+
- "on"
33250+
- "off"
33251+
type: string
3321633252
containerName:
3321733253
description: Name of the container that will contain the blobs
3321833254
type: string
@@ -33388,6 +33424,18 @@ spec:
3338833424
description: Hostname to be used for TLS SNI extension
3338933425
type: string
3339033426
type: object
33427+
uploadFileSize:
33428+
default: 200M
33429+
description: Specifies the size of files to be uploaded in MB.
33430+
Defaults to 200M.
33431+
type: string
33432+
uploadTimeout:
33433+
default: 30m
33434+
description: Optional. Specify a timeout for uploads. Fluent Bit
33435+
will start ingesting buffer files which have been created more
33436+
than x minutes ago and haven't reached upload_file_size limit
33437+
yet. Defaults to 30m.
33438+
type: string
3339133439
required:
3339233440
- accountName
3339333441
- containerName

manifests/setup/setup.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4187,6 +4187,18 @@ spec:
41874187
- appendblob
41884188
- blockblob
41894189
type: string
4190+
bufferingEnabled:
4191+
description: Enable buffering into disk before ingesting into
4192+
Azure Blob.
4193+
type: boolean
4194+
compressBlob:
4195+
description: 'Optional: Enables GZIP compression in the final
4196+
blockblob file. This option isn''t compatible when blob_type
4197+
= appendblob.'
4198+
enum:
4199+
- "on"
4200+
- "off"
4201+
type: string
41904202
containerName:
41914203
description: Name of the container that will contain the blobs
41924204
type: string
@@ -4362,6 +4374,18 @@ spec:
43624374
description: Hostname to be used for TLS SNI extension
43634375
type: string
43644376
type: object
4377+
uploadFileSize:
4378+
default: 200M
4379+
description: Specifies the size of files to be uploaded in MB.
4380+
Defaults to 200M.
4381+
type: string
4382+
uploadTimeout:
4383+
default: 30m
4384+
description: Optional. Specify a timeout for uploads. Fluent Bit
4385+
will start ingesting buffer files which have been created more
4386+
than x minutes ago and haven't reached upload_file_size limit
4387+
yet. Defaults to 30m.
4388+
type: string
43654389
required:
43664390
- accountName
43674391
- containerName
@@ -33213,6 +33237,18 @@ spec:
3321333237
- appendblob
3321433238
- blockblob
3321533239
type: string
33240+
bufferingEnabled:
33241+
description: Enable buffering into disk before ingesting into
33242+
Azure Blob.
33243+
type: boolean
33244+
compressBlob:
33245+
description: 'Optional: Enables GZIP compression in the final
33246+
blockblob file. This option isn''t compatible when blob_type
33247+
= appendblob.'
33248+
enum:
33249+
- "on"
33250+
- "off"
33251+
type: string
3321633252
containerName:
3321733253
description: Name of the container that will contain the blobs
3321833254
type: string
@@ -33388,6 +33424,18 @@ spec:
3338833424
description: Hostname to be used for TLS SNI extension
3338933425
type: string
3339033426
type: object
33427+
uploadFileSize:
33428+
default: 200M
33429+
description: Specifies the size of files to be uploaded in MB.
33430+
Defaults to 200M.
33431+
type: string
33432+
uploadTimeout:
33433+
default: 30m
33434+
description: Optional. Specify a timeout for uploads. Fluent Bit
33435+
will start ingesting buffer files which have been created more
33436+
than x minutes ago and haven't reached upload_file_size limit
33437+
yet. Defaults to 30m.
33438+
type: string
3339133439
required:
3339233440
- accountName
3339333441
- containerName

0 commit comments

Comments
 (0)