Skip to content

Instantly share code, notes, and snippets.

View fabriziopandini's full-sized avatar
:octocat:
contributing kubernetes

Fabrizio Pandini fabriziopandini

:octocat:
contributing kubernetes
  • VMware
  • Milano, Italy
View GitHub Profile
$ ▶ kubectl logs -n capa-system capa-controller-manager-6867c885df-v6zmv -c manager
I1005 09:29:04.770721 1 listener.go:44] controller-runtime/metrics "msg"="metrics server is starting to listen" "addr"="127.0.0.1:8080"
I1005 09:29:04.771224 1 main.go:300] setup "msg"="AutoControllerIdentityCreator enabled"
I1005 09:29:04.771298 1 main.go:238] setup "msg"="starting manager" "version"=""
I1005 09:29:04.771640 1 leaderelection.go:242] attempting to acquire leader lease capa-system/controller-leader-election-capa...
I1005 09:29:04.771827 1 internal.go:356] controller-runtime/manager "msg"="starting metrics server" "path"="/metrics"
I1005 09:29:04.779999 1 leaderelection.go:252] successfully acquired lease capa-system/controller-leader-election-capa
I1005 09:29:04.873843 1 controller.go:155] controller-runtime/controller "msg"="Starting EventSource" "controller"="awsmachine" "source"={"Type":{"metadata":{"creationTimestamp":null},"spec":{"ami"
@fabriziopandini
fabriziopandini / coverage.html
Created July 8, 2020 16:53
CAPI-coverage-07/08/2020
This file has been truncated, but you can view the full file.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>
body {
background: black;
color: rgb(80, 80, 80);
}
@fabriziopandini
fabriziopandini / order.go
Created December 11, 2018 08:36
Task ordering
func (t ExecutionPlan) Less(i, j int) bool {
return false ||
// Then PlannedTask are grouped by machines, respecting the kubeadm node
// ProvisioningOrder: first complete provisioning on bootstrap control
// plane, then complete provisioning of secondary control planes, and
// finally provision worker nodes.
t[i].Node.ProvisioningOrder() < t[j].Node.ProvisioningOrder() ||
// Node name is considered in order to get a predictable/repeatable ordering
// in case of many nodes with the same ProvisioningOrder
@fabriziopandini
fabriziopandini / phases.sh
Created December 4, 2018 08:42
Kubeadm phases
preflight Run master pre-flight checks
kubelet-start Writes kubelet settings and (re)starts the kubelet
certs Certificate generation
/ca Generates the self-signed Kubernetes CA to provision identities for other Kubernetes components
/apiserver Generates the certificate for serving the Kubernetes API
/apiserver-kubelet-client Generates the Client certificate for the API server to connect to kubelet
/front-proxy-ca Generates the self-signed CA to provision identities for front proxy
/front-proxy-client Generates the client for the front proxy
/etcd-ca Generates the self-signed CA to provision identities for etcd
/etcd-server Generates the certificate for serving etcd
@fabriziopandini
fabriziopandini / to-excel.py
Last active March 31, 2016 21:31
Create excel file in python from a CSV
import os
import csv
from openpyxl import Workbook
from openpyxl.cell import get_column_letter
from openpyxl.styles import PatternFill
fill = PatternFill(start_color='3498DB',
end_color='3498DB',
fill_type='solid')
@fabriziopandini
fabriziopandini / chartjs-ipython.py
Created March 26, 2016 15:13
Using ChartJs from IPython
import json
from IPython.display import display, Javascript
def chartjs(chartType, data, options={}, width="700px", height="400px"):
""" Custom iphython extension allowing chartjs visualizations
Usage:
chartjs(chartType, data, options, width=1000, height=400)
Args: