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

Moved health check to a separate file #73

Merged
merged 1 commit into from
Apr 1, 2021
Merged

Moved health check to a separate file #73

merged 1 commit into from
Apr 1, 2021

Conversation

keyvaann
Copy link
Collaborator

Apparently quotes were being handled properly by Kubernetes so moved the health check to a separate file.

@keyvaann keyvaann requested a review from blootsvoets March 31, 2021 15:59
Copy link
Contributor

@blootsvoets blootsvoets left a comment

Choose a reason for hiding this comment

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

Works, some alternative syntax also proposed.

Comment on lines 13 to 16
STATUS=$(wget -O - localhost:8080/managementportal/management/health | grep -Fo 'db":{"status":"UP')
if [ -z "$(echo $STATUS)" ]; then
exit 1
fi
Copy link
Contributor

Choose a reason for hiding this comment

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

Alternative

Suggested change
STATUS=$(wget -O - localhost:8080/managementportal/management/health | grep -Fo 'db":{"status":"UP')
if [ -z "$(echo $STATUS)" ]; then
exit 1
fi
if ! (wget -O - localhost:8080/managementportal/management/health | grep -Fq 'db":{"status":"UP'); then
exit 1
fi

or even

    STATUS=$(wget -O - localhost:8080/managementportal/management/health)
    if ! (echo "$STATUS" | grep -Fq 'db":{"status":"UP'); then
      exit 1
    fi

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated the code

@keyvaann keyvaann merged commit e5bde54 into dev Apr 1, 2021
@keyvaann keyvaann deleted the mp-healthcheck branch April 1, 2021 12:20
blootsvoets pushed a commit that referenced this pull request Dec 21, 2022
Moved health check to a separate file
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.

2 participants