Debian Codegraph @

tests/e2e/k8s/snapshotter-cri.yaml

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