kube-logging / logging-operator

Logging operator for Kubernetes
https://kube-logging.dev
Apache License 2.0
1.55k stars 329 forks source link

The operator crashed when using flowconfigovverid in logging crd #420

Open rverma-jm opened 4 years ago

rverma-jm commented 4 years ago

Bugs should be filed for issues encountered whilst operating logging-operator. You should first attempt to resolve your issues through the community support channels, e.g. Slack, in order to rule out individual configuration errors. #logging-operator Please provide as much detail as possible.

Describe the bug: Created a logging crd as

apiVersion: logging.banzaicloud.io/v1beta1
kind: Logging
metadata:
  name: vpcflowlogs
  namespace: siem
spec:
  loggingRef: siem
  flowConfigOverride: |-
    <source>
      @type s3
      <web_identity_credentials>
        role_arn          ROLE_ARN #expected to get this from env variable
        role_session_name ROLE_SESSION_NAME
        web_identity_token_file AWS_WEB_IDENTITY_TOKEN_FILE
      </web_identity_credentials>
      s3_bucket jm-audit-logs
      s3_region ap-south-1
      add_object_metadata false
      store_as gzip
      format tsv
      <sqs>
        queue_name jm_audit_logs_vpcflowlogs
      </sqs>
    </source>
  enableRecreateWorkloadOnImmutableFieldChange: true
  fluentd:
    security:
      serviceAccount: fluentd
    bufferStorageVolume:
      pvc:
        spec:
          accessModes:
            - ReadWriteOnce
          resources:
            requests:
              storage: 10Gi
  controlNamespace: siem

When created the above resource found that operator itself start crashing.

Expected behaviour: Operartor should not crash, infact it should submit status on crd with reason for invalidation.

Environment details:

/kind bug

envybee commented 3 years ago

Hi, we are running into this issue as well. Wondering if there is any update? Thanks

envybee commented 3 years ago

It looks like it's running into a NPE or such here: https://github.com/kube-logging/logging-operator/blob/3c9ab3f0390408914dd03f1941b3dc812a6958f9/pkg/resources/fluentd/outputsecret.go#L68

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions!

aslafy-z commented 1 year ago

Yup, I believe it triggers another NPE here too: https://github.com/kube-logging/logging-operator/blob/e0331c4b508ff54e8b0958d29ace7e8d7427674b/pkg/resources/fluentd/outputsecret.go#L39

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions!

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions!