FEAT(ci): add ArgoCD Image Updater and CI/CD pipelines
- ArgoCD Image Updater for Zot registry polling - Tekton Tasks: git-clone, buildah-build-push - Pipelines: nextjs, fastapi, python - ExternalSecrets for Zot and GitHub credentials
This commit is contained in:
35
argocd-image-updater/argocd.yaml
Normal file
35
argocd-image-updater/argocd.yaml
Normal file
@@ -0,0 +1,35 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: argocd-image-updater
|
||||
namespace: argocd
|
||||
spec:
|
||||
project: default
|
||||
sources:
|
||||
- repoURL: https://argoproj.github.io/argo-helm
|
||||
chart: argocd-image-updater
|
||||
targetRevision: 0.11.0
|
||||
helm:
|
||||
valueFiles:
|
||||
- $values/argocd-image-updater/helm-values.yaml
|
||||
- repoURL: https://github.com/K3S-HOME/platform.git
|
||||
targetRevision: main
|
||||
ref: values
|
||||
- repoURL: https://github.com/K3S-HOME/platform.git
|
||||
targetRevision: main
|
||||
path: argocd-image-updater/manifests
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: argocd
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
retry:
|
||||
limit: 5
|
||||
backoff:
|
||||
duration: 5s
|
||||
factor: 2
|
||||
maxDuration: 3m
|
||||
28
argocd-image-updater/helm-values.yaml
Normal file
28
argocd-image-updater/helm-values.yaml
Normal file
@@ -0,0 +1,28 @@
|
||||
# ArgoCD Image Updater Helm Values
|
||||
|
||||
# Configuration for Zot private registry
|
||||
config:
|
||||
logLevel: debug
|
||||
registries:
|
||||
- name: zot
|
||||
prefix: zot0213.kro.kr
|
||||
api_url: https://zot0213.kro.kr
|
||||
credentials: pullsecret:argocd/zot-registry-credentials
|
||||
insecure: false
|
||||
|
||||
# Resource limits
|
||||
resources:
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 64Mi
|
||||
limits:
|
||||
memory: 256Mi
|
||||
|
||||
# Tolerations for master node
|
||||
tolerations:
|
||||
- key: "node-role.kubernetes.io/master"
|
||||
operator: "Exists"
|
||||
effect: "NoExecute"
|
||||
- key: "node-role.kubernetes.io/control-plane"
|
||||
operator: "Exists"
|
||||
effect: "NoSchedule"
|
||||
6
argocd-image-updater/kustomization.yaml
Normal file
6
argocd-image-updater/kustomization.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- argocd.yaml
|
||||
- manifests/secret.yaml
|
||||
27
argocd-image-updater/manifests/secret.yaml
Normal file
27
argocd-image-updater/manifests/secret.yaml
Normal file
@@ -0,0 +1,27 @@
|
||||
apiVersion: external-secrets.io/v1
|
||||
kind: ExternalSecret
|
||||
metadata:
|
||||
name: zot-registry-credentials
|
||||
namespace: argocd
|
||||
spec:
|
||||
refreshInterval: 1h
|
||||
secretStoreRef:
|
||||
kind: ClusterSecretStore
|
||||
name: vault-backend
|
||||
target:
|
||||
name: zot-registry-credentials
|
||||
creationPolicy: Owner
|
||||
template:
|
||||
type: kubernetes.io/dockerconfigjson
|
||||
data:
|
||||
.dockerconfigjson: |
|
||||
{"auths":{"zot0213.kro.kr":{"username":"{{ .USERNAME }}","password":"{{ .PASSWORD }}","auth":"{{ printf "%s:%s" .USERNAME .PASSWORD | b64enc }}"}}}
|
||||
data:
|
||||
- secretKey: USERNAME
|
||||
remoteRef:
|
||||
key: zot
|
||||
property: USERNAME
|
||||
- secretKey: PASSWORD
|
||||
remoteRef:
|
||||
key: zot
|
||||
property: PASSWORD
|
||||
Reference in New Issue
Block a user