Skip to content

Instantly share code, notes, and snippets.

View danehans's full-sized avatar

Daneyon Hansen danehans

View GitHub Profile
@stevenctl
stevenctl / readme.md
Last active July 2, 2024 15:45
Static PROXY Waypoint

PROXY Protocol Waypoint

This sample demonstrates a non-Istio waypoint defined using static Envoy config.

  1. Create a kind cluster
kind create cluster
@akrylysov
akrylysov / README.md
Last active September 9, 2024 20:30
Fast Intel-on-ARM Docker on macOS with Lima and Rosetta

macOS 13 Ventura introduced support of running amd64 binaries with Rosetta inside of arm64 Linux VMs when using Apple Virtualization framework.

Lima VM v0.14.0 and later support the new feature.

Setup:

# Install Docker client and Lima
brew install docker docker-compose docker-credential-helper lima
#!/bin/bash
# Numeric constants
declare -r -i pxname=0
declare -r -i svname=1
declare -r -i qcur=2
declare -r -i qmax=3
declare -r -i scur=4
declare -r -i smax=5
declare -r -i slim=6
# This yaml file defines a controller that ensures that all routes have the
# "haproxy.router.openshift.io/disable_cookies" annotation set.
#
# Users may create routes with or without the annotation and may update the
# annotation on existing routes. However, if the user creates a route without
# the annotation or updates a route to delete the annotation, the controller
# will add the annotation with the value "true".
#
# Deploy this controller using the following command:
#
% openshift-install create manifests --dir=./clusters/gcp-mmasters-6
INFO Consuming "Install Config" from target directory
openshift-install create manifests --dir=./clusters/gcp-mmasters-6 1.78s user 0.06s system 18% cpu 9.806 total
% cat > ./clusters/gcp-mmasters-6/manifests/ingress-controller-01-crd.yaml <<EOF
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: ingresscontrollers.operator.openshift.io
spec:
@leblancd
leblancd / gist:43d527ab9d98625ca46c14a014005bd5
Created June 21, 2017 19:29
Dual-Stack CNI bridge plugin configuration
{
"cniVersion": "0.3.0",
"name": "mynet",
"type": "bridge",
"bridge": "cbr0",
"isDefaultGateway": true,
"ipMasq": false,
"ipam": {
"type": "host-local",
"ranges": [

Using Kubeadm

Bring up kubernetes with vagrant cd /etc/systemd/system/kubelet.service.d modify 10-kubeadm.conf add

Environment="KUBELET_NETWORK_ARGS=--network-plugin=kubenet --non-masquerade-cidr=10.10.0.0/16"
@fernandoaleman
fernandoaleman / how-to-create-an-rpm-repository.sh
Created November 18, 2011 17:57
How to create an RPM repository
# How to create an RPM repository
# This is for Redhat 64 bit versions of Linux. You can create your own RPM repository # to host your custom RPM packages.
#
# See "How to create an RPM from source with spec file" for more information.
# https://gist.github.com/1376973
# Step: 1
# Install createrepo
@fernandoaleman
fernandoaleman / rpm-from-source.sh
Created November 18, 2011 16:34
How to create an RPM from source with spec file
# How to create an RPM from source with spec file
# This is for Redhat versions of linux. Sometimes when you search for an rpm package,
# it is either outdated or not available. The only thing available is the source code.
# You can create a custom RPM package from source.
#
# For this example, I'll be using the latest version of Git, currently v.1.7.7.3
# Step: 1
# Install rpmbuild