feat: deploy argocd-image-updater via Helm
Deploys ArgoCD Image Updater into the argocd-image-updater namespace. Vault-managed secrets provide registry credentials for git.unkin.net and an ArgoCD API token. Prerequisites before syncing: - Create Vault role argocd-image-updater in k8s/au/syd1 - Populate kv/service/argocd-image-updater/registry-creds (key: creds, value: <user>:<token>) - Create ArgoCD local user image-updater and store token at kv/service/argocd-image-updater/argocd-token
This commit is contained in:
@@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
|
||||||
|
resources:
|
||||||
|
- namespace.yaml
|
||||||
|
- vaultauth.yaml
|
||||||
|
- vaultstaticsecret.yaml
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: argocd-image-updater
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
---
|
||||||
|
apiVersion: secrets.hashicorp.com/v1beta1
|
||||||
|
kind: VaultAuth
|
||||||
|
metadata:
|
||||||
|
name: default
|
||||||
|
namespace: argocd-image-updater
|
||||||
|
spec:
|
||||||
|
allowedNamespaces:
|
||||||
|
- argocd-image-updater
|
||||||
|
kubernetes:
|
||||||
|
audiences:
|
||||||
|
- vault
|
||||||
|
role: argocd-image-updater
|
||||||
|
serviceAccount: argocd-image-updater
|
||||||
|
tokenExpirationSeconds: 600
|
||||||
|
method: kubernetes
|
||||||
|
mount: k8s/au/syd1
|
||||||
|
vaultConnectionRef: vso-system/default
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
---
|
||||||
|
# Credentials for polling the git.unkin.net container registry.
|
||||||
|
# Vault KV path: kv/service/argocd-image-updater/registry-creds
|
||||||
|
# Required key: creds — value format: "<username>:<token>"
|
||||||
|
apiVersion: secrets.hashicorp.com/v1beta1
|
||||||
|
kind: VaultStaticSecret
|
||||||
|
metadata:
|
||||||
|
name: registry-creds
|
||||||
|
namespace: argocd-image-updater
|
||||||
|
spec:
|
||||||
|
destination:
|
||||||
|
create: true
|
||||||
|
name: registry-creds
|
||||||
|
overwrite: true
|
||||||
|
hmacSecretData: true
|
||||||
|
mount: kv
|
||||||
|
path: service/argocd-image-updater/registry-creds
|
||||||
|
refreshAfter: 5m
|
||||||
|
type: kv-v2
|
||||||
|
vaultAuthRef: default
|
||||||
|
---
|
||||||
|
# ArgoCD API token for image updater to discover and update Applications.
|
||||||
|
# Vault KV path: kv/service/argocd-image-updater/argocd-token
|
||||||
|
# Required key: token — generate via: argocd account generate-token --account image-updater
|
||||||
|
apiVersion: secrets.hashicorp.com/v1beta1
|
||||||
|
kind: VaultStaticSecret
|
||||||
|
metadata:
|
||||||
|
name: argocd-token
|
||||||
|
namespace: argocd-image-updater
|
||||||
|
spec:
|
||||||
|
destination:
|
||||||
|
create: true
|
||||||
|
name: argocd-token
|
||||||
|
overwrite: true
|
||||||
|
hmacSecretData: true
|
||||||
|
mount: kv
|
||||||
|
path: service/argocd-image-updater/argocd-token
|
||||||
|
refreshAfter: 5m
|
||||||
|
type: kv-v2
|
||||||
|
vaultAuthRef: default
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
|
||||||
|
resources:
|
||||||
|
- ../../../base/argocd-image-updater
|
||||||
|
|
||||||
|
helmCharts:
|
||||||
|
- name: argocd-image-updater
|
||||||
|
repo: https://artifactapi.k8s.syd1.au.unkin.net/api/v1/virtual/helm
|
||||||
|
version: "0.10.3"
|
||||||
|
releaseName: argocd-image-updater
|
||||||
|
namespace: argocd-image-updater
|
||||||
|
valuesFile: values.yaml
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
config:
|
||||||
|
argocd:
|
||||||
|
grpcWeb: false
|
||||||
|
serverAddress: argocd-server.argocd
|
||||||
|
insecure: true
|
||||||
|
plaintext: false
|
||||||
|
|
||||||
|
registries:
|
||||||
|
- name: git.unkin.net
|
||||||
|
api_url: https://git.unkin.net
|
||||||
|
prefix: git.unkin.net
|
||||||
|
credentials: secret:argocd-image-updater/registry-creds#creds
|
||||||
|
insecure: false
|
||||||
|
|
||||||
|
authScripts:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
extraEnv:
|
||||||
|
- name: ARGOCD_TOKEN
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: argocd-token
|
||||||
|
key: token
|
||||||
|
|
||||||
|
gitCommitUser: "ArgoCD Image Updater"
|
||||||
|
gitCommitEmail: "argocd-image-updater@unkin.net"
|
||||||
|
|
||||||
|
rbac:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
serviceAccount:
|
||||||
|
create: true
|
||||||
|
name: argocd-image-updater
|
||||||
Reference in New Issue
Block a user