Skip to content

Instantly share code, notes, and snippets.

👾
available for reviews

Chuck Ha chuckha

👾
available for reviews
Block or report user

Report or block chuckha

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@chuckha
chuckha / etcdadm.sh
Last active Jan 14, 2020
Set up an ubuntu server for go
View etcdadm.sh
#!/usr/bin/env bash
VERSION=1.13.x
git clone https://github.com/kubernetes-sigs/etcdadm.git
cd etcdadm
eval "$(curl -sL https://raw.githubusercontent.com/travis-ci/gimme/master/gimme | GIMME_GO_VERSION=${VERSION} bash)"
make
@chuckha
chuckha / util_test.go
Created Dec 23, 2019
removing external dependency
View util_test.go
/*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@chuckha
chuckha / The secret
Last active Dec 13, 2019
Tracing bootstrap bug in multi-control plane situations
View The secret
As requested, here are the secrets
```
cha$ k get secret controlplane-0 -o jsonpath={.data.value} | base64 -D
## template: jinja
#cloud-config
write_files:
- path: /etc/kubernetes/pki/ca.crt
View client.go
package main
import (
"context"
"fmt"
"os"
"time"
"k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
View gist:db7a6d166560464b9a8556e5a92e7538
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: DockerCluster
metadata:
creationTimestamp: null
name: my-cluster
namespace: default
spec: {}
---
apiVersion: cluster.x-k8s.io/v1alpha2
View repro-failed-multi-node-cp.yaml
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: AWSCluster
metadata:
creationTimestamp: null
name: my-cluster
namespace: default
spec:
region: us-west-2
sshKeyName: work-laptop
View capa-dockerfile.dev
# Copyright 2019 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
View gist:c76c57a090920e22d2bf3440310d6673
apiVersion: "cluster.k8s.io/v1alpha1"
kind: Cluster
metadata:
name: ${CLUSTER_NAME}
spec:
clusterNetwork:
services:
cidrBlocks: ["10.96.0.0/12"]
pods:
cidrBlocks: ["192.168.0.0/16"]
@chuckha
chuckha / Tiltfile
Created Jul 29, 2019
Cluster API Tiltfile
View Tiltfile
# Define the name of the gcr project
project = str(local('gcloud config get-value project')).strip()
# Watch capdctl (depends on https://github.com/kubernetes-sigs/cluster-api-provider-docker/pull/124) merging
read_file(str(local('which capdctl')).rstrip('\n'))
# A command that generates YAML for your system
k8s_yaml(local('capdctl platform -capi-image gcr.io/kubernetes1-226021/cluster-api-controller-amd64:dev -bp-image gcr.io/kubernetes1-226021/cluster-api-bootstrap-provider-kubeadm:dev -bp-ref master'))
# docker_build commands for each image used in the above YAML that you want tilt to be aware of
@chuckha
chuckha / Tiltfile
Last active Jul 26, 2019
tilt file for github.com/kubernetes-sigs/cluster-api-provider-docker
View Tiltfile
project = str(local('gcloud config get-value project')).strip()
read_file(str(local('which capdctl')).rstrip('\n'))
k8s_yaml(local('capdctl platform -capi-image gcr.io/kubernetes1-226021/cluster-api-controller-amd64:dev -bp-image gcr.io/kubernetes1-226021/cluster-api-bootstrap-provider-kubeadm:dev -bp-ref master'))
docker_build('gcr.io/' + project +'/manager', '.')
You can’t perform that action at this time.