| 1 |
apiVersion: v1 |
| 2 |
kind: Namespace |
| 3 |
metadata: |
| 4 |
name: nydus-system |
| 5 |
|
| 6 |
--- |
| 7 |
apiVersion: v1 |
| 8 |
kind: ServiceAccount |
| 9 |
metadata: |
| 10 |
name: nydus-snapshotter-sa |
| 11 |
namespace: nydus-system |
| 12 |
|
| 13 |
--- |
| 14 |
kind: ClusterRole |
| 15 |
apiVersion: rbac.authorization.k8s.io/v1 |
| 16 |
metadata: |
| 17 |
name: nydus-snapshotter-role |
| 18 |
rules: |
| 19 |
- apiGroups: |
| 20 |
- "" |
| 21 |
resources: |
| 22 |
- secrets |
| 23 |
verbs: |
| 24 |
- get |
| 25 |
- list |
| 26 |
- watch |
| 27 |
|
| 28 |
--- |
| 29 |
kind: ClusterRoleBinding |
| 30 |
apiVersion: rbac.authorization.k8s.io/v1 |
| 31 |
metadata: |
| 32 |
name: nydus-snapshotter-role-binding |
| 33 |
roleRef: |
| 34 |
kind: ClusterRole |
| 35 |
name: nydus-snapshotter-role |
| 36 |
apiGroup: rbac.authorization.k8s.io |
| 37 |
subjects: |
| 38 |
- kind: ServiceAccount |
| 39 |
name: nydus-snapshotter-sa |
| 40 |
namespace: nydus-system |
| 41 |
|
| 42 |
--- |
| 43 |
apiVersion: v1 |
| 44 |
kind: Pod |
| 45 |
metadata: |
| 46 |
name: nydus-snapshotter |
| 47 |
namespace: nydus-system |
| 48 |
spec: |
| 49 |
containers: |
| 50 |
- name: nydus-snapshotter |
| 51 |
image: local-dev:e2e |
| 52 |
imagePullPolicy: IfNotPresent |
| 53 |
args: |
| 54 |
- containerd-nydus-grpc |
| 55 |
- --nydusd /usr/local/bin/nydusd |
| 56 |
- --nydusd-config /etc/nydus/nydusd.json |
| 57 |
- --config /etc/nydus/config.toml |
| 58 |
- --log-level debug |
| 59 |
- --daemon-mode shared |
| 60 |
- --log-to-stdout |
| 61 |
securityContext: |
| 62 |
privileged: true |
| 63 |
volumeMounts: |
| 64 |
- mountPath: /etc/nydus/ |
| 65 |
name: nydus-all-config |
| 66 |
- mountPath: /var/lib/containerd-nydus |
| 67 |
mountPropagation: Bidirectional |
| 68 |
name: nydus-lib |
| 69 |
- mountPath: /run/containerd-nydus |
| 70 |
mountPropagation: Bidirectional |
| 71 |
name: nydus-run |
| 72 |
- mountPath: /dev/fuse |
| 73 |
name: fuse |
| 74 |
- mountPath: /etc/containerd/config.toml |
| 75 |
name: containerd-conf |
| 76 |
hostNetwork: true |
| 77 |
hostPID: true |
| 78 |
serviceAccountName: nydus-snapshotter-sa |
| 79 |
volumes: |
| 80 |
- name: nydus-all-config |
| 81 |
projected: |
| 82 |
sources: |
| 83 |
- configMap: |
| 84 |
name: nydusd-config |
| 85 |
- configMap: |
| 86 |
name: snapshotter-config |
| 87 |
- hostPath: |
| 88 |
path: /run/containerd-nydus |
| 89 |
type: DirectoryOrCreate |
| 90 |
name: nydus-run |
| 91 |
- hostPath: |
| 92 |
path: /var/lib/containerd-nydus |
| 93 |
type: DirectoryOrCreate |
| 94 |
name: nydus-lib |
| 95 |
- hostPath: |
| 96 |
path: /dev/fuse |
| 97 |
name: fuse |
| 98 |
- hostPath: |
| 99 |
path: /etc/containerd/config.toml |
| 100 |
type: "" |
| 101 |
name: containerd-conf |
| 102 |
--- |
| 103 |
apiVersion: v1 |
| 104 |
kind: ConfigMap |
| 105 |
metadata: |
| 106 |
name: nydusd-config |
| 107 |
namespace: nydus-system |
| 108 |
data: |
| 109 |
nydusd.json: |- |
| 110 |
{ |
| 111 |
"device": { |
| 112 |
"backend": { |
| 113 |
"type": "registry", |
| 114 |
"config": { |
| 115 |
"scheme": "", |
| 116 |
"skip_verify": true, |
| 117 |
"timeout": 10, |
| 118 |
"connect_timeout": 10, |
| 119 |
"retry_limit": 2 |
| 120 |
} |
| 121 |
}, |
| 122 |
"cache": { |
| 123 |
"type": "blobcache", |
| 124 |
"config": { |
| 125 |
"work_dir": "/var/lib/nydus/cache/" |
| 126 |
} |
| 127 |
} |
| 128 |
}, |
| 129 |
"mode": "direct", |
| 130 |
"digest_validate": false, |
| 131 |
"iostats_files": false, |
| 132 |
"enable_xattr": true, |
| 133 |
"fs_prefetch": { |
| 134 |
"enable": true, |
| 135 |
"threads_count": 10, |
| 136 |
"merging_size": 131072, |
| 137 |
"bandwidth_rate": 1048576 |
| 138 |
} |
| 139 |
} |
| 140 |
--- |
| 141 |
apiVersion: v1 |
| 142 |
kind: ConfigMap |
| 143 |
metadata: |
| 144 |
name: snapshotter-config |
| 145 |
namespace: nydus-system |
| 146 |
data: |
| 147 |
config.toml: |- |
| 148 |
version = 1 |
| 149 |
root = "/var/lib/containerd-nydus" |
| 150 |
address = "/run/containerd-nydus/containerd-nydus-grpc.sock" |
| 151 |
daemon_mode = "multiple" |
| 152 |
enable_system_controller = true |
| 153 |
# Enable by assigning an address, empty indicates metrics server is disabled |
| 154 |
metrics_address = ":9110" |
| 155 |
# Whether tp enable stargz support |
| 156 |
enable_stargz = false |
| 157 |
# Whether snapshotter should try to clean up resources when it is closed |
| 158 |
cleanup_on_close = false |
| 159 |
|
| 160 |
[daemon] |
| 161 |
nydusd_path = "/usr/local/bin/nydusd" |
| 162 |
nydusimage_path = "/usr/local/bin/nydus-image" |
| 163 |
# fusedev or fscache |
| 164 |
fs_driver = "fusedev" |
| 165 |
# Specify nydusd log level |
| 166 |
log_level = "info" |
| 167 |
# How to process when daemon dies: "none", "restart" or "failover" |
| 168 |
recover_policy = "restart" |
| 169 |
# Specify a configuration file for nydusd |
| 170 |
nydusd_config = "/etc/nydus/nydusd.json" |
| 171 |
# The fuse or fscache IO working threads started by nydusd |
| 172 |
threads_number = 4 |
| 173 |
|
| 174 |
[log] |
| 175 |
# Snapshotter's log level |
| 176 |
level = "info" |
| 177 |
log_rotation_compress = true |
| 178 |
log_rotation_local_time = true |
| 179 |
# Max number of days to retain logs |
| 180 |
log_rotation_max_age = 7 |
| 181 |
log_rotation_max_backups = 5 |
| 182 |
# In unit MB(megabytes) |
| 183 |
log_rotation_max_size = 1 |
| 184 |
log_to_stdout = false |
| 185 |
|
| 186 |
[remote] |
| 187 |
convert_vpc_registry = false |
| 188 |
|
| 189 |
[remote.auth] |
| 190 |
# Fetch the private registry auth by listening to K8s API server |
| 191 |
enable_kubeconfig_keychain = true |
| 192 |
# synchronize `kubernetes.io/dockerconfigjson` secret from kubernetes API server with specified kubeconfig (default `$KUBECONFIG` or `~/.kube/config`) |
| 193 |
kubeconfig_path = "" |
| 194 |
# Fetch the private registry auth as CRI image service proxy |
| 195 |
enable_cri_keychain = false |
| 196 |
# the target image service when using image proxy |
| 197 |
image_service_address = "" |
| 198 |
|
| 199 |
[snapshot] |
| 200 |
enable_nydus_overlayfs = false |
| 201 |
# Whether to remove resources when a snapshot is removed |
| 202 |
sync_remove = false |
| 203 |
|
| 204 |
[cache_manager] |
| 205 |
disable = false |
| 206 |
gc_period = "24h" |
| 207 |
cache_dir = "" |
| 208 |
|
| 209 |
[image] |
| 210 |
public_key_file = "" |
| 211 |
validate_signature = false |