This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export SERVICE_ACCOUT_PATH="/var/run/secrets/kubernetes.io/serviceaccount" | |
| export CACERT_PATH="${SERVICE_ACCOUT_PATH}/ca.crt" | |
| export TOKEN_PATH="${SERVICE_ACCOUT_PATH}/token" | |
| token=$(cat ${TOKEN_PATH} 2>/dev/null) | |
| if [ $? -ne 0 ]; then | |
| echo "Error: Unable to get token from ${TOKEN_PATH}" | |
| unset SERVICE_ACCOUT_PATH | |
| unset CACERT_PATH | |
| unset TOKEN_PATH | |
| exit 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python | |
| # -*- coding: utf-8 -*- | |
| from __future__ import absolute_import, division, print_function | |
| __author__ = "Sebastian Kroczek" | |
| __copyright__ = "Copyright 2018" | |
| __credits__ = ["Sebastian Kroczek"] | |
| __license__ = "MIT" | |
| __email__ = "[email protected]" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| function log_error() { echo `date '+%Y-%m-%d %H:%M:%S'` ERROR: $1 >&2; } | |
| function log() { echo `date '+%Y-%m-%d %H:%M:%S'` INFO: $1; } | |
| MAIL=$(tee) | |
| SERVER_LIST="['10.10.115.15', '10.10.115.16']" | |
| PASSWORD="p455w0rD" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /bin/bash | |
| # Set up a default search path | |
| PATH="/usr/bin:/bin" | |
| CURL=`which curl` | |
| if [ -z "$CURL" ]; then | |
| echo "curl not found" | |
| exit 1 | |
| fi |