Skip to content

Instantly share code, notes, and snippets.

View mtougeron's full-sized avatar

Mike Tougeron mtougeron

View GitHub Profile
@mtougeron
mtougeron / CAPA.md
Last active November 5, 2024 18:21
Notes for importing managed clusters into Cluster API

WARNING: This hasn't been tested extensively outside of my environment. Your mileage may vary.

Assumptions:

  • Any security group modifications or creation that CAPA does that's not specifically flagged below are acceptable for a brief disruption when modified
  • This is valid as of CAPA 2.0.2. This may not work with new versions (e.g., the steps were different pre-2.x and it was easier to import even the VPC itself pre-2.x)

Importing CAPA Cluster (using BYO VPC):

  • Make sure AWSManagedControlPlane.spec.eksClusterName matches the EKS cluster name
  • Optionally set AWSManagedControlPlane.spec.network.securityGroupOverrides.controlplane to match the security group you have on the EKS controlplane. If you have extra security groups I haven't been able to figure out how to import those into CAPA but they stay attached to the EKS cluster and are just ignored by CAPA
  • Set the VPC information according to the BYO VPC specs https://cluster-api-aws.sigs.k8s.io/topics/bring-your-own-aws-infrastructure.html#configur
@mtougeron
mtougeron / keybase.md
Created April 21, 2020 14:38
keybase.md

Keybase proof

I hereby claim:

  • I am mtougeron on github.
  • I am mtougeron (https://keybase.io/mtougeron) on keybase.
  • I have a public key whose fingerprint is 2AB4 C534 B53E 62C9 DFC0 95BA C6EF 5C08 38E1 EEB7

To claim this, I am signing this object:

@mtougeron
mtougeron / steps.txt
Created August 5, 2014 23:52
A simple script to track your login password for scripts
1) run
./sudo_askpass.sh set
and set the password to the keychain
2) run
export SUDO_ASKPASS=/path/to/sudo_askpass.sh
3) run
/do/my/script/to/install/things.sh
@mtougeron
mtougeron / .gitconfig
Created May 27, 2014 22:07
example ~/.gitconfig
[hub]
protocol = https
[core]
autocrlf = input
editor = vim
[alias]
up = pull
co = checkout

Keybase proof

I hereby claim:

  • I am mtougeron on github.
  • I am mtougeron (https://keybase.io/mtougeron) on keybase.
  • I have a public key whose fingerprint is 44F9 756C FAC1 C5C8 461B 2829 7EC4 2272 719C A653

To claim this, I am signing this object:

<?php
class Oyster_Service_Varnish
{
var $_varnishHosts = array(
'oyster-varnish-01',
'oyster-varnish-02',
);
@mtougeron
mtougeron / sfphp.vcl
Created April 9, 2013 16:12
Varnish VCL for Apr 9, 2013 SFPHP Meetup
# VCL for Varnish - How to cache your dynamic pages
# SFPHP.org Apr 9, 2013
# See: https://github.com/varnish/libvmod-header
# This varnish mod allows us to easily manipulate the Set-Cookie responses
import header;
probe varnish_probe {
.url = "/ping";
.timeout = 2s;
@mtougeron
mtougeron / gist:1691105
Created January 27, 2012 21:47
arrayMultiSort
public static function arrayMultiSort(array &$array, array $sortFields, $phpCompareMethod = 'strnatcasecmp')
{
if ( count($sortFields) == 0 ) {
throw new Exception('Missing fields to sort by');
} elseif ( empty($array) || count($array) == 1 ) {
// We return true because "technically" the sort succeeded even though
// we didn't really sort anything. aka it didn't fail so it must be successful
return true;
}
@mtougeron
mtougeron / gist:1650551
Created January 21, 2012 01:02
A example gist to test embedding in IGN Forums
A example gist to test embedding in IGN Forums