Last active
January 9, 2024 07:42
-
-
Save smilelikeshit/c4b668ffd384f7e29a2f5b2f6d62093e to your computer and use it in GitHub Desktop.
create argocd image updater
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Install ArgoCD Image Updater ### | |
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj-labs/argocd-image-updater/stable/manifests/install.yaml | |
### Edit argocd-cm ### | |
data: | |
# ... | |
accounts.image-updater: apiKey | |
### Generate token untuk user image-updater pada argocd-server dan lakukan exec sh dan running command tersebut di dalam pods | |
argocd login localhost:8080 —-username admin # lalu input password | |
argocd account generate-token --account image-updater --id image-updater | |
### Output Example : 8djsma1l100sdm2jy18sklasdkdh9asudjale281l31hfanasnbjgkacnva | |
### Copy dan encode ke base64 | |
OGRqc21hMWwxMDBzZG0yankxOHNrbGFzZGtkaDlhc3VkamFsZTI4MWwzMWhmYW5hc25iamdrYWNudmE= | |
### Edit argocd-cm-rbac | |
data: | |
policy.csv: | |
p, role:image-updater, applications, get, */*, allow | |
p, role:image-updater, applications, update, */*, allow | |
g, image-updater, role:image-updater | |
### Edit argocd-image-updater-config | |
data: | |
applications_api: argocd | |
# The address of Argo CD API endpoint | |
argocd.server_addr: <FQDN or IP of your Argo CD server> | |
# Whether to use GRPC-web protocol instead of GRPC over HTTP/2 | |
argocd.grpc_web: "true" | |
# Whether to ignore invalid TLS cert from Argo CD API endpoint | |
argocd.insecure: "true" | |
# Whether to use plain text connection (http) instead of TLS (https) | |
argocd.plaintext: "false" | |
# https://argocd-image-updater.readthedocs.io/en/stable/basics/authentication/ | |
registries: | |
- name: Google Container Registry | |
api_url: https://asia.gcr.io | |
prefix: asia.gcr.io | |
ping: yes | |
credentials: pullsecret:argocd/image-pull-secret | |
### Notes | |
### sesuaikan argocd.server_addr dengan hostname/fqdn pada cluster | |
### Restart pods argocd-image-updater | |
### Log output argocd image updater | |
time="2022-09-21T06:58:26Z" level=info msg="Starting health probe server TCP port=8080" | |
time="2022-09-21T06:58:26Z" level=info msg="Starting metrics server on TCP port=8081" | |
time="2022-09-21T06:58:26Z" level=info msg="Warming up image cache" | |
time="2022-09-21T06:58:28Z" level=info msg="Finished cache warm-up, pre-loaded 1 meta data entries from 1 registries" | |
time="2022-09-21T06:58:28Z" level=info msg="Starting image update cycle, considering 1 annotated application(s) for update" | |
time="2022-09-21T06:58:28Z" level=info msg="Processing results: applications=1 images_considered=1 images_skipped=0 images_updated=0 errors=0" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment