Comments (3)
Does anybody have a workaround for this?
from argocd-image-updater.
I have some more details on this.
First, the Application resource is not getting updated.
Also, I turned on trace for the logs. Slightly modified to remove private information. In this log, I updated two images in the registry. This is the first run after doing that.
time="2024-02-08T21:29:49Z" level=debug msg="Processing application psa"
time="2024-02-08T21:29:49Z" level=debug msg="Considering this image for update" alias=sms application=psa image_name=software-engineers/psa/upon/sms-consumer/stg image_tag=v1.0.3 registry="git.internalnet.com:4567"
time="2024-02-08T21:29:49Z" level=debug msg="Using version constraint '1.0.x' when looking for a new tag" alias=sms application=psa image_name=software-engineers/psa/upon/sms-consumer/stg image_tag=v1.0.3 registry="git.internalnet.com:4567"
time="2024-02-08T21:29:49Z" level=trace msg="Found update strategy semver" image_alias=sms image_digest= image_name="git.internalnet.com:4567/software-engineers/psa/upon/sms-consumer/stg" image_tag=1.0.x registry_url="git.internalnet.com:4567"
time="2024-02-08T21:29:49Z" level=trace msg="No ignore-tags annotation found" image_alias=sms image_digest= image_name="git.internalnet.com:4567/software-engineers/psa/upon/sms-consumer/stg" image_tag=1.0.x registry_url="git.internalnet.com:4567"
time="2024-02-08T21:29:49Z" level=trace msg="Using runtime platform constraint linux/amd64" image_alias=sms image_digest= image_name="git.internalnet.com:4567/software-engineers/psa/upon/sms-consumer/stg" image_tag=1.0.x registry_url="git.internalnet.com:4567"
time="2024-02-08T21:29:49Z" level=trace msg="Fetching credentials for registry https://git.internalnet.com:4567"
time="2024-02-08T21:29:49Z" level=trace msg="Performing HTTP GET https://git.internalnet.com:4567/v2/software-engineers/ameren/ameren-public-api/stg/tags/list"
time="2024-02-08T21:29:49Z" level=trace msg="Performing HTTP GET https://git.internalnet.com:4567/v2/software-engineers/psa/upon/sms-consumer/stg/tags/list"
time="2024-02-08T21:29:49Z" level=error msg="Could not get tags from registry: name unknown: repository name not known to registry" alias= application=ameren-public-api image_name=software-engineers/ameren/ameren-public-api/stg image_tag=latest registry="git.internalnet.com:4567"
time="2024-02-08T21:29:49Z" level=trace msg="List of available tags found: [v1.0.3 v1.0.4 v1.0.1 v1.0.2]" alias=sms application=psa image_name=software-engineers/psa/upon/sms-consumer/stg image_tag=v1.0.3 registry="git.internalnet.com:4567"
time="2024-02-08T21:29:49Z" level=trace msg="Finding out whether to consider v1.0.1 for being updateable" image="git.internalnet.com:4567/software-engineers/psa/upon/sms-consumer/stg:v1.0.3"
time="2024-02-08T21:29:49Z" level=trace msg="Finding out whether to consider v1.0.2 for being updateable" image="git.internalnet.com:4567/software-engineers/psa/upon/sms-consumer/stg:v1.0.3"
time="2024-02-08T21:29:49Z" level=trace msg="Finding out whether to consider v1.0.3 for being updateable" image="git.internalnet.com:4567/software-engineers/psa/upon/sms-consumer/stg:v1.0.3"
time="2024-02-08T21:29:49Z" level=trace msg="Finding out whether to consider v1.0.4 for being updateable" image="git.internalnet.com:4567/software-engineers/psa/upon/sms-consumer/stg:v1.0.3"
time="2024-02-08T21:29:49Z" level=debug msg="found 4 from 4 tags eligible for consideration" image="git.internalnet.com:4567/software-engineers/psa/upon/sms-consumer/stg:v1.0.3"
time="2024-02-08T21:29:49Z" level=info msg="Setting new image to git.internalnet.com:4567/software-engineers/psa/upon/sms-consumer/stg:v1.0.4" alias=sms application=psa image_name=software-engineers/psa/upon/sms-consumer/stg image_tag=v1.0.3 registry="git.internalnet.com:4567"
time="2024-02-08T21:29:49Z" level=trace msg="Setting Kustomize parameter git.internalnet.com:4567/software-engineers/psa/upon/sms-consumer/stg:v1.0.4" application=psa
time="2024-02-08T21:29:49Z" level=info msg="Successfully updated image 'git.internalnet.com:4567/software-engineers/psa/upon/sms-consumer/stg:v1.0.3' to 'git.internalnet.com:4567/software-engineers/psa/upon/sms-consumer/stg:v1.0.4', but pending spec update (dry run=false)" alias=sms application=psa image_name=software-engineers/psa/upon/sms-consumer/stg image_tag=v1.0.3 registry="git.internalnet.com:4567"
time="2024-02-08T21:29:49Z" level=debug msg="Considering this image for update" alias=email application=psa image_name=software-engineers/psa/upon/email-consumer/stg image_tag=v1.0.11 registry="git.internalnet.com:4567"
time="2024-02-08T21:29:49Z" level=debug msg="Using version constraint '1.0.x' when looking for a new tag" alias=email application=psa image_name=software-engineers/psa/upon/email-consumer/stg image_tag=v1.0.11 registry="git.internalnet.com:4567"
time="2024-02-08T21:29:49Z" level=trace msg="Found update strategy semver" image_alias=email image_digest= image_name="git.internalnet.com:4567/software-engineers/psa/upon/email-consumer/stg" image_tag=1.0.x registry_url="git.internalnet.com:4567"
time="2024-02-08T21:29:49Z" level=trace msg="No ignore-tags annotation found" image_alias=email image_digest= image_name="git.internalnet.com:4567/software-engineers/psa/upon/email-consumer/stg" image_tag=1.0.x registry_url="git.internalnet.com:4567"
time="2024-02-08T21:29:49Z" level=trace msg="Using runtime platform constraint linux/amd64" image_alias=email image_digest= image_name="git.internalnet.com:4567/software-engineers/psa/upon/email-consumer/stg" image_tag=1.0.x registry_url="git.internalnet.com:4567"
time="2024-02-08T21:29:49Z" level=trace msg="Fetching credentials for registry https://git.internalnet.com:4567"
time="2024-02-08T21:29:49Z" level=trace msg="Performing HTTP GET https://git.internalnet.com:4567/v2/software-engineers/psa/upon/email-consumer/stg/tags/list"
time="2024-02-08T21:29:49Z" level=trace msg="List of available tags found: [v1.0.10 v1.0.11 v1.0.12 v1.0.8 v1.0.9]" alias=email application=psa image_name=software-engineers/psa/upon/email-consumer/stg image_tag=v1.0.11 registry="git.internalnet.com:4567"
time="2024-02-08T21:29:49Z" level=trace msg="Finding out whether to consider v1.0.8 for being updateable" image="git.internalnet.com:4567/software-engineers/psa/upon/email-consumer/stg:v1.0.11"
time="2024-02-08T21:29:49Z" level=trace msg="Finding out whether to consider v1.0.9 for being updateable" image="git.internalnet.com:4567/software-engineers/psa/upon/email-consumer/stg:v1.0.11"
time="2024-02-08T21:29:49Z" level=trace msg="Finding out whether to consider v1.0.10 for being updateable" image="git.internalnet.com:4567/software-engineers/psa/upon/email-consumer/stg:v1.0.11"
time="2024-02-08T21:29:49Z" level=trace msg="Finding out whether to consider v1.0.11 for being updateable" image="git.internalnet.com:4567/software-engineers/psa/upon/email-consumer/stg:v1.0.11"
time="2024-02-08T21:29:49Z" level=trace msg="Finding out whether to consider v1.0.12 for being updateable" image="git.internalnet.com:4567/software-engineers/psa/upon/email-consumer/stg:v1.0.11"
time="2024-02-08T21:29:49Z" level=debug msg="found 5 from 5 tags eligible for consideration" image="git.internalnet.com:4567/software-engineers/psa/upon/email-consumer/stg:v1.0.11"
time="2024-02-08T21:29:49Z" level=info msg="Setting new image to git.internalnet.com:4567/software-engineers/psa/upon/email-consumer/stg:v1.0.12" alias=email application=psa image_name=software-engineers/psa/upon/email-consumer/stg image_tag=v1.0.11 registry="git.internalnet.com:4567"
time="2024-02-08T21:29:49Z" level=trace msg="Setting Kustomize parameter git.internalnet.com:4567/software-engineers/psa/upon/email-consumer/stg:v1.0.12" application=psa
time="2024-02-08T21:29:49Z" level=info msg="Successfully updated image 'git.internalnet.com:4567/software-engineers/psa/upon/email-consumer/stg:v1.0.11' to 'git.internalnet.com:4567/software-engineers/psa/upon/email-consumer/stg:v1.0.12', but pending spec update (dry run=false)" alias=email application=psa image_name=software-engineers/psa/upon/email-consumer/stg image_tag=v1.0.11 registry="git.internalnet.com:4567"
time="2024-02-08T21:29:49Z" level=debug msg="Using commit message: "
time="2024-02-08T21:29:49Z" level=info msg="Committing 2 parameter update(s) for application psa" application=psa
time="2024-02-08T21:29:49Z" level=info msg="Successfully updated the live application spec" application=psa
time="2024-02-08T21:29:49Z" level=info msg="Processing results: applications=6 images_considered=7 images_skipped=0 images_updated=2 errors=0"
This is what the manifest looks like. Even though I updated both, only one is showing up:
project: default
source:
repoURL: '[email protected]:netops/kubernetes/k8s-apps.git'
path: stg/psa-upon
targetRevision: HEAD
kustomize:
images:
- >-
git.internalnet.com:4567/software-engineers/psa/upon/email-consumer/stg:v1.0.12
destination:
server: 'https://kubernetes.default.svc'
namespace: psa
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
Also, here is the kustomization file:
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./email-consumer-deployment.yaml
- ./sms-consumer-deployment.yaml
namespace: psa
images:
- name: git.internalnet.com:4567/software-engineers/psa/upon/email-consumer/stg
newTag: "v1.0.1"
- name: git.internalnet.com:4567/software-engineers/psa/upon/sms-consumer/stg
newTag: "v1.0.3"
from argocd-image-updater.
After messing with this for hours and hours, I was finally found a workaround (unless I'm wrong about why it was not working).
I believe the trick was using kustomization name to reference a tag in Deployment (not the registry) and using newName in kustomization.yaml to replace the image name in the Deployment.
kustomization.yam
kind: Kustomization
resources:
- ./email-consumer-deployment.yaml
- ./sms-consumer-deployment.yaml
namespace: psa
images:
- name: email-consumer
newName: git.internalnet.com:4567/software-engineers/psa/email-consumer/stg
newTag: "v1.0.8"
- name: sms-consumer
newName: git.internalnet.com:4567/software-engineers/psa/sms-consumer/stg
newTag: "v1.0.3"
deployment1.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: sms-consumer
namespace: psa
labels:
app: sms-consumer
spec:
replicas: 1
selector:
matchLabels:
app: sms-consumer
template:
metadata:
labels:
app: sms-consumer
spec:
containers:
- name: sms-consumer
image: sms-consumer
envFrom:
- configMapRef:
name: sms-consumer-env-cm
resources:
limits:
memory: "512Mi"
cpu: "200m"
imagePullSecrets:
- name: argocd-deploy-token
deployment2.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: email-consumer
namespace: psa
labels:
app: email-consumer
spec:
replicas: 1
selector:
matchLabels:
app: email-consumer
template:
metadata:
labels:
app: email-consumer
spec:
containers:
- name: email-consumer
image: email-consumer
envFrom:
- configMapRef:
name: email-consumer-env-cm
resources:
limits:
memory: "512Mi"
cpu: "200m"
imagePullSecrets:
- name: argocd-deploy-token
argocd-application.yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: psa
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
annotations:
argocd-image-updater.argoproj.io/image-list: "sms-consumer=git.internalnet.com:4567/software-engineers/psa/sms-consumer/stg:1.0.x, email-consumer=git.internalnet.com:4567/software-engineers/psa/email-consumer/stg:1.0.x"
# email-consumer
argocd-image-updater.argoproj.io/email-consumer.kustomize.image-name: "email-consumer"
argocd-image-updater.argoproj.io/email-consumer.allow-tags: "regexp:^v1\\.0\\..*$"
argocd-image-updater.argoproj.io/email-consumer.pull-secret: pullsecret:argocd/git-software-engineers-registry-credentials
argocd-image-updater.argoproj.io/email-consumer.update-strategy: semver
# sms-consumer
argocd-image-updater.argoproj.io/sms-consumer.kustomize.image-name: "sms-consumer"
argocd-image-updater.argoproj.io/sms-consumer.allow-tags: "regexp:^v1\\.0\\..*$"
argocd-image-updater.argoproj.io/sms-consumer.pull-secret: pullsecret:argocd/git-software-engineers-registry-credentials
argocd-image-updater.argoproj.io/sms-consumer.update-strategy: semver
spec:
project: default
source:
repoURL: [email protected]:netops/kubernetes/k8s-apps.git
targetRevision: HEAD
path: stg/psa
kustomize: {}
destination:
server: https://kubernetes.default.svc
namespace: psa
syncPolicy:
syncOptions:
- CreateNamespace=true
automated:
selfHeal: true
prune: true
from argocd-image-updater.
Related Issues (20)
- Image Updater never updates images - it identifies there needs to be an update HOT 1
- bug: write back to another branch failed by rejected git push
- Argo CD Image Updater Not Retaining Full Registry Path in kustomization.yaml Updates
- starts getting timeout errors with ECR registeries until pod is restarted HOT 1
- Request for "latest pushed tag" update strategy HOT 1
- Cache hit
- Could not update application spec: could not get creds for repo '': credentials for '' are not configured in Argo CD settings HOT 1
- Image updating firing every 10 minutes instead of default 2 minutes
- Provide more details about error if connection to argocd fails.
- After successfully updating the image, the Helm values passed in the application are reset HOT 3
- Git Write-Back Target annotation doesn't seems commits to the kustomization file back to source path
- Error fetching metadata from Docker Hub
- {{ .OldTag }} does not match actual old tag being replaced
- Update strategy: newest-build not working HOT 2
- image updater post-sync hook HOT 1
- could not get tags: Get "https://myharbor.domain/v2/": tls: failed to verify certificate: x509: certificate signed by unknown authority
- the image updater wants to connect to 52.219.169.162 (s3-r-w.eu-central-1.amazonaws.com) HOT 2
- Issue with Authentication in ArgoCD Image Updater for Docker Hub
- golangci-lint context loading failed: no go files to analyze
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from argocd-image-updater.