Skip to content

Instantly share code, notes, and snippets.

View mattymo's full-sized avatar

Matthew Mosesohn mattymo

View GitHub Profile
@mattymo
mattymo / kubedns.yml
Created September 12, 2017 06:06
kubedns
---
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
@mattymo
mattymo / gist:6853e0c2b6f6d62de952b95fddee6af2
Last active October 11, 2017 14:49
kube bench results
# ./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)
@mattymo
mattymo / yaml_ordered.py
Last active September 29, 2019 11:02 — forked from willmerae/yaml_ordered.py
Ansible inventory plugin that preserves the order of hosts in a host group
# 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
@mattymo
mattymo / vagrant_box_upload.sh
Created November 24, 2020 11:35
vagrant box upload
#!/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