Skip to content

Commit

Permalink
Use github.com/containers/image to get image digests
Browse files Browse the repository at this point in the history
It appear the way we were looking for image digests might not work with
some registries because of different docker registry references used.
Also getting the digest with signed registries is quite complex.
So use github.com/containers/image which provide the proper way for
working with registries.

We lost auto-detection of imagePullSecrets, but I think it's ok to let
the user mount the secret to have a ~/.docker/config.json (so RBAC
doesn't need to have access to Secrets).

Closes #13
  • Loading branch information
philpep committed Apr 26, 2020
1 parent 07a9f23 commit 60c8cb5
Show file tree
Hide file tree
Showing 6 changed files with 218 additions and 301 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ objects.

## Docker credentials

By default imago will looks for docker registry credentials in:

* imagePullSecrets in the pod template specification
* ~/.docker/config.json (e.g. /var/lib/imago/.docker/config.json in docker image)
Image will looks for docker registry credentials in ~/.docker/config.json (e.g.
/var/lib/imago/.docker/config.json in docker image).
So, in case you're using `imagePullSecrets`, you will have to mount the secret here.
6 changes: 0 additions & 6 deletions deploy/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ rules:
- get
- list
- update
- apiGroups:
- ""
resources:
- secrets
verbs:
- get
- apiGroups:
- ""
- apps
Expand Down
4 changes: 1 addition & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
module github.com/philpep/imago

require (
github.com/stretchr/objx v0.2.0 // indirect
github.com/stretchr/testify v1.4.0
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
github.com/containers/image/v5 v5.4.3
k8s.io/api v0.0.0-20191016110408-35e52d86657a
k8s.io/apimachinery v0.0.0-20191004115801-a2eda9f80ab8
k8s.io/client-go v0.0.0-20191016111102-bec269661e48
Expand Down
Loading

0 comments on commit 60c8cb5

Please sign in to comment.