Skip to content

Commit

Permalink
add cloudId and cloudAuth parameters to elastic
Browse files Browse the repository at this point in the history
Signed-off-by: Fabian Schlager <[email protected]>
  • Loading branch information
fschlager committed May 16, 2024
1 parent 7234760 commit 02160e1
Show file tree
Hide file tree
Showing 8 changed files with 519 additions and 0 deletions.
5 changes: 5 additions & 0 deletions apis/fluentd/v1alpha1/plugins/output/es.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ type Elasticsearch struct {
Scheme *string `json:"scheme,omitempty"`
// Path defines the REST API endpoint of Elasticsearch to post write requests (default: nil).
Path *string `json:"path,omitempty"`
// Authenticate towards Elastic Cloud using CloudId. If set, cloudAuth must
// be set as well and host, port, user and password are ignored.
CloudId *plugins.Secret `json:"cloudId,omitempty"`
// Authenticate towards Elastic Cloud using cloudAuth.
CloudAuth *plugins.Secret `json:"cloudAuth,omitempty"`
// IndexName defines the placeholder syntax of Fluentd plugin API. See https://docs.fluentd.org/configuration/buffer-section.
IndexName *string `json:"indexName,omitempty"`
// If true, Fluentd uses the conventional index name format logstash-%Y.%m.%d (default: false). This option supersedes the index_name option.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,70 @@ spec:
x-kubernetes-map-type: atomic
type: object
type: object
cloudAuth:
description: Authenticate towards Elastic Cloud using cloudAuth.
properties:
valueFrom:
description: ValueSource defines how to find a value's
key.
properties:
secretKeyRef:
description: Selects a key of a secret in the pod's
namespace
properties:
key:
description: The key of the secret to select
from. Must be a valid secret key.
type: string
name:
description: 'Name of the referent. More info:
https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion,
kind, uid?'
type: string
optional:
description: Specify whether the Secret or its
key must be defined
type: boolean
required:
- key
type: object
x-kubernetes-map-type: atomic
type: object
type: object
cloudId:
description: Authenticate towards Elastic Cloud using CloudId.
If set, cloudAuth must be set as well and host, port,
user and password are ignored.
properties:
valueFrom:
description: ValueSource defines how to find a value's
key.
properties:
secretKeyRef:
description: Selects a key of a secret in the pod's
namespace
properties:
key:
description: The key of the secret to select
from. Must be a valid secret key.
type: string
name:
description: 'Name of the referent. More info:
https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion,
kind, uid?'
type: string
optional:
description: Specify whether the Secret or its
key must be defined
type: boolean
required:
- key
type: object
x-kubernetes-map-type: atomic
type: object
type: object
host:
description: 'The hostname of your Elasticsearch node (default:
localhost).'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,70 @@ spec:
x-kubernetes-map-type: atomic
type: object
type: object
cloudAuth:
description: Authenticate towards Elastic Cloud using cloudAuth.
properties:
valueFrom:
description: ValueSource defines how to find a value's
key.
properties:
secretKeyRef:
description: Selects a key of a secret in the pod's
namespace
properties:
key:
description: The key of the secret to select
from. Must be a valid secret key.
type: string
name:
description: 'Name of the referent. More info:
https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion,
kind, uid?'
type: string
optional:
description: Specify whether the Secret or its
key must be defined
type: boolean
required:
- key
type: object
x-kubernetes-map-type: atomic
type: object
type: object
cloudId:
description: Authenticate towards Elastic Cloud using CloudId.
If set, cloudAuth must be set as well and host, port,
user and password are ignored.
properties:
valueFrom:
description: ValueSource defines how to find a value's
key.
properties:
secretKeyRef:
description: Selects a key of a secret in the pod's
namespace
properties:
key:
description: The key of the secret to select
from. Must be a valid secret key.
type: string
name:
description: 'Name of the referent. More info:
https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion,
kind, uid?'
type: string
optional:
description: Specify whether the Secret or its
key must be defined
type: boolean
required:
- key
type: object
x-kubernetes-map-type: atomic
type: object
type: object
host:
description: 'The hostname of your Elasticsearch node (default:
localhost).'
Expand Down
64 changes: 64 additions & 0 deletions config/crd/bases/fluentd.fluent.io_clusteroutputs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,70 @@ spec:
x-kubernetes-map-type: atomic
type: object
type: object
cloudAuth:
description: Authenticate towards Elastic Cloud using cloudAuth.
properties:
valueFrom:
description: ValueSource defines how to find a value's
key.
properties:
secretKeyRef:
description: Selects a key of a secret in the pod's
namespace
properties:
key:
description: The key of the secret to select
from. Must be a valid secret key.
type: string
name:
description: 'Name of the referent. More info:
https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion,
kind, uid?'
type: string
optional:
description: Specify whether the Secret or its
key must be defined
type: boolean
required:
- key
type: object
x-kubernetes-map-type: atomic
type: object
type: object
cloudId:
description: Authenticate towards Elastic Cloud using CloudId.
If set, cloudAuth must be set as well and host, port,
user and password are ignored.
properties:
valueFrom:
description: ValueSource defines how to find a value's
key.
properties:
secretKeyRef:
description: Selects a key of a secret in the pod's
namespace
properties:
key:
description: The key of the secret to select
from. Must be a valid secret key.
type: string
name:
description: 'Name of the referent. More info:
https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion,
kind, uid?'
type: string
optional:
description: Specify whether the Secret or its
key must be defined
type: boolean
required:
- key
type: object
x-kubernetes-map-type: atomic
type: object
type: object
host:
description: 'The hostname of your Elasticsearch node (default:
localhost).'
Expand Down
64 changes: 64 additions & 0 deletions config/crd/bases/fluentd.fluent.io_outputs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,70 @@ spec:
x-kubernetes-map-type: atomic
type: object
type: object
cloudAuth:
description: Authenticate towards Elastic Cloud using cloudAuth.
properties:
valueFrom:
description: ValueSource defines how to find a value's
key.
properties:
secretKeyRef:
description: Selects a key of a secret in the pod's
namespace
properties:
key:
description: The key of the secret to select
from. Must be a valid secret key.
type: string
name:
description: 'Name of the referent. More info:
https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion,
kind, uid?'
type: string
optional:
description: Specify whether the Secret or its
key must be defined
type: boolean
required:
- key
type: object
x-kubernetes-map-type: atomic
type: object
type: object
cloudId:
description: Authenticate towards Elastic Cloud using CloudId.
If set, cloudAuth must be set as well and host, port,
user and password are ignored.
properties:
valueFrom:
description: ValueSource defines how to find a value's
key.
properties:
secretKeyRef:
description: Selects a key of a secret in the pod's
namespace
properties:
key:
description: The key of the secret to select
from. Must be a valid secret key.
type: string
name:
description: 'Name of the referent. More info:
https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion,
kind, uid?'
type: string
optional:
description: Specify whether the Secret or its
key must be defined
type: boolean
required:
- key
type: object
x-kubernetes-map-type: atomic
type: object
type: object
host:
description: 'The hostname of your Elasticsearch node (default:
localhost).'
Expand Down
2 changes: 2 additions & 0 deletions docs/plugins/fluentd/output/es.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Elasticsearch defines the parameters for out_es output plugin
| hosts | Hosts defines a list of hosts if you want to connect to more than one Elasticsearch nodes | *string |
| scheme | Specify https if your Elasticsearch endpoint supports SSL (default: http). | *string |
| path | Path defines the REST API endpoint of Elasticsearch to post write requests (default: nil). | *string |
| cloudId | Authenticate towards Elastic Cloud using CloudId. If set, cloudAuth must be set as well and host, port, user and password are ignored. | *[plugins.Secret](../secret.md) |
| cloudAuth | Authenticate towards Elastic Cloud using cloudAuth. | *[plugins.Secret](../secret.md) |
| indexName | IndexName defines the placeholder syntax of Fluentd plugin API. See https://docs.fluentd.org/configuration/buffer-section. | *string |
| logstashFormat | If true, Fluentd uses the conventional index name format logstash-%Y.%m.%d (default: false). This option supersedes the index_name option. | *bool |
| logstashPrefix | LogstashPrefix defines the logstash prefix index name to write events when logstash_format is true (default: logstash). | *string |
Expand Down
Loading

0 comments on commit 02160e1

Please sign in to comment.