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
| apiVersion: apps/v1 | |
| kind: DaemonSet | |
| metadata: | |
| name: fluentd | |
| namespace: kube-system | |
| labels: | |
| app: fluentd-logging | |
| version: v1 | |
| kubernetes.io/cluster-service: "true" | |
| spec: |
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
| apiVersion: monitoring.coreos.com/v1 | |
| kind: ServiceMonitor | |
| metadata: | |
| name: pinger-monitor | |
| labels: | |
| app: pinger | |
| prometheus: prom-op | |
| spec: | |
| selector: | |
| matchLabels: |
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
| FROM golang:1.12-stretch AS builder | |
| WORKDIR $GOPATH/pinger | |
| COPY . . | |
| RUN go build -o app . | |
| FROM ubuntu:bionic | |
| COPY --from=builder /go/pinger/app / | |
| ENV PORT=8000 | |
| EXPOSE $PORT |
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
| apiVersion: v1 | |
| kind: ConfigMap | |
| metadata: | |
| name: fluentd-logging | |
| namespace: kube-system | |
| labels: | |
| app: fluentd-logging | |
| data: | |
| fluent.conf: | | |
| <source> |
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
| apiVersion: apps/v1 | |
| kind: DaemonSet | |
| metadata: | |
| name: fluentd | |
| namespace: kube-system | |
| labels: | |
| app: fluentd-logging | |
| version: v1 | |
| kubernetes.io/cluster-service: "true" | |
| spec: |
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
| require 'openssl' | |
| def encrypt_string(str) | |
| cipher_salt1 = 'some-random-salt-' | |
| cipher_salt2 = 'another-random-salt-' | |
| cipher = OpenSSL::Cipher.new('AES-128-ECB').encrypt | |
| cipher.key = OpenSSL::PKCS5.pbkdf2_hmac_sha1(cipher_salt1, cipher_salt2, 20_000, cipher.key_len) | |
| encrypted = cipher.update(str) + cipher.final | |
| encrypted.unpack('H*')[0].upcase | |
| end |
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
| package main | |
| import ( | |
| "fmt" | |
| "net/http" | |
| "time" | |
| "golang.org/x/net/context" | |
| "github.com/husobee/backdrop" |
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
| ... | |
| client := github.NewClient(nil) | |
| hook := github.Hook{ | |
| Name: github.String("web"), | |
| Active: &active, | |
| Events: []string{"push", "pull_request"}, | |
| Config: map[string]interface{}{ | |
| "content_type": "json", | |
| "url": "http://localhost/our/webhook/callback/url", | |
| "secret": "some-security-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
| FROM ubuntu:16.04 | |
| # packages required for building rubies with rvm | |
| RUN apt-get update -qqy && apt-get install -qqy \ | |
| bzip2 \ | |
| gawk \ | |
| g++ \ | |
| gcc \ | |
| make \ | |
| libreadline6-dev \ |
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
| package anyclosedfile | |
| import ( | |
| "log" | |
| "os" | |
| "os/exec" | |
| "path/filepath" | |
| ) | |
| // In checks the given directory for files that are not being actively written to |