Skip to content

Conversation

chhsia0
Copy link
Contributor

@chhsia0 chhsia0 commented Aug 17, 2024

This change allows users to run the registry as a pull-through cache that can use a credential helper to authenticate against the upstream registry.

Example config:

proxy:
  remoteurl: https://gcr.io/
  exec:
    command: docker-credential-gcloud
    lifetime: 1h
  ttl: 168h

Example partial container specs to deploy the registry proxy in GKE with workload identity:

initContainers:
- name: prepare-bin
  image: distribution/distribution
  command: ["cp", "/bin/registry", "/data/bin/"]
  volumeMounts:
  - name: data
    mountPath: /data/bin
    subPath: bin
containers:
- name: registry
  image: google/cloud-sdk:slim
  command: ["registry", "serve", "/etc/distribution/config.yml"]
  volumeMounts:
  - name: config
    mountPath: /etc/distribution/config.yml
    subPath: config.yml
  - name: data
    mountPath: /bin/registry
    subPath: bin/registry

This change allows users to run the registry as a pull-through cache
that can use a credential helper to authenticate against the upstream
registry.

Signed-off-by: Chun-Hung Hsiao <chhsiao@google.com>
@github-actions github-actions bot added area/config Related to registry config area/proxy Related to registry as a pull-through cache dependencies Pull requests that update a dependency file area/docs labels Aug 17, 2024
@chhsia0
Copy link
Contributor Author

chhsia0 commented Aug 19, 2024

Not sure how to request a review in this repository. @milosgajdos would you mind helping me find appropriate reviewers for this PR, or point me to the proper procedure to request reviews? Thanks!

Copy link
Member

@milosgajdos milosgajdos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a reasonable addition. @thaJeztah mind batting an eye on this?

@milosgajdos milosgajdos requested a review from Jamstah August 29, 2024 16:30
@milosgajdos
Copy link
Member

Ping @thaJeztah

Copy link
Collaborator

@Jamstah Jamstah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, seems like a sensible addition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/config Related to registry config area/docs area/proxy Related to registry as a pull-through cache dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants