File tree Expand file tree Collapse file tree 3 files changed +18
-8
lines changed
apis/fluentd/v1alpha1/plugins/output
docs/plugins/fluentd/output Expand file tree Collapse file tree 3 files changed +18
-8
lines changed Original file line number Diff line number Diff line change @@ -5,9 +5,13 @@ import "github.com/fluent/fluent-operator/v3/apis/fluentd/v1alpha1/plugins"
55// S3 defines the parameters for out_s3 output plugin
66type S3 struct {
77 // The AWS access key id.
8- AwsKeyId * plugins. Secret `json:"awsKeyId,omitempty"`
8+ AwsKeyId * string `json:"awsKeyId,omitempty"`
99 // The AWS secret key.
10- AwsSecKey * plugins.Secret `json:"awsSecKey,omitempty"`
10+ AwsSecKey * string `json:"awsSecKey,omitempty"`
11+ // The AWS access key id from Secrets.
12+ AwsKeyIdFromSecret * plugins.Secret `json:"awsKeyIdFromSecret,omitempty"`
13+ // The AWS secret key from Secrets.
14+ AwsSecKeyFromSecret * plugins.Secret `json:"awsSecKeyFromSecret,omitempty"`
1115 // The Amazon S3 bucket name.
1216 S3Bucket * string `json:"s3Bucket,omitempty"`
1317 // The Amazon S3 region name
Original file line number Diff line number Diff line change @@ -677,19 +677,23 @@ func (o *Output) kafka2Plugin(parent *params.PluginStore, loader plugins.SecretL
677677}
678678
679679func (o * Output ) s3Plugin (parent * params.PluginStore , loader plugins.SecretLoader ) * params.PluginStore {
680- if o .S3 .AwsKeyId != nil {
681- value , err := loader .LoadSecret (* o .S3 .AwsKeyId )
680+ if o .S3 .AwsKeyIdFromSecret != nil {
681+ value , err := loader .LoadSecret (* o .S3 .AwsKeyIdFromSecret )
682682 if err != nil {
683683 return nil
684684 }
685685 parent .InsertPairs ("aws_key_id" , value )
686+ } else if o .S3 .AwsKeyId != nil {
687+ parent .InsertPairs ("aws_key_id" , fmt .Sprint (* o .S3 .AwsKeyId ))
686688 }
687- if o .S3 .AwsSecKey != nil {
688- value , err := loader .LoadSecret (* o .S3 .AwsSecKey )
689+ if o .S3 .AwsSecKeyFromSecret != nil {
690+ value , err := loader .LoadSecret (* o .S3 .AwsSecKeyFromSecret )
689691 if err != nil {
690692 return nil
691693 }
692694 parent .InsertPairs ("aws_sec_key" , value )
695+ } else if o .S3 .AwsSecKey != nil {
696+ parent .InsertPairs ("aws_sec_key" , fmt .Sprint (* o .S3 .AwsSecKey ))
693697 }
694698 if o .S3 .S3Bucket != nil {
695699 parent .InsertPairs ("s3_bucket" , fmt .Sprint (* o .S3 .S3Bucket ))
Original file line number Diff line number Diff line change @@ -5,8 +5,10 @@ S3 defines the parameters for out_s3 output plugin
55
66| Field | Description | Scheme |
77| ----- | ----------- | ------ |
8- | awsKeyId | | * [ plugins.Secret] ( ../secret.md ) |
9- | awsSecKey | | * [ plugins.Secret] ( ../secret.md ) |
8+ | awsKeyId | The AWS access key id. | * string |
9+ | awsSecKey | The AWS secret key. | * string |
10+ | awsKeyIdFromSecret | The AWS access key id from Secrets. | * [ plugins.Secret] ( ../secret.md ) |
11+ | awsSecKeyFromSecret | The AWS secret key from Secrets. | * [ plugins.Secret] ( ../secret.md ) |
1012| s3Bucket | The Amazon S3 bucket name. | * string |
1113| s3Region | The Amazon S3 region name | * string |
1214| s3Endpoint | The endpoint URL (like \" http://localhost:9000/\") | * string |
You can’t perform that action at this time.
0 commit comments