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
""" | |
requires click package: | |
- pip install click | |
Example usage: | |
- python env2secret.py --src=production-ru.env --dst=production-ru-secret.yaml --fmt=yaml --name=my-app-secret | |
""" | |
import base64 | |
import click |
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: nginx-load-balancer-conf | |
data: | |
body-size: "0" | |
proxy-connect-timeout: "10" | |
proxy-read-timeout: "360" | |
proxy-send-imeout: "360" |
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
# Modify this file accordingly for your specific requirement. | |
# http://www.thegeekstuff.com | |
# 1. Delete all existing rules | |
iptables -F | |
# 2. Set default chain policies | |
iptables -P INPUT DROP | |
iptables -P FORWARD DROP | |
iptables -P OUTPUT DROP |
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 | |
######## | |
# originaly from https://github.com/mlafeldt/chef-runner/blob/v0.7.0/script/coverage | |
####### | |
# Generate test coverage statistics for Go packages. | |
# | |
# Works around the fact that `go test -coverprofile` currently does not work | |
# with multiple packages, see https://code.google.com/p/go/issues/detail?id=6909 | |
# | |
# Usage: script/coverage [--html|--coveralls] |
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
#cloud-config | |
coreos: | |
etcd2: | |
# generate a new token for each unique cluster from https://discovery.etcd.io/new?size=3 | |
# specify the initial size of your cluster with ?size=X | |
discovery: https://discovery.etcd.io/<token> | |
# multi-region and multi-cloud deployments need to use $public_ipv4 | |
advertise-client-urls: http://$private_ipv4:2379,http://$private_ipv4:4001 | |
initial-advertise-peer-urls: http://$private_ipv4:2380 |
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
$ cd /var/lib/cni/networks/kubenet | |
$ ls | |
10.180.2.2 10.180.2.3 10.180.2.4 last_reserved_ip | |
$ echo foobar > 10.180.2.244 | |
$ for hash in $(tail -n +1 * | grep '^[A-Za-z0-9]*$' | cut -c 1-8); do if [ -z $(docker ps -a | grep $hash | awk '{print $1}') ]; then grep -ir $hash ./; fi; done | |
./10.180.2.244:foobar | |
$ for hash in $(tail -n +1 * | grep '^[A-Za-z0-9]*$' | cut -c 1-8); do if [ -z $(docker ps -a | grep $hash | awk '{print $1}') ]; then grep -ilr $hash ./; fi; done | xargs rm | |
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
kubectl get pods -w -l release=stolon-kube | |
NAME READY STATUS RESTARTS AGE | |
stolon-kube-stolon-ht89t 0/1 Completed 0 1m | |
stolon-kube-stolon-keeper-0 1/1 Running 0 1m | |
stolon-kube-stolon-keeper-1 1/1 Running 0 1m | |
stolon-kube-stolon-keeper-2 1/1 Running 0 59s | |
stolon-kube-stolon-proxy-c87c57676-h8pxj 1/1 Running 0 1m | |
stolon-kube-stolon-proxy-c87c57676-rcbdz 1/1 Running 0 1m | |
stolon-kube-stolon-proxy-c87c57676-zdcrc 1/1 Running 0 1m | |
stolon-kube-stolon-sentinel-5dc5fd564f-56z89 1/1 Running 0 1m |
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 | |
set -e | |
start=$(date -ud 20170413 "+%s") # start time in epoch time (seconds since Jan. 1st, 1970) | |
end=$(date -ud 20180831 "+%s") # end time | |
period=$((86400 * 7)) # 86400 is 24 hours | |
for ((i=start; i <= end; i+=$period)); 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
$ kubectl describe pod heketi-679447869-25f6n | |
... | |
Events: | |
Type Reason Age From Message | |
---- ------ ---- ---- ------- | |
Normal Scheduled 7m default-scheduler Successfully assigned default/heketi-679447869-25f6n to srv-vm-02 | |
Warning FailedMount 7m kubelet, srv-vm-02 MountVolume.SetUp failed for volume "db" : mount failed: mount failed: exit status 1 | |
Mounting command: systemd-run | |
Mounting arguments: --description=Kubernetes transient mount for /var/lib/kubelet/pods/c5c266b6-da0f-11e8-bd66-000c29769173/volumes/kubernetes.io~glusterfs/db --scope -- mount -t glusterfs -o log-file=/var/lib/kubelet/plugins/kubernetes.io/glusterfs/db/heketi-679447869-25f6n-glusterfs.log,log-level=ERROR,backup-volfile-servers=192.168.11.14:192.168.11.15:192.168.11.16,auto_unmount 192.168.11.14:heketidbstorage /var/lib/kubelet/pods/c5c266b6-da0f-11e8-bd66-000c29769173/volumes/kubernetes.io~glusterfs/db |
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
# roles/download/defaults/main.yaml | |
kubeadm: | |
enabled: "{{ kubeadm_enabled }}" | |
file: true | |
version: "{{ kubeadm_version }}" | |
dest: "{{local_release_dir}}/kubeadm" | |
# sha256: "{{ kubeadm_binary_checksum }}" | |
url: "{{ kubeadm_download_url }}" | |
unarchive: false | |
owner: "root" |
OlderNewer