Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy Fluent Bit #2723

Merged
merged 11 commits into from
Aug 24, 2020

Conversation

alexandre-allard
Copy link
Contributor

@alexandre-allard alexandre-allard commented Aug 6, 2020

Component: salt, build, log

Context:

Summary:

Acceptance criteria:


Closes: #2701

@bert-e
Copy link
Contributor

bert-e commented Aug 6, 2020

Hello alexandre-allard-scality,

My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Status report is not available.

@bert-e
Copy link
Contributor

bert-e commented Aug 6, 2020

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • one peer

Peer approvals must include at least 1 approval from the following list:

@gdemonet gdemonet changed the base branch from development/2.6 to improvement/2682-deploy-loki August 6, 2020 08:15
@TeddyAndrieux TeddyAndrieux force-pushed the improvement/2682-deploy-loki branch from 2209681 to a7e07bb Compare August 6, 2020 08:32
@TeddyAndrieux TeddyAndrieux force-pushed the improvement/2701-deploy-fluent-bit-from-charts branch from 31e4e2a to 693fe20 Compare August 6, 2020 08:34
@TeddyAndrieux TeddyAndrieux force-pushed the improvement/2682-deploy-loki branch from a7e07bb to 34cd3e2 Compare August 6, 2020 16:24
@TeddyAndrieux TeddyAndrieux force-pushed the improvement/2701-deploy-fluent-bit-from-charts branch from 693fe20 to bf86469 Compare August 6, 2020 16:25
@TeddyAndrieux TeddyAndrieux force-pushed the improvement/2682-deploy-loki branch from 34cd3e2 to 8ffd6e1 Compare August 7, 2020 15:13
@TeddyAndrieux TeddyAndrieux force-pushed the improvement/2701-deploy-fluent-bit-from-charts branch from bf86469 to a59134f Compare August 7, 2020 15:14
@TeddyAndrieux TeddyAndrieux force-pushed the improvement/2682-deploy-loki branch from 8ffd6e1 to 7d03763 Compare August 7, 2020 15:42
@TeddyAndrieux TeddyAndrieux force-pushed the improvement/2701-deploy-fluent-bit-from-charts branch from a59134f to 4612ca4 Compare August 7, 2020 15:42
@alexandre-allard alexandre-allard force-pushed the improvement/2682-deploy-loki branch from 7d03763 to e5fce98 Compare August 10, 2020 11:57
@TeddyAndrieux TeddyAndrieux mentioned this pull request Aug 11, 2020
@TeddyAndrieux TeddyAndrieux force-pushed the improvement/2682-deploy-loki branch from e5fce98 to 784ae86 Compare August 11, 2020 08:40
@alexandre-allard alexandre-allard force-pushed the improvement/2701-deploy-fluent-bit-from-charts branch 2 times, most recently from 25bb1e4 to 6527baa Compare August 11, 2020 15:17
Base automatically changed from improvement/2682-deploy-loki to development/2.6 August 12, 2020 14:26
@bert-e
Copy link
Contributor

bert-e commented Aug 12, 2020

Conflict

There is a conflict between your branch improvement/2701-deploy-fluent-bit-from-charts and the
destination branch development/2.6.

Please resolve the conflict on the feature branch (improvement/2701-deploy-fluent-bit-from-charts).

 $ git fetch
 $ git checkout origin/improvement/2701-deploy-fluent-bit-from-charts
 $ git merge origin/development/2.6
 $ # <intense conflict resolution>
 $ git commit
 $ git push origin HEAD:improvement/2701-deploy-fluent-bit-from-charts

@alexandre-allard alexandre-allard force-pushed the improvement/2701-deploy-fluent-bit-from-charts branch from 6527baa to 6a13bbe Compare August 12, 2020 14:38
@bert-e
Copy link
Contributor

bert-e commented Aug 12, 2020

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • one peer

Peer approvals must include at least 1 approval from the following list:

@alexandre-allard alexandre-allard force-pushed the improvement/2701-deploy-fluent-bit-from-charts branch 2 times, most recently from 5433397 to 96c2445 Compare August 17, 2020 14:32
@alexandre-allard alexandre-allard marked this pull request as ready for review August 17, 2020 14:32
@alexandre-allard alexandre-allard requested a review from a team as a code owner August 17, 2020 14:32
@alexandre-allard alexandre-allard force-pushed the improvement/2701-deploy-fluent-bit-from-charts branch from 96c2445 to a0acb6b Compare August 19, 2020 07:44
charts/fluent-bit.yaml Outdated Show resolved Hide resolved
[FILTER]
Name modify
Match host.*
Rename HOSTNAME node
Copy link
Collaborator

@TeddyAndrieux TeddyAndrieux Aug 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure we should rename it to node because hostname may be different from node name :/
I would instead retrieve the node name of the current host here if it's doable (or add a hostname label on k8s logs but not sure it's easy to do as well)
If it's not possible or to much work, then ignore this comment and let's keep hostname as node for the moment

Copy link
Collaborator

@TeddyAndrieux TeddyAndrieux Aug 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PS look like hostname is not really good, on my test env I got some logs with localhost and localhost.localdomain as node (so likely HOSTNAME)
Looking on log it's seems these logs are not really relevant (maybe we should filter out logs with hostname localhost and localhost.localdomain )

Edit: Ok log with localhost and localhost.localdomain are only logs at the beginning before systemd-hostnamed update the hostname

Copy link
Contributor Author

@alexandre-allard alexandre-allard Aug 20, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to be a little bit tricky to achieve that.
I can't find an easy way to retrieve the real hostname from the kubernetes logs or to retrieve the nodename from journal logs.
I've tried to use $HOSTNAME env var, but it's set to the container hostname... not really useful.
Plus, the helm chart does not allow to set up env vars based on pod specs... otherwise we could have done:

[...]
spec:
  containers:
    - env:
        - name: NODE_NAME
          valueFrom:
            fieldRef:
              fieldPath: spec.nodeName
      [...]

And use the env var in fluent bit configuration.
Maybe we should just have 2 different labels host and node... or we should not use this chart.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok let's use hostname and pod for the moment, I updated the dashboard accordingly

tests/post/steps/test_logging.py Outdated Show resolved Hide resolved
tests/post/steps/files/logger-pod.yaml.tpl Outdated Show resolved Hide resolved
  helm repo add loki https://grafana.github.io/loki/charts
  helm repo update
  helm fetch -d charts --untar loki/fluent-bit

Refs: #2701
this file is used to overwrite default values.

Refs: #2701
there is a bug introduced by the latest
change on how we handle CSC in this script,
the script fails if no --service-config or
--remove-manifest options are provided.
  ./charts/render.py fluent-bit --namespace metalk8s-logging \
    --remove-manifest ConfigMap fluent-bit \
    charts/fluent-bit.yaml charts/fluent-bit/ \
    > salt/metalk8s/addons/logging/fluent-bit/deployed/chart.sls

Refs: #2701
@alexandre-allard alexandre-allard force-pushed the improvement/2701-deploy-fluent-bit-from-charts branch from a0acb6b to 0765628 Compare August 20, 2020 07:38
Copy link
Collaborator

@TeddyAndrieux TeddyAndrieux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a comment about tests

tests/post/steps/test_logging.py Outdated Show resolved Hide resolved
@alexandre-allard alexandre-allard force-pushed the improvement/2701-deploy-fluent-bit-from-charts branch from 16ea9b1 to be626c7 Compare August 20, 2020 16:53
spawn a container that logs a single line
then try to retrieve it from Loki API

Refs: #2701
This is needed for Fluent Bit to be able to
send every logs to each Loki instance.

Refs: #2682
We write all logs to each Loki replicas,
so we need to define one Output block,
in Fluent Bit configuration, per loki instance.

Refs: #2701
@alexandre-allard alexandre-allard force-pushed the improvement/2701-deploy-fluent-bit-from-charts branch from be626c7 to c0a0a46 Compare August 24, 2020 08:33
Copy link
Collaborator

@TeddyAndrieux TeddyAndrieux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alexandre-allard
Copy link
Contributor Author

/approve

@bert-e
Copy link
Contributor

bert-e commented Aug 24, 2020

In the queue

The changeset has received all authorizations and has been added to the
relevant queue(s). The queue(s) will be merged in the target development
branch(es) as soon as builds have passed.

The changeset will be merged in:

  • ✔️ development/2.6

The following branches will NOT be impacted:

  • development/1.0
  • development/1.1
  • development/1.2
  • development/1.3
  • development/2.0
  • development/2.1
  • development/2.2
  • development/2.3
  • development/2.4
  • development/2.5

There is no action required on your side. You will be notified here once
the changeset has been merged. In the unlikely event that the changeset
fails permanently on the queue, a member of the admin team will
contact you to help resolve the matter.

IMPORTANT

Please do not attempt to modify this pull request.

  • Any commit you add on the source branch will trigger a new cycle after the
    current queue is merged.
  • Any commit you add on one of the integration branches will be lost.

If you need this pull request to be removed from the queue, please contact a
member of the admin team now.

The following options are set: approve

@bert-e
Copy link
Contributor

bert-e commented Aug 24, 2020

I have successfully merged the changeset of this pull request
into targetted development branches:

  • ✔️ development/2.6

The following branches have NOT changed:

  • development/1.0
  • development/1.1
  • development/1.2
  • development/1.3
  • development/2.0
  • development/2.1
  • development/2.2
  • development/2.3
  • development/2.4
  • development/2.5

Please check the status of the associated issue None.

Goodbye alexandre-allard-scality.

@bert-e bert-e merged commit 6f4c524 into development/2.6 Aug 24, 2020
@bert-e bert-e deleted the improvement/2701-deploy-fluent-bit-from-charts branch August 24, 2020 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deployment of Fluent-Bit from Helm charts
3 participants