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

Sumo monitors installation as a part of the setup job #2250

Merged
merged 16 commits into from
May 4, 2022

Conversation

starzu-sumo
Copy link
Contributor

@starzu-sumo starzu-sumo commented Apr 27, 2022

Description

In order to simplify k8s onboarding in Sumo Logic, we want to install monitors automatically from the setup job.

Behaviour:

  • the monitors will be installed in the Kuberenetes monitors folder if it doesn't exist yet
  • the monitors installation is enabled by default and can be disabled with sumologic.setup.monitors.enabled
  • the monitors are enabled by default and can be disabled with sumologic.setup.monitors.monitorStatus
  • there are no notifications for the monitors by default
  • email notifications can be enabled with sumologic.setup.monitors.notificationEmails
Checklist
  • Changelog updated
Testing performed
  • Redeploy fluentd and fluentd-events pods
  • Confirm events, logs, and metrics are coming in

@github-actions github-actions bot added the documentation documentation label Apr 27, 2022
@starzu-sumo starzu-sumo marked this pull request as ready for review April 27, 2022 12:47
@starzu-sumo starzu-sumo requested a review from a team as a code owner April 27, 2022 12:47
@@ -3,7 +3,7 @@
set -e

echo "Checking the bash scripts with shellcheck..."
find . ! -path '*deploy/helm/sumologic/conf/setup/setup.sh' ! -path "*/tmp/*" -name '*.sh' -type 'f' -print |
find . ! -path '*deploy/helm/sumologic/conf/setup/setup.sh' ! -path '*deploy/helm/sumologic/conf/setup/monitors.sh' ! -path "*/tmp/*" -name '*.sh' -type 'f' -print |
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add analogical check like for setup.sh (is below)?

setupEnabled: true

## If true, the installed monitors will be disabled by default
monitoringDisabled: false
Copy link
Contributor

Choose a reason for hiding this comment

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

I would change this flag to default enableByDefault or sth like that. There is no need to repeat monitoring keyword here

echo "The monitors were already installed in ${MONITORS_FOLDER_NAME}."
echo "You can (re)install them manually with:"
echo "https://github.com/SumoLogic/terraform-sumologic-sumo-logic-monitor/tree/main/monitor_packages/kubernetes"
fi
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add newline at EOF

Copy link
Contributor

Choose a reason for hiding this comment

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

For other files as well 😅

Comment on lines +149 to +151
echo "Installation of the Sumo Logic monitors is disabled."
echo "You can install them manually later with:"
echo "https://github.com/SumoLogic/terraform-sumologic-sumo-logic-monitor/tree/main/monitor_packages/kubernetes"
Copy link
Contributor

Choose a reason for hiding this comment

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

nobody will see this message, as setup pod is being removed just after it finish it jobs (except failures). please add this info to https://github.com/SumoLogic/sumologic-kubernetes-collection/blob/50b1a462b19790110ecafdc33c75cd848c2fdca8/deploy/helm/sumologic/templates/NOTES.txt

Comment on lines 126 to 130
## If enabled, a pre-install hook will create k8s monitors in Sumo Logic
setupEnabled: true

## If true, the installed monitors will be disabled by default
disabled: false

Choose a reason for hiding this comment

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

This set of configuration variables is a bit misleading in the context of the rest of the Chart. It's customary to have an enabled: key which can be used to control the whole feature. To stay consistent with that, I'd do the following:

enabled: true - controls the whole feature, creates monitors in setup and enables them
monitorStatus: enabled - sets the monitor status, can be used to disable them

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, that makes sense. I'll update that.

Co-authored-by: Dominik Rosiek <58699848+sumo-drosiek@users.noreply.github.com>
@sumo-drosiek sumo-drosiek enabled auto-merge (squash) May 4, 2022 12:49
@sumo-drosiek sumo-drosiek disabled auto-merge May 4, 2022 12:49
@sumo-drosiek sumo-drosiek enabled auto-merge (squash) May 4, 2022 12:49
@sumo-drosiek sumo-drosiek merged commit 300ab6d into SumoLogic:main May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants