Skip to content

add skip_verify configuration for specific registry when pushing images with the nerdctl tool #19

@san3Xian

Description

@san3Xian

Currently, snapshot-pod relies on nerdctl to commit and push images. However, there is no configuration file in snapshot-pod to set skip_verify for any registry, nor is there a parameter to configure skip_verify for specific registries.

https://github.com/BaizeAI/kube-snapshot/blob/v0.2.5/manifests/snapshot-pod/templates/daemonset.yaml

Could a mount point be added to the snapshot-pod DaemonSet configuration to mount the host's /etc/containerd/certs.d/ directory into the container in read-only mode?

Alternatively, considering that some Kubernetes environments do not use containerd directly as the CRI, another option is to add a ConfigMap to snapshot-pod to define untrusted registry addresses and mount this ConfigMap into snapshot-pod?

I also noticed that PR #18 includes configurations related to registry skip_verify. However, this PR disables certificate verification globally for all registries.

In enterprise production environments, there may be cases where some registries use HTTP while others are trusted HTTPS registries. Disabling certificate verification globally could introduce security risks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions