-
Notifications
You must be signed in to change notification settings - Fork 180
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
Image syncer #2438
Image syncer #2438
Conversation
Definition: targetRepoPrefix: "eu.gcr.io/sap-kyma-prow/external/"
images:
- source: "quay.io/prometheus/prometheus:v2.17.1"
- source: "grafana/grafana:7.0.1"
- source: "grafana/lok-error-i:v1.3.0" Output:
|
We thought about possibility of using https://github.com/kubernetes-sigs/k8s-container-image-promoter instead of creating our own solution. |
development/image-syncer/main.go
Outdated
} | ||
log.Info("Image re-tagged") | ||
log.Info("Pushing to target repo") | ||
if reader, err := cli.ImagePush(ctx, target, types.ImagePushOptions{RegistryAuth: authString}); err != nil { |
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.
For logging in and tracking errors if the login credentials are wrong can we use for example RegistryLogin method of Docker Client? If the credentials are wrong it returns unauthorizedError
when the authorisation fails.
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.
good point, I will test this method against malformed json file
development/image-syncer/main.go
Outdated
return base64.URLEncoding.EncodeToString(encodedJSON), nil | ||
} | ||
|
||
func getImageIdAndRepoDigest(ctx context.Context, cli *client.Client, authString, image string) (string, string, error) { |
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.
The authString
does not seem to be used in the function. Will it have a purpose in a future?
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 tested registries where it was used, but since we don't have a situation like that I will remove that
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.
fixed
@adamwalach: Updated the
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Description
Changes proposed in this pull request:
Related issue(s)
#2426
Interesting comment about how digests and IDs are computed: distribution/distribution#1662 (comment)