Skip to content

Instantly share code, notes, and snippets.

View voor's full-sized avatar
🐢
it's pronounced turtle cuddle

Robert Van Voorhees voor

🐢
it's pronounced turtle cuddle
View GitHub Profile
#@data/values
---
aws:
vpc:
name: staging
clusters:
- name: hey
#@ load("@ytt:struct", "struct")
#@ array= [0, 1, 2, 3]
#@ arraymap = [4, 5, 6, 7]
#@ merge = array + arraymap
stuff:
#@ for k in merge:
- #@ k
@voor
voor / loop.yaml
Created September 23, 2020 17:15
#@ load("@ytt:overlay", "overlay")
#@ load("@ytt:data", "data")
#@ def clusters():
- name: harbor
#@ end
#@ for cluster in clusters():
#@ "{}-postcreate".format(cluster.name)
#@ end
kind: KubeadmControlPlane
spec:
kubeadmConfigSpec:
files:
- path: /etc/kubernetes/encryption-provider.yaml
content: |
apiVersion: apiserver.config.k8s.io/v1
kind: EncryptionConfiguration
resources:
- resources:
#@ load("@ytt:data", "data")
---
apiVersion: v1
kind: Secret
metadata:
name: grafana-config
namespace: monitoring
type: Opaque
stringData:
@voor
voor / cli.sh
Created April 29, 2020 20:52
Node remediation with the magic of chroot
kubectl run -i --rm --tty photonos-on-host --overrides='
{
"spec": {
"containers": [
{
"name": "photonos-on-host",
"image": "photon:3.0",
"args": ["bash"],
"stdin": true,
"stdinOnce": true,
oscap xccdf generate fix --profile xccdf_org.ssgproject.content_profile_ospp --template urn:xccdf:fix:script:ansible xccdf-file.xml
@voor
voor / aws.ini
Last active June 28, 2023 05:56
100% Offline installation on Ubuntu with kubeadm for Kubernetes 1.15.3
[Global]
[ServiceOverride "ec2"]
URL = "https://ec2.${AWS_ENDPOINT_URL}"
SigningRegion = "${AWS_REGION}"
Region = "${AWS_REGION}"
SigningMethod = v4
Service = ec2
[ServiceOverride "elasticloadbalancing"]
@voor
voor / main.go
Created August 22, 2019 01:37 — forked from micahhausler/main.go
CloudConfig loop vs global map benchmark
package main
import (
"fmt"
"github.com/aws/aws-sdk-go/aws/endpoints"
"gopkg.in/gcfg.v1"
)
type CloudConfig struct {
@voor
voor / build_serviceaccount_kubeconfig.sh
Last active January 20, 2023 17:49 — forked from innovia/kubernetes_add_service_account_kubeconfig.sh
Create a service account and generate a kubeconfig file for it - this will also set the default namespace for the user
#!/bin/bash
set -e
set -o pipefail
# Add user to k8s using service account or build kubeconfig for existing service account, no RBAC (must create RBAC after this script)
if [[ -z "$1" ]] || [[ -z "$2" ]] || [[ -z "$3" ]]; then
echo "usage: $0 <service_account_name> <namespace> <target_folder>"
exit 1
fi