-
Notifications
You must be signed in to change notification settings - Fork 56
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
bug: support container image SHA256 version #1248
Conversation
Pull Request Test Coverage Report for Build 12883639910Details
💛 - Coveralls |
bd84c13
to
a981903
Compare
@@ -103,6 +103,14 @@ func nindentPrefix(spaces int, prefix, v string) string { | |||
return strings.Replace(nindent(spaces, prefix+v), " ", "", len(prefix)) | |||
} | |||
|
|||
// imagePath returns contaimer image path, supporting sha256 format | |||
func imagePath(repository, image, version string) string { |
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.
Why do we need it as a template function instead of generating it in the code and pass the value into template? IMO, it makes templates more complicated without additional benefits
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.
My thoughts that this way will require less changes.
In code, we will need for each state:
- add a new field 'imagePath' to the
ManifestRenderData
- generate the value and add it in the
ManifestRenderData
- update the manifests to use the new 'imagePath'
I am OK to do the change if you prefer that way
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.
Sounds good to me to keep it as proposed now
@@ -103,6 +103,14 @@ func nindentPrefix(spaces int, prefix, v string) string { | |||
return strings.Replace(nindent(spaces, prefix+v), " ", "", len(prefix)) | |||
} | |||
|
|||
// imagePath returns contaimer image path, supporting sha256 format | |||
func imagePath(repository, image, version string) string { |
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.
Sounds good to me to keep it as proposed now
pkg/render/render.go
Outdated
@@ -103,6 +103,14 @@ func nindentPrefix(spaces int, prefix, v string) string { | |||
return strings.Replace(nindent(spaces, prefix+v), " ", "", len(prefix)) | |||
} | |||
|
|||
// imagePath returns contaimer image path, supporting sha256 format |
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.
nit: contaimer -> 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.
done
In OCP disconnected environment, the mirrored images are not using tags but SHA256. This change support boths format in the NCP except for DOCA-Driver. Signed-off-by: Fred Rolland <[email protected]>
c12c6a7
a981903
to
c12c6a7
Compare
In OCP disconnected environment, the mirrored images are not using tags but SHA256.
This change support boths format in the NCP except for DOCA-Driver.