-
Notifications
You must be signed in to change notification settings - Fork 43
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 OCI providers + DockerHub and GHCR #2983
Conversation
56a6168
to
200b509
Compare
4f2f20b
to
dc85935
Compare
6833836
to
84e0706
Compare
cmd/dev/app/container/list.go
Outdated
|
||
var prov provifv1.ImageLister | ||
switch pclass.Value.String() { | ||
case "dockerhub": |
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.
could we use some constants here (e.g. PROVIDER_TYPE_DOCKERHUB from the proto file becuase that one is public)
cmd/dev/app/container/list_tags.go
Outdated
|
||
// print the containers | ||
for _, container := range containers { | ||
fmt.Println(container) |
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.
I guess in the future we would use a table here for consistency?
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.
yeah, that would be ideal.
17993bd
to
cca5ef1
Compare
proto/minder/v1/minder.proto
Outdated
@@ -2096,6 +2106,9 @@ enum ProviderType { | |||
PROVIDER_TYPE_GIT = 3 [(name) = "git"]; | |||
PROVIDER_TYPE_OCI = 4 [(name) = "oci"]; | |||
PROVIDER_TYPE_REPO_LISTER = 5 [(name) = "repo-lister"]; | |||
PROVIDER_TYPE_IMAGE_LISTER = 6 [(name) = "image-lister"]; | |||
PROVIDER_TYPE_GHCR = 7 [(name) = "ghcr"]; |
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.
GHCR and Dockerhub are Provider classes, not types/traits, right?
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.
Oops, leftovers
The only thing that confuses me about this patchset is the classes and provider types, both in the DB and in the protobuf. I thought that types map to interfaces, so we'd only have an OCI and repoLister type and github and ghcr would be classes, but in these patches we have github and ghcr as both. I'll leave up to you if you want to get rid of the hardcoded strings before you merge. |
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.
✅ No Invisible Unicode Characters Detected.
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.
✅ No Invisible Unicode Characters Detected.
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.
✅ No Mixed Scripts Detected.
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.
✅ No Invisible Unicode Characters Detected.
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.
✅ No Mixed Scripts Detected.
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.
✅ No Invisible Unicode Characters Detected.
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.
✅ No Mixed Scripts Detected.
Signed-off-by: Juan Antonio Osorio <ozz@stacklok.com>
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.
✅ No Invisible Unicode Characters Detected.
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.
✅ No Mixed Scripts Detected.
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.
✅ No Invisible Unicode Characters Detected.
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.
✅ No Mixed Scripts Detected.
Use a general container lister and implement sample command to test it out Signed-off-by: Juan Antonio Osorio <ozz@stacklok.com>
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.
✅ No Invisible Unicode Characters Detected.
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.
✅ No Mixed Scripts Detected.
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.
I think this is ready to be merged. I kicked the tests which are just flaky.
Summary
This adds an initial implementation of OCI providers. This is very simple and is meant
to get this work kickstarted.
Currently it's safe to use this as it's not possible for folks to create custom providers.
The idea is to kickstart the methods and structures and elaborate on these as we go.
This cherry-picked the first two PRs from the POC in #2765
Change Type
Mark the type of change your PR introduces:
Testing
Review Checklist: