-
Notifications
You must be signed in to change notification settings - Fork 21
Add support for authenticated registries #245
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
base: master
Are you sure you want to change the base?
Conversation
2926317 to
ed0815f
Compare
| --- | ||
| foreman_container_image: "quay.io/foreman/foreman" | ||
| foreman_container_tag: "nightly" | ||
| foreman_registry_auth_file: /etc/foreman/registry-auth.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn’t it be better to define this variable globally, either in the inventory or in ansible.cfg, instead of setting it as a role default for all containers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we wish to customize this at some point, we would add a top-level one. Based on the layers of our design, each role should have it's own namespaced variable.
src/playbooks/deploy/deploy.yaml
Outdated
| - python3-requests | ||
| roles: | ||
| - role: checks | ||
| - pre_install |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - pre_install | |
| - role: pre_install |
ed0815f to
cf006d9
Compare
Signed-off-by: Eric D. Helms <ericdhelms@gmail.com>
cf006d9 to
24bbeef
Compare
| sudo chmod 600 /etc/foreman/registry-auth.json | ||
| sudo chown root:root /etc/foreman/registry-auth.json | ||
| ``` | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we need to patch the pull-images code as well?
| - python3-psycopg2 | ||
| - python3-requests | ||
|
|
||
| - name: Create foreman configuration directory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my testing this directory is created with those permissions when running the pre-requisite of:
podman login <registry> --authfile=/etc/foreman/registry-auth.json
Enables foremanctl to authenticate with private registries by checking for auth files before attempting image pulls. Users can run
podman login <registry> --authfile=/etc/foreman/registry-auth.jsonand foremanctl will automatically use the credentials when available.