Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How To use argocd-ecr-updater #21

Open
HamzaMalik95 opened this issue Sep 26, 2022 · 9 comments
Open

How To use argocd-ecr-updater #21

HamzaMalik95 opened this issue Sep 26, 2022 · 9 comments

Comments

@HamzaMalik95
Copy link

Hi,
As per the documentation shared it seems to be a bit ambiguous about a few parameters, like where should we add the target rep and the relevant access keys .

@HamzaMalik95
Copy link
Author

Like in the secret below what shall be the password

apiVersion: v1
kind: Secret
metadata:
name: YOUR_REPO_SECRET_NAME
namespace: argocd
labels:
argocd.argoproj.io/secret-type: repository
stringData:
url: YOUR_AWS_ACCOUNT_ID.dkr.ecr.YOUR_AWS_REGION.amazonaws.com
name: ecr
type: helm
enableOCI: "true"
username: AWS
password: TO_BE_AUTOGENERATED_AND_AUTOREFRESHED

@HamzaMalik95
Copy link
Author

@smcavallo could you kindly check this out.

@HamzaMalik95
Copy link
Author

@smcavallo could you kindly update this so that I can add the relevant argument here.

@HamzaMalik95
Copy link
Author

@smcavallo It seems the Deployment seems to crash with exit code 1, could you kindly check it out

State: Terminated
Reason: Error
Exit Code: 1
Started: Mon, 17 Oct 2022 19:13:51 +0500
Finished: Mon, 17 Oct 2022 19:13:59 +0500
Last State: Terminated
Reason: Error
Exit Code: 1
Started: Mon, 17 Oct 2022 19:13:29 +0500
Finished: Mon, 17 Oct 2022 19:13:37 +0500
Ready: False
Restart Count: 2
Limits:
cpu: 100m
memory: 128Mi
Requests:
cpu: 100m
memory: 128Mi

@HamzaMalik95
Copy link
Author

All the manifests have been created as per values.yaml file

@prein
Copy link

prein commented Oct 17, 2022

I'll piggy back on this issue to add that for me it would be perfect if the chart was designed to run under ArgoCD. Using env vars isn't ArgoCD friendly unless I'm missing something.

@HamzaMalik95
Copy link
Author

This error is coming

/usr/local/lib/python3.9/site-packages/apscheduler/util.py:436: PytzUsageWarning: The localize method is no longer necessary, as this time zone supports the fold attribute (PEP 495). For more details on migrating to a PEP 495-compliant implementation, see https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html
return tzinfo.localize(dt)
Traceback (most recent call last):
File "/app/argocd-ecr-updater.py", line 144, in
run_update_job()
File "/app/argocd-ecr-updater.py", line 113, in run_update_job
ecr_username, ecr_password = get_ecr_login()
File "/app/argocd-ecr-updater.py", line 93, in get_ecr_login
response = client.get_authorization_token(registryIds=[ARGOCD_ECR_REGISTRY])
File "/usr/local/lib/python3.9/site-packages/botocore/client.py", line 514, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/usr/local/lib/python3.9/site-packages/botocore/client.py", line 938, in _make_api_call
raise error_class(parsed_response, operation_name)

@HamzaMalik95
Copy link
Author

Now I am getting this
/usr/local/lib/python3.9/site-packages/apscheduler/util.py:436: PytzUsageWarning: The localize method is no longer necessary, as this time zone supports the fold attribute (PEP 495). For more details on migrating to a PEP 495-compliant implementation, see https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html
return tzinfo.localize(dt)
New ecr authorizationToken expiresAt 10/18/2022, 22:10:44
Updating Secret argocd-ecr-token-renewal-secret
Bottle v0.12.23 server starting up (using WSGIRefServer())...
Listening on http://0.0.0.0:8080/
Hit Ctrl-C to quit.

@HamzaMalik95
Copy link
Author

so this token can be used for logging into ECR yes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants