_CORE
AI & Agentic Systems Core Information Systems Cloud & Platform Engineering Data Platform & Integration Security & Compliance QA, Testing & Observability IoT, Automation & Robotics Mobile & Digital Banking & Finance Insurance Public Administration Defense & Security Healthcare Energy & Utilities Telco & Media Manufacturing Logistics & E-commerce Retail & Loyalty
References Technologies Blog Know-how Tools
About Collaboration Careers
CS EN
Let's talk

Flux CD — Pokročilý GitOps

10. 12. 2024 1 min read intermediate

DevOps Intermediate

Flux CD — Pokročilý GitOps

FluxGitOpsKubernetesFlagger 5 min read

Flux CD v2: multi-tenancy, Helm releases, image automation a notifikace.

Flux v2 Architektura

Flux v2 je postavený na GitOps Toolkit — sadě specializovaných kontrolérů:

  • Source Controller — spravuje Git repos, Helm repos, OCI artefakty
  • Kustomize Controller — aplikuje Kustomize overlays
  • Helm Controller — řídí HelmRelease lifecycle
  • Notification Controller — alerting a eventy
  • Image Automation — automatický update image tagů v Gitu

HelmRelease

apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
  name: nginx
  namespace: flux-system
spec:
  interval: 10m
  chart:
    spec:
      chart: nginx
      version: ">=15.0.0 <16.0.0"
      sourceRef:
        kind: HelmRepository
        name: bitnami
  values:
    replicaCount: 3
    resources:
      requests:
        cpu: 100m
        memory: 128Mi
  upgrade:
    remediation:
      retries: 3

Image Automation

Flux může automaticky detekovat nové image tagy a commitnout změnu do Gitu.

apiVersion: image.toolkit.fluxcd.io/v1beta2
kind: ImagePolicy
metadata:
  name: app
spec:
  imageRepositoryRef:
    name: app
  policy:
    semver:
      range: ">=1.0.0"
---
apiVersion: image.toolkit.fluxcd.io/v1beta2
kind: ImageUpdateAutomation
metadata:
  name: flux-system
spec:
  interval: 30m
  sourceRef:
    kind: GitRepository
    name: flux-system
  git:
    commit:
      author:
        name: fluxcdbot
        email: [email protected]
    push:
      branch: main
  update:
    strategy: Setters
    path: ./clusters/prod

Summary

Flux v2 s GitOps Toolkit nabízí modulární, composable přístup ke GitOps. Image automation a Flagger integrace umožňují plně automatizované delivery pipeline.

Need Help with Implementation?

Our team has experience designing and implementing modern architectures. We’re happy to help.

Free Consultation

Share:

CORE SYSTEMS tým

Stavíme core systémy a AI agenty, které drží provoz. 15 let zkušeností s enterprise IT.