Skip to content

Instantly share code, notes, and snippets.

View yifan-gu's full-sized avatar

Yifan Gu yifan-gu

  • San Francisco
View GitHub Profile
package main
import (
"fmt"
"golang.org/x/crypto/bcrypt"
)
func main() {
@yifan-gu
yifan-gu / dex-kubernetes.md
Last active January 26, 2025 14:44
dex/kubernetes guide

Create CA cert/key files

In order to enable oidc authenticator in kube-apiserver, we need to have TLS enabled between kubectl and kube-apiserver, as well as between kube-apiserver and OpenID Provider(dex-worker here)

For simplicity, we will use cfssl to create the bundles.

Start dex worker

Checkout and build dex

# Copy of pod.yaml without file extension for test
apiVersion: v1
kind: Pod
metadata:
name: nginx
labels:
name: nginx
spec:
containers:
- name: nginx
# Copy of pod.yaml without file extension for test
apiVersion: v1
kind: Pod
metadata:
name: nginx
labels:
name: nginx
spec:
containers:
- name: nginx

Build:

$ make clean
$ hack/build-go.sh

To start a local cluster using rkt:

$ CONTAINER_RUNTIME=rkt RKT=$PATH_TO_RKT hack/local-up-cluster.sh
@yifan-gu
yifan-gu / badmount_manifest.json
Created June 5, 2015 01:34
badmount_manifest.json
{
"acVersion": "0.5.1+git",
"acKind": "PodManifest",
"apps": [
{
"name": "coreos.com/etcd",
"image": {
"id": "sha512-86aa5fa7158bf69d9b1078f2c557b971315bf4304f3036c4518ebd26c7205cdf"
},
"app": {

Install dependencies

We have two kinds of dependencies in this project: tools and angular framework code. The tools help us manage and test the application.

npm is configured to automatically run bower install and gulp. Before you run the application for the first time, simply run this command from the www/master directory:

### Install dependencies
We have two kinds of dependencies in this project: tools and angular framework code. The tools help
us manage and test the application.
* We get the tools we depend upon via `npm`, the [node package manager](https://www.npmjs.com/).
* We get the angular code via `bower`, a [client-side code package manager](http://bower.io/).
`npm` is configured to automatically run `bower install` and `gulp`. Before you run the application for the first time, simply run this command from the `www/master` directory:
@yifan-gu
yifan-gu / dd.md
Last active August 29, 2015 14:19
dd
{
    "ip4": <ipv4-and-subnet-in-CIDR>,
    "ip6": <ipv6-and-subnet-in-CIDR>
}
1. Update the syncPod in container_runtime branch.
2. Add tests for rkt runtime.
3. Think about Puller, Exec.