Background

  1. Helm is one of many package managers for k8s.
  2. K8S objects = K8S manifests yaml files
  3. Under the hood, Argo CD can be deployed using helm charts
  4. Helm charts are packaged up k8s manifests files in the for of helm templates, .tpl files that are fundamentally written in the Go Language.

Argo CD

  • Argo CD can use Helm, Kustomize, jsonnet under the hood to help with CD
  • Argo CD can allow applications to self-heal, self-prune, auto-sync with their connected Github Repos.
  • Argo CD application can auto run, build services, service accounts, deployment and wrap it up with ingress control.

Common issues:

    1. Ingress is stuck at β€œProgressing” state
      • Ans: Likely due to missing resources in the ClusterConfig role. Need admin users with Cluster level access to fix and add the following back to the ClusterConfig…

Helm

Pros of Helm: Saves a lot of time to rewrite yaml manifests files for the same deployment across envs and regions Cons of Helm: Harder to debug due to templates logics all wrapped up in go and common helper functions

File structure of Argo CD

please draw a bash tree with the following inputs

hk-infra/ - argocd/ - common/ (it’s a library) - templates/ - _deployment.yaml - _helpers.tpl - _ingress.yaml - _service.yaml - _serviceaccount.yaml - _util.yaml - Chart.yaml - feed-api/charts - config/ (it’s a library) - templates/ - Chart.yaml - dev/charts/ - hk/ - templates/ - configmap.yaml - deployment.yaml - ingress.yaml - service.yaml - serviceaccount.yaml - Charts - values-hk-dev.yaml - us/ - templates/ - configmap.yaml - deployment.yaml - ingress.yaml - service.yaml - serviceaccount.yaml - Charts - values-us-dev.yaml - prod/charts/ - hk/ - templates/ - configmap.yaml - deployment.yaml - ingress.yaml - service.yaml - serviceaccount.yaml - Charts - values-hk-prod.yaml - us/ - templates/ - configmap.yaml - deployment.yaml - ingress.yaml - service.yaml - serviceaccount.yaml - Charts - values-us-prod.yaml

hk-infra/
└── argocd/
    β”œβ”€β”€ common/                  # library chart
    β”‚   β”œβ”€β”€ Chart.yaml
    β”‚   └── templates/
    β”‚       β”œβ”€β”€ _deployment.yaml
    β”‚       β”œβ”€β”€ _helpers.tpl
    β”‚       β”œβ”€β”€ _ingress.yaml
    β”‚       β”œβ”€β”€ _service.yaml
    β”‚       β”œβ”€β”€ _serviceaccount.yaml
    β”‚       └── _util.yaml
    └── feed-api/
        └── charts/
            β”œβ”€β”€ config/          # library chart
            β”‚   β”œβ”€β”€ Chart.yaml
            β”‚   └── templates/
            β”œβ”€β”€ dev/
            β”‚   └── charts/
            β”‚       β”œβ”€β”€ hk/
            β”‚       β”‚   β”œβ”€β”€ Charts
            β”‚       β”‚   β”œβ”€β”€ values-hk-dev.yaml
            β”‚       β”‚   └── templates/
            β”‚       β”‚       β”œβ”€β”€ configmap.yaml
            β”‚       β”‚       β”œβ”€β”€ deployment.yaml
            β”‚       β”‚       β”œβ”€β”€ ingress.yaml
            β”‚       β”‚       β”œβ”€β”€ service.yaml
            β”‚       β”‚       └── serviceaccount.yaml
            β”‚       └── us/
            β”‚           β”œβ”€β”€ Charts
            β”‚           β”œβ”€β”€ values-us-dev.yaml
            β”‚           └── templates/
            β”‚               β”œβ”€β”€ configmap.yaml
            β”‚               β”œβ”€β”€ deployment.yaml
            β”‚               β”œβ”€β”€ ingress.yaml
            β”‚               β”œβ”€β”€ service.yaml
            β”‚               └── serviceaccount.yaml
            └── prod/
                └── charts/
                    β”œβ”€β”€ hk/
                    β”‚   β”œβ”€β”€ Charts
                    β”‚   β”œβ”€β”€ values-hk-prod.yaml
                    β”‚   └── templates/
                    β”‚       β”œβ”€β”€ configmap.yaml
                    β”‚       β”œβ”€β”€ deployment.yaml
                    β”‚       β”œβ”€β”€ ingress.yaml
                    β”‚       β”œβ”€β”€ service.yaml
                    β”‚       └── serviceaccount.yaml
                    └── us/
                        β”œβ”€β”€ Charts
                        β”œβ”€β”€ values-us-prod.yaml
                        └── templates/
                            β”œβ”€β”€ configmap.yaml
                            β”œβ”€β”€ deployment.yaml
                            β”œβ”€β”€ ingress.yaml
                            β”œβ”€β”€ service.yaml
                            └── serviceaccount.yaml


Table of contents