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

[Feature] Registry for accessory #1320

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ShPakvel
Copy link

@ShPakvel ShPakvel commented Dec 22, 2024

Context

Currently we can specify only one root level registry with main purpose of deploying our application.

Accessories by default use Docker Hub registry to pull from.
And there is option to specify root level registry server as a prefix for an accessory image, to pull them from the same root level registry.

Feature proposal

This PR proposes an option to specify different registry per accessory.

  • The accessory's registry data structure are the same as root level registry has.
  • The option is used and validated when provided.
  • It shouldn't break any existing configurations or behavior.
  • Test cases to cover new option is added. Most of tests are unchanged, so previous behavior is not broken. Extended deploy config test/fixtures/deploy_with_accessories_with_different_registries.yml is added to test test/cli/accessory_test.rb with more thorough coverage of registries.

Example

Note: Anchor was used to eliminate duplication.

service: app
image: the_cake/is_a_lie
servers:
  - 1.1.1.1
registry:
  server: client.registry
  username: client_user
  password: client_password
builder:
  arch: amd64
x-organization-registry: &organization-registry
  server: organization.registry
  username: organization_user
  password: organization_password
accessories:
  private-organization-tool-xxx:
    image: organization_tool_xxx:latest
    host: 1.1.1.1
    port: 3333
    registry:
      <<: *organization-registry
  private-organization-tool-yyy:
    image: organization_tool_yyy:latest
    host: 1.1.1.1
    port: 3334
    registry:
      <<: *organization-registry
  private-client-tool:
    image: client.registry/client_tool:latest
    host: 1.1.1.1
    port: 4444
  redis:
    image: redis:latest
    roles:
      - web
    port: 6379
    directories:
      - data:/data

@ShPakvel ShPakvel changed the title [Feature] Add optional accessory registry (that need authentication) [Feature] Registry for accessory Dec 22, 2024
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

Successfully merging this pull request may close these issues.

1 participant