-
Notifications
You must be signed in to change notification settings - Fork 707
add support logs for namespace k8s.io #1847
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
Conversation
ping @AkihiroSuda |
f29a2f2
to
d3efcf5
Compare
4ff631c
to
fdeec39
Compare
one question left, yes we can drop this dependency by copying What's your idea?@AkihiroSuda |
fdeec39
to
d81f916
Compare
Maybe we should just refactor |
agree, so, lets create a another issue to refactor |
64cd106
to
4f803f5
Compare
c8c8a03
to
837a68a
Compare
cmd/nerdctl/logs.go
Outdated
return "", fmt.Errorf("get extensions for container %s,failed: %#v", container.ID(), err) | ||
} | ||
metaData := extensions[k8slabels.ContainerMetadataExtension] | ||
var meta containerstore.Metadata |
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.
Probably we just need this to avoid importing the CRI deps
type CRIContainerVersionedMetadata struct {
Version string
Metadata CRIContainerMetadata
}
type CRIContainerMetadata struct {
LogPath 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.
looks like a good idea
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.
updated
837a68a
to
7f793cd
Compare
pkg/api/types/containerd_types.go
Outdated
type metadataInternal Metadata | ||
|
||
// Metadata is the unversioned container metadata. | ||
type Metadata struct { |
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.
type Metadata struct { | |
type CRIContainerMetadata struct { |
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.
Or split this to a new package like pkg/api/types/critypes
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.
create a new package "github.com/containerd/nerdctl/pkg/api/types/cri"
@@ -0,0 +1,76 @@ | |||
/* |
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.
containerd_types.go
cri_types.go
might be more descriptive
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.
updated
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.
Please make sure to make struct names descriptive
https://github.com/containerd/nerdctl/pull/1847/files#r1071829430
LGTM other than that, thanks!
646c770
to
4684a3c
Compare
Signed-off-by: zhaojizhuang <[email protected]>
4684a3c
to
ad635da
Compare
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.
Thanks
Fixes: #1844
Support logs in namespace k8s.io