Use labels only when default namespace is provided and prefer given
options. Implements same approach of setting defaults for `NewWithConn`. Signed-off-by: Nikhil Soni <krsoninikhil@gmail.com>
This commit is contained in:
@@ -172,7 +172,7 @@ func setSnapshotterIfEmpty(ctx context.Context, client *Client, c *containers.Co
|
||||
namespaceService := client.NamespaceService()
|
||||
if ns, err := namespaces.NamespaceRequired(ctx); err == nil {
|
||||
if labels, err := namespaceService.Labels(ctx, ns); err == nil {
|
||||
if snapshotLabel, ok := labels["snapshotter"]; ok {
|
||||
if snapshotLabel, ok := labels["containerd.io/defaults/snapshotter"]; ok {
|
||||
defaultSnapshotter = snapshotLabel
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user