Skip to content

Instantly share code, notes, and snippets.

View stefanprodan's full-sized avatar
🎯
Hacking on @fluxcd and timoni.sh

Stefan Prodan stefanprodan

🎯
Hacking on @fluxcd and timoni.sh
View GitHub Profile

SMI Release

A release represents a Git tag in semver format, cut from the main branch of an SMI rrepository. Each API spec is adresable when refereced outside the SMI repo in the format: <smi-spec-repo>/blob/<semver>/apis/<kind>/<version>/<kind>.md e.g. https://github.com/servicemeshinterface/smi-spec/blob/v0.5.0/apis/traffic-split/v1alpha3/traffic-split.md

Changes to the spec are made by opening pull requests against the draft branch. Before a release, the desired changes, for the next version, are merged from draft into main.

SMI spec release steps:

  • Open a pull request from draft into main

Install the CLI:

brew tap fluxcd/tap
brew install gotk

# enable completion
. <(gotk completion zsh)
apiVersion: wkp.weave.works/v1alpha1
kind: ProfileSync
metadata:
name: envoy-ingress
spec:
constraints:
kubernetes: ">=1.16.0"
wkp: ">=2.0.0"
dependsOn:
- monitoring # <- WKP profile that must be installed before envoy-ingress
#!/bin/bash
set -e
GVERSION="1.7"
GFILE="go$GVERSION.linux-amd64.tar.gz"
GOPATH="$HOME/go"
GOROOT="/usr/local/go"
if [ -d $GOROOT ]; then
echo "Installation directories already exist $GOROOT"
@stefanprodan
stefanprodan / wsus.bat
Created April 28, 2015 10:58
Local vs MS WSUS switching, source http://serverfault.com/a/316476
@echo off
:START
cls
echo Temporary WSUS Script
echo ==============================
echo This script will flip between using the internal WSUS server and Microsoft's servers.
echo.
set /p WSUSSETTING=Type [W] to use WSUS or [C] to clear the setting and use MS servers:
IF /i (%WSUSSETTING%) == (W) goto CONTINUE
@stefanprodan
stefanprodan / alert-rules.yaml
Last active January 8, 2020 05:17
prom-alerts
apiVersion: alerting.cloud.weave.works/v1
kind: PrometheusRule
metadata:
name: node-rules
spec:
groups:
- name: node-alerts
rules:
- alert: NodeDown
expr: up{job="kubernetes-nodes"} == 0
@stefanprodan
stefanprodan / goinstall.sh
Last active March 24, 2019 05:30
setup golang dev env for ubuntu desktop
#!/bin/bash
GVERSION="1.4.2"
GFILE="go$GVERSION.linux-amd64.tar.gz"
LVERSION="27.2.1"
LFILE="liteidex$LVERSION.linux-64-qt4.tar.bz2"
GOPATH="$HOME/go"
if [ -d "$HOME/.go" ]; then
echo "Installation directories already exist $HOME/.go $HOME/go"
exit 1

GKE Istio add-on issues

Cluster spec:

gcloud beta container --project "dx-stefan" clusters create "istio-eu" --zone "europe-west3-a" \
--cluster-version "1.11.6-gke.6" --machine-type "n1-standard-2" --image-type "COS" \
--no-enable-basic-auth --disk-type "pd-standard" --disk-size "50" \
--num-nodes "1" --additional-zones "europe-west3-a","europe-west3-b" \
--no-enable-cloud-logging --enable-cloud-monitoring \
set -e
sudo true
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
sudo sh -c 'echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" > /etc/apt/sources.list.d/docker.list'
sudo apt-get update
sudo apt-get purge lxc-docker
sudo apt-cache policy docker-engine
@stefanprodan
stefanprodan / certinfo.yaml
Last active October 1, 2018 06:33
OpenFaaS GKE
apiVersion: openfaas.com/v1alpha2
kind: Function
metadata:
name: certinfo
spec:
name: certinfo
image: stefanprodan/certinfo:latest
labels:
com.openfaas.scale.min: "2"
com.openfaas.scale.max: "12"