This file contains 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 | |
# Requires jq in the path - apt install jq | |
# References | |
# https://www.vagrantup.com/docs/vagrant-cloud/api.html#creating-a-usable-box-from-scratch | |
# https://www.vagrantup.com/docs/vagrant-cloud/boxes/create.html | |
BOX_FILE=$1 | |
USER=magmacore |
This file contains 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
# Copyright (c) 2017 Ansible Project | |
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) | |
from __future__ import absolute_import, division, print_function | |
import os | |
from collections import MutableMapping | |
from yaml.nodes import MappingNode |
This file contains 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
# ./kube-bench master --config config.yml | |
[INFO] 1 Master Node Security Configuration | |
[INFO] 1.1 API Server | |
[FAIL] 1.1.1 Ensure that the --allow-privileged argument is set to false (Scored) | |
[FAIL] 1.1.2 Ensure that the --anonymous-auth argument is set to false (Scored) | |
[FAIL] 1.1.3 Ensure that the --basic-auth-file argument is not set (Scored) | |
[PASS] 1.1.4 Ensure that the --insecure-allow-any-token argument is not set (Scored) | |
[PASS] 1.1.5 Ensure that the --kubelet-https argument is set to true (Scored) | |
[FAIL] 1.1.6 Ensure that the --insecure-bind-address argument is not set (Scored) | |
[FAIL] 1.1.7 Ensure that the --insecure-port argument is set to 0 (Scored) |
This file contains 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: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: kube-dns | |
namespace: "kube-system" | |
labels: | |
k8s-app: kube-dns | |
kubernetes.io/cluster-service: "true" | |
addonmanager.kubernetes.io/mode: Reconcile |
This file contains 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: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: kubedns | |
namespace: kube-system | |
labels: | |
k8s-app: kubedns | |
version: v19 | |
kubernetes.io/cluster-service: "true" | |
spec: |
This file contains 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 -xe | |
OLD_CLUSTERNAME="local" | |
OLD_CONTEXT="kubelet-cluster.second" | |
OLD_USER="kubelet" | |
LOADBALANCER="https://fed-loadbalancer-childcluster.kube-system" | |
NEW_CLUSTERNAME="childcluster" | |
NEW_CONTEXT="childcluster" | |
NEW_USER="kubelet-childcluster" |
This file contains 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: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: teamcity-agent | |
labels: | |
name: teamcity-agent | |
name: frontend | |
spec: | |
replicas: 3 | |
template: |
This file contains 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
connectionUrl=jdbc:mysql://teamcity:3306/teamcity | |
connectionProperties.user=teamcity | |
connectionProperties.password=teamcity | |
maxConnections=50 | |
connectionProperties.useUnicode=true | |
testOnBorrow=true |
This file contains 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/v1beta1 | |
kind: StatefulSet | |
metadata: | |
name: mysql | |
spec: | |
serviceName: "galera" | |
replicas: 3 | |
template: | |
metadata: | |
labels: |
This file contains 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 -e | |
# Change as necessary | |
RESTORE_PATH=${RESTORE_PATH:-/tmp/member} | |
#Extract node data from etcd config | |
source /etc/etcd.env || source /etc/default/etcd | |
function with_retries { | |
local retries=3 |
NewerOlder