Skip to content

Instantly share code, notes, and snippets.

View edsonmarquezani's full-sized avatar

Edson Marquezani Filho edsonmarquezani

  • São Paulo, Brazil
View GitHub Profile

[Draft] Deploy 2.0 Architecture Proposal

Deploy configuration and pipeline

  1. Application must have a high-level definition (analog to current kubefile)

  2. Based on it, a Custom Middleware would render Kubernetes resource(s) configuration and commit on Git repository

    1. Helm may be used for templating only, or even switched by another solution (as any other template engine)
      1. The less intelligence those templates have, the better - the ideal is to have only values interpolation and iteration in lists, and avoid too much if/else conditions (and even less more complex ones)
  3. Resource definitions may be described in "layers", with a common part and a specialized part per environment and/or cluster, using Kustomize

kubectl-set-cluster() {
local cluster=""
local options=""
local red='\033[0;31m'
local nc='\033[0m'
if [ $# -gt 0 ]; then
cluster=$1
else
for context in $(kubectl config get-contexts | tr -d '*' | tail -n +2 | awk '{print $1}' | sort); do