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
@voor
voor / gist:3f7d07078ac975db808300dc44f9c5ab
Created December 15, 2023 15:13
#Take a Certificate issued by cert-manager and turn it into a full chain, this is often times necessary if your certificate was signed by an Intermediary CA that is not trusted by all of your systems (i.e., you need to add in the Intermediary signed by the Root CA into the serving application)
---
apiVersion: v1
stringData:
ca.pem: |
-----BEGIN CERTIFICATE-----
MIIFFjCCAv6gAwIBAgIRAJErCErPDBinU/bWLiWnX1owDQYJKoZIhvcNAQELBQAw
TzELMAkGA1UEBhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2Vh
cmNoIEdyb3VwMRUwEwYDVQQDEwxJU1JHIFJvb3QgWDEwHhcNMjAwOTA0MDAwMDAw
WhcNMjUwOTE1MTYwMDAwWjAyMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNTGV0J3Mg
RW5jcnlwdDELMAkGA1UEAxMCUjMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK
@voor
voor / imgpkg-chart.sh
Created August 12, 2021 10:35
Create an imgpkg bundle from a helm chart with any additional overlays you might need.
#!/usr/bin/env sh
set -eux -o pipefail
CHART_NAME=gitlab-runner
SERVICE_FOLDER=${CHART_NAME}
CHART_REPO_NAME=gitlab
CHART_REPO_URL=https://charts.gitlab.io
HARBOR_REPO=your.repo.example.com
@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 / make-kiosk.sh
Created March 17, 2017 12:14
Configuring Kiosk Mode on CentOS
#!/bin/bash
# KIOSK generator for Scientific Linux and CentOS (versions 5; 6 and 7)
# Created using Scientific Linux
# Wasn't made and never tested on different distros than SL/CentOS/EL!
# Version 1.4 for i386 and x86_64
#
# Feel free to contact me: marcin@marcinwilk.eu
# www.marcinwilk.eu
# Marcin Wilk
#! variables that need to be externally configurable
#! are specified in a data values schema file
#! This file is just here to show how the values are merged together.
#@ load("@ytt:data", "data")
#@ load("@ytt:yaml", "yaml")
tap_values: #@ yaml.encode(data.values)
@voor
voor / package-format.yaml
Last active January 25, 2023 21:23
Simple downward to get a package version for Carvel kapp-controller
---
apiVersion: packaging.carvel.dev/v1alpha1
kind: PackageInstall
metadata:
name: simple-app
namespace: common-install
spec:
serviceAccountName: common-sa
packageRef:
refName: simple.app.example.com
@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
#@ load("@ytt:overlay", "overlay")
#@ load("@ytt:data", "data")
---
apiVersion: sso.apps.tanzu.vmware.com/v1alpha1
kind: ClientRegistration
metadata:
name: boats-appsso
namespace: boats
spec:
#@ load("@ytt:data", "data")
#@ load("@ytt:yaml", "yaml")
#@ load("@ytt:overlay", "overlay")
#@ def supervisor_svc_external_dns():
#@ return "kubectl.phantom.{}".format(data.values.cluster_domain)
#@ end
#@ def management_overlay():
@voor
voor / build.sh
Last active June 16, 2022 15:05
Build script for handling imgpkg with helm, ytt, and even Package Repositories.
#!/usr/bin/env bash
set -eu -o pipefail
USAGE="Usage: $0 PACKAGE ACTION REPO # ACTION should be test or deploy"
if [ "$#" == "0" ]; then
echo "$USAGE"
exit 1
fi