Skip to content
Merged
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
2 changes: 2 additions & 0 deletions apis/fluentd/v1alpha1/fluentd_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ type FluentdSpec struct {
Resources corev1.ResourceRequirements `json:"resources,omitempty"`
// NodeSelector
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
// Annotations to add to each Fluentd pod.
Annotations map[string]string `json:"annotations,omitempty"`
// Annotations to add to the Fluentd service account
ServiceAccountAnnotations map[string]string `json:"serviceAccountAnnotations,omitempty"`
// Pod's scheduling constraints.
Expand Down
7 changes: 7 additions & 0 deletions apis/fluentd/v1alpha1/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 @@ -865,6 +865,11 @@ spec:
type: array
type: object
type: object
annotations:
additionalProperties:
type: string
description: Annotations to add to each Fluentd pod.
type: objects
args:
description: Fluentd Watcher command line arguments.
items:
Expand Down
5 changes: 5 additions & 0 deletions config/crd/bases/fluentd.fluent.io_fluentds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -865,6 +865,11 @@ spec:
type: array
type: object
type: object
annotations:
additionalProperties:
type: string
description: Annotations to add to each Fluentd pod.
type: object
args:
description: Fluentd Watcher command line arguments.
items:
Expand Down
1 change: 1 addition & 0 deletions docs/fluentd.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ FluentdSpec defines the desired state of Fluentd
| imagePullSecrets | Fluentd image pull secret | []corev1.LocalObjectReference |
| resources | Compute Resources required by container. | corev1.ResourceRequirements |
| nodeSelector | NodeSelector | map[string]string |
| annotations | Annotations to add to each Fluentd pod. | map[string]string |
| serviceAccountAnnotations | Annotations to add to the Fluentd service account | map[string]string |
| affinity | Pod's scheduling constraints. | *corev1.Affinity |
| tolerations | Tolerations | [][corev1.Toleration](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#toleration-v1-core) |
Expand Down
14 changes: 8 additions & 6 deletions pkg/operator/sts.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,10 @@ func MakeStatefulset(fd fluentdv1alpha1.Fluentd) *appsv1.StatefulSet {

sts := appsv1.StatefulSet{
ObjectMeta: metav1.ObjectMeta{
Name: fd.Name,
Namespace: fd.Namespace,
Labels: labels,
Name: fd.Name,
Namespace: fd.Namespace,
Labels: labels,
Annotations: fd.Annotations,
},
Spec: appsv1.StatefulSetSpec{
Replicas: &replicas,
Expand All @@ -64,9 +65,10 @@ func MakeStatefulset(fd fluentdv1alpha1.Fluentd) *appsv1.StatefulSet {
},
Template: corev1.PodTemplateSpec{
ObjectMeta: metav1.ObjectMeta{
Name: fd.Name,
Namespace: fd.Namespace,
Labels: labels,
Name: fd.Name,
Namespace: fd.Namespace,
Labels: labels,
Annotations: fd.Spec.Annotations,
},
Spec: corev1.PodSpec{
ServiceAccountName: fd.Name,
Expand Down