Lets get started >>

GitOps

Florian Dambrine - Principal Engineer

GitOps

#4 Software agents ensure correctness and alert on divergence

#1 The entire system is described declaratively

#2 The canonical desired system state versioned in git

 

#3 Approved changes that can be automatically applied to the system

#1 The entire system is described declaratively

git://verity-onprem-ops/releases/gitops/demo
releases:
  - name: "demo--{{ .Environment.Name }}"
    <<: *monochart
    values:
      - "./values/{{`{{ .Release.Name }}`}}.yaml"
replicaCount: 1

image:
  repository: docker/whalesay
  tag: latest
  pullPolicy: IfNotPresent

deployment:
  enabled: true
  revisionHistoryLimit: 10
  pod:
    annotations: {}
    labels: {}
    command:
      - "/bin/bash"
      - "-c"
      - "--"
    args:
      - "while true; do cowsay -f docker 'I love Gitops from Staging'; sleep 30; done;"

Templates

Values

#1 The entire system is described declaratively

Canonical Desired States

demo--production
demo--staging
myapp:staging
myapp:v1.0.0

staging.yaml

production.yaml

demo--production
demo--staging

Canonical Desired States

#2 The canonical desired system state versioned in git

demo--production
└── monochart
    └── templates
        └── deployment.yaml
demo--staging
└── monochart
    └── templates
        └── deployment.yaml
git://verity-onprem-gitops

#3 Approved changes that can be automatically applied to the system

Files rendered when repository is tagged

Files rendered after PR merged on master  

demo--production
└── monochart
    └── templates
        └── deployment.yaml
demo--staging
└── monochart
    └── templates
        └── deployment.yaml

#4 Software agents ensure correctness and alert on divergence

demo--production
└── monochart
    └── templates
        └── deployment.yaml
demo--staging
└── monochart
    └── templates
        └── deployment.yaml

ArgoCD

Sync

?

Demo

Canonical Desired States

demo--production
demo--staging
myapp:staging
myapp:v1.0.0
staging.yaml
production.yaml
$ helmfile --environement <env> template
helmfile repo
canonical state repo

Files rendered when repository is tagged

Files rendered after PR merged on master  

demo--production
└── monochart
    └── templates
        └── deployment.yaml
demo--staging
└── monochart
    └── templates
        └── deployment.yaml

ArgoCD

Sync

?

demo--production
└── monochart
    └── templates
        └── deployment.yaml
demo--staging
└── monochart
    └── templates
        └── deployment.yaml

GitOps

By Florian Dambrine

GitOps

  • 931