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
TOKEN_NAME=$(kubectl -n cd4pe get secrets | grep ^cd4pe-migration | cut -f1 -d ' ') | |
SERVICE_ACCOUNT_TOKEN=$(kubectl -n cd4pe get secret $TOKEN_NAME -o jsonpath="{['data']['token']}") | |
K8S_API_URL=$(kubectl config view --minify -o jsonpath='{.clusters[*].cluster.server}') | |
K8S_CA_CERT=$(kubectl config view --raw --minify -o jsonpath='{.clusters[*].cluster.certificate-authority-data}') | |
cat <<EOF > migrate-to-replicated-request-local-generated.json | |
{ | |
"op": "MigrateToReplicated", | |
"content": { | |
"k8sApiserverUrl": "$K8S_API_URL", | |
"k8sServiceAccountTokenBase64": "$SERVICE_ACCOUNT_TOKEN", |
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 | |
import datetime | |
import os | |
import re | |
class Notifier(object): | |
def _get_icinga_macros(self): |
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/env bash | |
STAGING_DIR="./bq_staging" | |
FILE_PREFIX="runs" | |
FS="_" | |
START_DATE="2017-04-18" | |
END_DATE="2017-07-10" | |
CURRENT_DATE=$START_DATE | |
while [ $CURRENT_DATE != $END_DATE ] | |
do |
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
[2016-01-22 15:53:22 -0800] warning/JsonRpcConnection: Error while reading JSON-RPC message for identity 'icinga-master01-prod.ops.puppetlabs.net': Error: std::exception | |
(0) libbase.so: void boost::throw_exception<icinga::openssl_error>(icinga::openssl_error const&) (+0x4a) [0x7f679b2be5ca] | |
(1) libbase.so: void boost::exception_detail::throw_exception_<icinga::openssl_error>(icinga::openssl_error const&, char const*, char const*, int) (+0x3c) [0x7f679b2be62c] | |
(2) libbase.so: icinga::TlsStream::HandleError() const (+0xb8) [0x7f679b256f78] | |
(3) libbase.so: icinga::TlsStream::Read(void*, unsigned long, bool) (+0x80) [0x7f679b257010] | |
(4) libbase.so: icinga::StreamReadContext::FillFromStream(boost::intrusive_ptr<icinga::Stream> const&, bool) (+0x4f) [0x7f679b25b51f] | |
(5) libbase.so: icinga::NetString::ReadStringFromStream(boost::intrusive_ptr<icinga::Stream> const&, icinga::String*, icinga::StreamReadContext&, bool) (+0x21e) [0x7f679b25b9ce] | |
(6) libremote.so: |
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/sh | |
syntax_errors=0 | |
error_msg=$(mktemp /tmp/error_msg.XXXXXX) | |
if git rev-parse --quiet --verify HEAD > /dev/null | |
then | |
against=HEAD | |
else | |
# Initial commit: diff against an empty tree object |
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/sh | |
syntax_errors=0 | |
error_msg=$(mktemp /tmp/error_msg.XXXXXX) | |
if git rev-parse --quiet --verify HEAD > /dev/null | |
then | |
against=HEAD | |
else | |
# Initial commit: diff against an empty tree object |
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
server { | |
listen *:80; | |
root /usr/share/icingaweb2/public; | |
access_log /var/log/nginx/ssl-icingaweb2_app.access.log; | |
error_log /var/log/nginx/ssl-icingaweb2_app.error.log; | |
location ~ ^/icingaweb2(.+)? { | |
alias /usr/share/icingaweb2/public; | |
index index.php |
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
type Handler struct { | |
Function func(http.ResponseWriter, *http.Request) | |
Methods []string | |
} | |
func AddHandlers(r *mux.Router, handles map[string]Handler) { | |
for k, v := range handles { | |
r.HandleFunc(k, v.Function).Methods(v.Methods...) | |
} |