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 api/fluentbitoperator/v1alpha2/fluentbit_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ type FluentBitSpec struct {
Image string `json:"image,omitempty"`
// Fluent Bit image pull policy.
ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
// Fluent Bit image pull secret
ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
// Storage for position db. You will use it if tail input is enabled.
PositionDB corev1.VolumeSource `json:"positionDB,omitempty"`
// Container log path
Expand Down
5 changes: 5 additions & 0 deletions api/fluentbitoperator/v1alpha2/zz_generated.deepcopy.go

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

10 changes: 10 additions & 0 deletions chart/fluentbit-operator/crds/logging.kubesphere.io_fluentbit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,16 @@ spec:
imagePullPolicy:
description: Fluent Bit image pull policy.
type: string
imagePullSecrets:
description: An optional list of references to secrets in the same namespace to use for pulling fluentbit images from registries see http://kubernetes.io/docs/user-guide/images#specifying-imagepullsecrets-on-a-pod
items:
description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.
properties:
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
type: string
type: object
type: array
nodeSelector:
additionalProperties:
type: string
Expand Down
4 changes: 4 additions & 0 deletions chart/fluentbit-operator/templates/fluentbit-fluentBit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ metadata:
app.kubernetes.io/name: fluent-bit
spec:
image: {{ .Values.fluentbit.image }}:{{ .Values.fluentbit.tag }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{ toYaml .Values.imagePullSecrets | indent 4 }}
{{- end }}
positionDB:
hostPath:
path: /var/lib/fluent-bit/
Expand Down
12 changes: 12 additions & 0 deletions config/crd/bases/logging.kubesphere.io_fluentbits.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,18 @@ spec:
imagePullPolicy:
description: Fluent Bit image pull policy.
type: string
imagePullSecrets:
description: Fluent Bit image pull secret
items:
description: LocalObjectReference contains enough information to
let you locate the referenced object inside the same namespace.
properties:
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
type: object
type: array
nodeSelector:
additionalProperties:
type: string
Expand Down
12 changes: 12 additions & 0 deletions manifests/setup/fluentbit-operator-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1324,6 +1324,18 @@ spec:
imagePullPolicy:
description: Fluent Bit image pull policy.
type: string
imagePullSecrets:
description: Fluent Bit image pull secret
items:
description: LocalObjectReference contains enough information to
let you locate the referenced object inside the same namespace.
properties:
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
type: object
type: array
nodeSelector:
additionalProperties:
type: string
Expand Down
12 changes: 12 additions & 0 deletions manifests/setup/setup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -931,6 +931,18 @@ spec:
imagePullPolicy:
description: Fluent Bit image pull policy.
type: string
imagePullSecrets:
description: Fluent Bit image pull secret
items:
description: LocalObjectReference contains enough information to
let you locate the referenced object inside the same namespace.
properties:
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
type: object
type: array
nodeSelector:
additionalProperties:
type: string
Expand Down
1 change: 1 addition & 0 deletions pkg/operator/daemonset.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ func MakeDaemonSet(fb v1alpha2.FluentBit, logPath string) appsv1.DaemonSet {
},
Spec: corev1.PodSpec{
ServiceAccountName: fb.Name,
ImagePullSecrets: fb.Spec.ImagePullSecrets,
Volumes: []corev1.Volume{
{
Name: "varlibcontainers",
Expand Down