Skip to content

wilump-labs/argo-in-actions

Repository files navigation

Argo-in-actions

  • ArgoCD
  • Argo Rollouts

ArgoCD

Local installation

# install argo helm
sh scripts/argocd.sh

# create makefile for template
vi argo-cd/Makefile

# create local template
make argo-cd/template-local

# create argo cd pods on local
make upgrade-local

Simple Usage

  • Settings - Repositories 생성
  • Settings - Projects 생성
  • Applications - New App 생성 및 Sync

ArgoCD declarative setup

ArgoCD app-of-apps

  • cluster bootstrapping
  • ArgoCD 내에 먼저 애플리케이션을 배포하고, ArgoCD 내에 필요한 애플리케이션들을 해당 애플리케이션이 설치
  • cluster bootstrapping(app of apps pattern)은 관리자 툴
    • argo cd가 설치된 namespace에서 활용 가능 (Projects with access to the namespace in which Argo CD is installed effectively have admin-level privileges.)

ArgoCD user management

  • 크게 local user, sso(dex)로 인증 방법 제공

local user

  • argo config map 설정을 통해 local user 설정 가능
    • 생성한 유저에 대한 비밀번호 수정은 argo cli를 이용해서 접속 가능(brew install argocd)
    • admin으로 접속해서 cli를 통해 패스워드 변경
  • RBAC 기반으로 권한 부여 (argocd-rbac-cm)
  • 작은 규모일 때는 local user로 권한 관리 가능

dex(delegate authentication to an external identity provider)

ArgoCD with github actions

스크린샷

  • app repostitory workflows에 github actions을 통해 ci/cd script를 작성
    • ci: test, build, image push
    • cd: config repository의 명시 버전 수정 커밋
  • argo cd autho sync가 되어있는 경우 자체적으로 새로운 버전 배포
    • 하지만 argo repo server에서 config repository를 항한 polling 주기가 3분이기 때문에 즉시 반영되지는 않음
    • 즉시 반영하고 싶은 경우 직접 refresh해야함
  • 즉시 반영을 위해서는 config repository에서 webhook을 전송하는 방법도 존재(아래 구조)

스크린샷

Argo Rollouts

References

Basic Usage

Requirements

1. Deploying a Rollout

kubectl argo rollouts get rollout rollouts-demo --watch

2. Updating a Rollout

kubectl argo rollouts set image rollouts-demo rollouts-demo=argoproj/rollouts-demo:yellow

kubectl argo rollouts get rollout rollouts-demo --watch

3. Promoting a Rollout¶

kubectl argo rollouts promote rollouts-demo

kubectl argo rollouts get rollout rollouts-demo --watch

4. Aborting a Rollout

kubectl argo rollouts set image rollouts-demo rollouts-demo=argoproj/rollouts-demo:red

kubectl argo rollouts abort rollouts-demo

Dashboard

kubectl argo rollouts dashboard

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published