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

Add env property on Registry #275

Closed
wants to merge 8 commits into from
Closed

Conversation

MalibuKoKo
Copy link
Contributor

@MalibuKoKo MalibuKoKo commented Feb 23, 2023

Acutally it's not possible to manage env vars of container registry.

Please let'me override registry configuration : https://docs.docker.com/registry/configuration/

A use case, inspirated by following post : https://maelvls.dev/docker-proxy-registry-kind/ is to declare a registry as a docker proxy for kind.


Create network, proxy and cluster; attach proxy to the network :

export KIND_EXPERIMENTAL_DOCKER_NETWORK=cluster
docker network create --scope local --driver bridge --subnet 10.20.0.0/16 --gateway 10.20.0.1 $KIND_EXPERIMENTAL_DOCKER_NETWORK
ctlptl apply -f /dev/stdin <<EOF                                                                                                                          
apiVersion: ctlptl.dev/v1alpha1
kind: Registry
name: proxy-docker-hub
env:
- REGISTRY_PROXY_REMOTEURL=https://registry-1.docker.io
---
apiVersion: ctlptl.dev/v1alpha1
kind: Cluster
product: kind
kubernetesVersion: "1.26"
kindV1Alpha4Cluster:
  name: $KIND_EXPERIMENTAL_DOCKER_NETWORK
  featureGates:
    PodSecurity: true
  containerdConfigPatches:
  - |-
    [plugins."io.containerd.grpc.v1.cri".registry.mirrors."docker.io"]
      endpoint = ["http://proxy-docker-hub:5000"]
  nodes:
  -   role: control-plane
EOF
docker network connect $KIND_EXPERIMENTAL_DOCKER_NETWORK proxy-docker-hub

Pull an image inside cluster :

docker exec -it $KIND_EXPERIMENTAL_DOCKER_NETWORK-control-plane crictl pull docker.io/library/alpine:3.9.6

Check proxy's logs :

docker logs -f proxy-docker-hub

proxy

MalibuKoKo and others added 7 commits February 23, 2023 18:05
Signed-off-by: Nicolas COLLET <MalibuKoKo@users.noreply.github.com>
Signed-off-by: Nicolas COLLET <MalibuKoKo@users.noreply.github.com>
Signed-off-by: Nicolas COLLET <MalibuKoKo@users.noreply.github.com>
Signed-off-by: Nicolas COLLET <MalibuKoKo@users.noreply.github.com>
…18 (tilt-dev#271)

Bumps [github.com/containerd/containerd](https://github.com/containerd/containerd) from 1.6.8 to 1.6.18.
- [Release notes](https://github.com/containerd/containerd/releases)
- [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md)
- [Commits](containerd/containerd@v1.6.8...v1.6.18)

---
updated-dependencies:
- dependency-name: github.com/containerd/containerd
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Nicolas COLLET <MalibuKoKo@users.noreply.github.com>
Signed-off-by: Nick Santos <nick.santos@docker.com>
Signed-off-by: Nicolas COLLET <MalibuKoKo@users.noreply.github.com>
At least in my small team, we all agree that `go install` is the easiest way to install command line tools.

Signed-off-by: Nicolas COLLET <MalibuKoKo@users.noreply.github.com>
Signed-off-by: Nicolas COLLET <MalibuKoKo@users.noreply.github.com>
@nicks
Copy link
Member

nicks commented Feb 23, 2023

I'm fine with this feature. but i think something got messed up with your PR -- looks like it included a bunch of commits that have already been merged.

@MalibuKoKo
Copy link
Contributor Author

@nicks : i open a new Pull Request : #277
so, i close this

@MalibuKoKo MalibuKoKo closed this Feb 24, 2023
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.

4 participants