@intentius/chant-lexicon-k3s 0.44.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -0
- package/dist/codegen/docs.d.ts +7 -0
- package/dist/codegen/docs.d.ts.map +1 -0
- package/dist/codegen/generate-cli.d.ts +3 -0
- package/dist/codegen/generate-cli.d.ts.map +1 -0
- package/dist/codegen/generate-lexicon.d.ts +19 -0
- package/dist/codegen/generate-lexicon.d.ts.map +1 -0
- package/dist/codegen/generate-typescript.d.ts +11 -0
- package/dist/codegen/generate-typescript.d.ts.map +1 -0
- package/dist/codegen/generate.d.ts +15 -0
- package/dist/codegen/generate.d.ts.map +1 -0
- package/dist/codegen/naming.d.ts +13 -0
- package/dist/codegen/naming.d.ts.map +1 -0
- package/dist/codegen/package.d.ts +17 -0
- package/dist/codegen/package.d.ts.map +1 -0
- package/dist/codegen/parse.d.ts +93 -0
- package/dist/codegen/parse.d.ts.map +1 -0
- package/dist/generated/index.d.ts +8 -0
- package/dist/generated/index.d.ts.map +1 -0
- package/dist/generated/runtime.d.ts +5 -0
- package/dist/generated/runtime.d.ts.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/integrity.json +10 -0
- package/dist/lint/audit-catalog.d.ts +13 -0
- package/dist/lint/audit-catalog.d.ts.map +1 -0
- package/dist/lint/post-synth/index.d.ts +3 -0
- package/dist/lint/post-synth/index.d.ts.map +1 -0
- package/dist/lint/post-synth/k3s-helpers.d.ts +19 -0
- package/dist/lint/post-synth/k3s-helpers.d.ts.map +1 -0
- package/dist/lint/post-synth/k3s101.d.ts +13 -0
- package/dist/lint/post-synth/k3s101.d.ts.map +1 -0
- package/dist/lint/post-synth/k3s102.d.ts +11 -0
- package/dist/lint/post-synth/k3s102.d.ts.map +1 -0
- package/dist/lint/post-synth/k3s103.d.ts +11 -0
- package/dist/lint/post-synth/k3s103.d.ts.map +1 -0
- package/dist/lint/post-synth/k3s104.d.ts +12 -0
- package/dist/lint/post-synth/k3s104.d.ts.map +1 -0
- package/dist/lint/post-synth/k3s105.d.ts +11 -0
- package/dist/lint/post-synth/k3s105.d.ts.map +1 -0
- package/dist/lint/rules/index.d.ts +5 -0
- package/dist/lint/rules/index.d.ts.map +1 -0
- package/dist/lint/rules/token-literal.d.ts +17 -0
- package/dist/lint/rules/token-literal.d.ts.map +1 -0
- package/dist/lsp/completions.d.ts +7 -0
- package/dist/lsp/completions.d.ts.map +1 -0
- package/dist/lsp/hover.d.ts +6 -0
- package/dist/lsp/hover.d.ts.map +1 -0
- package/dist/manifest.json +6 -0
- package/dist/meta.json +37 -0
- package/dist/okf/index.md +9 -0
- package/dist/okf/types/Agent.md +55 -0
- package/dist/okf/types/Registries.md +14 -0
- package/dist/okf/types/Server.md +122 -0
- package/dist/package-cli.d.ts +3 -0
- package/dist/package-cli.d.ts.map +1 -0
- package/dist/plugin.d.ts +8 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/serializer.d.ts +37 -0
- package/dist/serializer.d.ts.map +1 -0
- package/dist/skills/chant-k3s.md +90 -0
- package/dist/spec/fetch.d.ts +39 -0
- package/dist/spec/fetch.d.ts.map +1 -0
- package/dist/types/index.d.ts +370 -0
- package/dist/validate-cli.d.ts +3 -0
- package/dist/validate-cli.d.ts.map +1 -0
- package/dist/validate.d.ts +15 -0
- package/dist/validate.d.ts.map +1 -0
- package/package.json +68 -0
- package/src/codegen/docs.ts +25 -0
- package/src/codegen/generate-cli.ts +8 -0
- package/src/codegen/generate-lexicon.ts +58 -0
- package/src/codegen/generate-typescript.ts +63 -0
- package/src/codegen/generate.test.ts +157 -0
- package/src/codegen/generate.ts +116 -0
- package/src/codegen/naming.ts +42 -0
- package/src/codegen/package.ts +28 -0
- package/src/codegen/parse.ts +386 -0
- package/src/generated/.gitkeep +0 -0
- package/src/generated/index.d.ts +370 -0
- package/src/generated/index.ts +13 -0
- package/src/generated/lexicon-k3s.json +37 -0
- package/src/generated/runtime.ts +4 -0
- package/src/index.ts +11 -0
- package/src/lint/audit-catalog.ts +53 -0
- package/src/lint/post-synth/index.ts +15 -0
- package/src/lint/post-synth/k3s-helpers.ts +34 -0
- package/src/lint/post-synth/k3s101.ts +58 -0
- package/src/lint/post-synth/k3s102.ts +59 -0
- package/src/lint/post-synth/k3s103.ts +38 -0
- package/src/lint/post-synth/k3s104.ts +44 -0
- package/src/lint/post-synth/k3s105.ts +52 -0
- package/src/lint/post-synth/post-synth.test.ts +137 -0
- package/src/lint/rules/index.ts +7 -0
- package/src/lint/rules/token-literal.test.ts +53 -0
- package/src/lint/rules/token-literal.ts +87 -0
- package/src/lsp/completions.test.ts +10 -0
- package/src/lsp/completions.ts +25 -0
- package/src/lsp/hover.test.ts +10 -0
- package/src/lsp/hover.ts +43 -0
- package/src/package-cli.ts +24 -0
- package/src/plugin.test.ts +17 -0
- package/src/plugin.ts +129 -0
- package/src/serializer.acceptance.test.ts +137 -0
- package/src/serializer.test.ts +172 -0
- package/src/serializer.ts +191 -0
- package/src/skills/chant-k3s.md +90 -0
- package/src/spec/fetch.ts +80 -0
- package/src/validate-cli.ts +5 -0
- package/src/validate.ts +41 -0
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
// Code generated by chant k3s generate. DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
// --- k3s Entity classes ---
|
|
4
|
+
|
|
5
|
+
export declare class Agent {
|
|
6
|
+
constructor(props: {
|
|
7
|
+
/** (cluster) Server to connect to */
|
|
8
|
+
server: string;
|
|
9
|
+
/** (logging) Log to standard error as well as file (if set) */
|
|
10
|
+
alsologtostderr?: boolean;
|
|
11
|
+
/** (listener) bind address (default: 0.0.0.0) */
|
|
12
|
+
"bind-address"?: string;
|
|
13
|
+
/** (agent/runtime) Disable embedded containerd and use the CRI socket at the given path; when used with --docker this sets the docker socket path */
|
|
14
|
+
"container-runtime-endpoint"?: string;
|
|
15
|
+
/** (agent/data) Folder to hold state */
|
|
16
|
+
"data-dir"?: string;
|
|
17
|
+
/** (logging) Turn on debug logs */
|
|
18
|
+
debug?: boolean;
|
|
19
|
+
/** (agent/runtime) Set the default runtime in containerd */
|
|
20
|
+
"default-runtime"?: string;
|
|
21
|
+
/** (agent/networking) (experimental) Disable the agent's client-side load-balancer and connect directly to the configured server address */
|
|
22
|
+
"disable-apiserver-lb"?: boolean;
|
|
23
|
+
/** (agent/containerd) Disables containerd's fallback default registry endpoint when a mirror is configured for that registry */
|
|
24
|
+
"disable-default-registry-endpoint"?: boolean;
|
|
25
|
+
/** (agent/runtime) (experimental) Use cri-dockerd instead of containerd */
|
|
26
|
+
docker?: boolean;
|
|
27
|
+
/** (experimental) Enable pprof endpoint on supervisor port */
|
|
28
|
+
"enable-pprof"?: boolean;
|
|
29
|
+
/** (agent/networking) Override default flannel cni config file */
|
|
30
|
+
"flannel-cni-conf"?: string;
|
|
31
|
+
/** (agent/networking) Override default flannel config file */
|
|
32
|
+
"flannel-conf"?: string;
|
|
33
|
+
/** (agent/networking) Override default flannel interface */
|
|
34
|
+
"flannel-iface"?: string;
|
|
35
|
+
/** (agent/node) The path to the directory where credential provider plugin binaries are located (default: /var/lib/rancher/credentialprovider/bin) */
|
|
36
|
+
"image-credential-provider-bin-dir"?: string;
|
|
37
|
+
/** (agent/node) The path to the credential provider plugin config file (default: /var/lib/rancher/credentialprovider/config.yaml) */
|
|
38
|
+
"image-credential-provider-config"?: string;
|
|
39
|
+
/** (agent/runtime) Disable embedded containerd image service and use remote image service socket at the given path. If not specified, defaults to --container-runtime-endpoint. */
|
|
40
|
+
"image-service-endpoint"?: string;
|
|
41
|
+
/** (agent/flags) Customized flag for kube-proxy process */
|
|
42
|
+
"kube-proxy-arg"?: string | string[];
|
|
43
|
+
/** (agent/flags) Customized flag for kubelet process */
|
|
44
|
+
"kubelet-arg"?: string | string[];
|
|
45
|
+
/** (agent/node) Local port for supervisor client load-balancer. If the supervisor and apiserver are not colocated an additional port 1 less than this port will also be used for the apiserver client load-balancer. (default: 6444) */
|
|
46
|
+
"lb-server-port"?: number;
|
|
47
|
+
/** (logging) Log to file */
|
|
48
|
+
log?: string;
|
|
49
|
+
/** (agent/networking) external DNS addresses to advertise for node */
|
|
50
|
+
"node-external-dns"?: string | string[];
|
|
51
|
+
/** (agent/networking) IPv4/IPv6 external IP addresses to advertise for node */
|
|
52
|
+
"node-external-ip"?: string | string[];
|
|
53
|
+
/** (agent/networking) internal DNS addresses to advertise for node */
|
|
54
|
+
"node-internal-dns"?: string | string[];
|
|
55
|
+
/** (agent/networking) IPv4/IPv6 addresses to advertise for node */
|
|
56
|
+
"node-ip"?: string | string[];
|
|
57
|
+
/** (agent/node) Registering and starting kubelet with set of labels */
|
|
58
|
+
"node-label"?: string | string[];
|
|
59
|
+
/** (agent/node) Node name */
|
|
60
|
+
"node-name"?: string;
|
|
61
|
+
/** (agent/node) Registering kubelet with set of taints */
|
|
62
|
+
"node-taint"?: string | string[];
|
|
63
|
+
/** (agent/containerd) Allows non-root pods to access devices by setting device_ownership_from_security_context=true in the containerd CRI config */
|
|
64
|
+
"nonroot-devices"?: boolean;
|
|
65
|
+
/** (agent/runtime) Customized pause image for containerd or docker sandbox (default: rancher/mirrored-pause:3.10.2) */
|
|
66
|
+
"pause-image"?: string;
|
|
67
|
+
/** (experimental) Prefer bundled userspace binaries over host binaries */
|
|
68
|
+
"prefer-bundled-bin"?: boolean;
|
|
69
|
+
/** (agent/runtime) Private registry configuration file */
|
|
70
|
+
"private-registry"?: string;
|
|
71
|
+
/** (agent/node) Kernel tuning behavior. If set, error if kernel tunables are different than kubelet defaults. */
|
|
72
|
+
"protect-kernel-defaults"?: boolean;
|
|
73
|
+
/** (agent/networking) Kubelet resolv.conf file */
|
|
74
|
+
"resolv-conf"?: string;
|
|
75
|
+
/** (experimental) Run rootless */
|
|
76
|
+
rootless?: boolean;
|
|
77
|
+
/** (agent/node) Enable SELinux in containerd */
|
|
78
|
+
selinux?: boolean;
|
|
79
|
+
/** (agent/runtime) Override default containerd snapshotter */
|
|
80
|
+
snapshotter?: string;
|
|
81
|
+
/** (cluster) Token file to use for authentication */
|
|
82
|
+
"token-file"?: string;
|
|
83
|
+
/** (logging) Number for the log level verbosity */
|
|
84
|
+
v?: number;
|
|
85
|
+
/** (logging) Comma-separated list of FILE_PATTERN=LOG_LEVEL settings for file-filtered logging */
|
|
86
|
+
vmodule?: string;
|
|
87
|
+
/** (agent/networking) (experimental) Credentials for the VPN provider. It must include the provider name and join key in the format name=<vpn-provider>,joinKey=<key>[,controlServerURL=<url>][,extraArgs=<args>] */
|
|
88
|
+
"vpn-auth"?: string;
|
|
89
|
+
/** (agent/networking) (experimental) File containing credentials for the VPN provider. It must include the provider name and join key in the format name=<vpn-provider>,joinKey=<key>[,controlServerURL=<url>][,extraArgs=<args>] */
|
|
90
|
+
"vpn-auth-file"?: string;
|
|
91
|
+
/** (agent/node) Append id to node name */
|
|
92
|
+
"with-node-id"?: boolean;
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export declare class Mirror {
|
|
97
|
+
constructor(props: {
|
|
98
|
+
/** Mirror endpoint URLs, tried in order */
|
|
99
|
+
endpoint?: string | string[];
|
|
100
|
+
/** Image name rewrite rules (regex to replacement) */
|
|
101
|
+
rewrite?: Record<string, string>;
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export declare class Registries {
|
|
106
|
+
constructor(props: {
|
|
107
|
+
/** Registry endpoint to auth/TLS configuration */
|
|
108
|
+
configs?: Record<string, RegistryConfig>;
|
|
109
|
+
/** Registry name (or wildcard) to mirror configuration */
|
|
110
|
+
mirrors?: Record<string, Mirror>;
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export declare class RegistryAuth {
|
|
115
|
+
constructor(props: {
|
|
116
|
+
/** Basic auth password. A literal here fails K3SC002 */
|
|
117
|
+
password?: string;
|
|
118
|
+
/** Bearer token. A literal here fails K3SC002 */
|
|
119
|
+
token?: string;
|
|
120
|
+
/** Basic auth username */
|
|
121
|
+
username?: string;
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export declare class RegistryConfig {
|
|
126
|
+
constructor(props: {
|
|
127
|
+
/** Credentials for the registry */
|
|
128
|
+
auth?: RegistryAuth;
|
|
129
|
+
/** TLS settings for the registry */
|
|
130
|
+
tls?: RegistryTLS;
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export declare class RegistryTLS {
|
|
135
|
+
constructor(props: {
|
|
136
|
+
/** CA bundle path on the node */
|
|
137
|
+
ca_file?: string;
|
|
138
|
+
/** Client certificate path on the node */
|
|
139
|
+
cert_file?: string;
|
|
140
|
+
/** Skip TLS verification. K3SS002 flags this */
|
|
141
|
+
insecure_skip_verify?: boolean;
|
|
142
|
+
/** Client key path on the node */
|
|
143
|
+
key_file?: string;
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export declare class Server {
|
|
148
|
+
constructor(props: {
|
|
149
|
+
/** (listener) IPv4/IPv6 address that apiserver uses to advertise to members of the cluster (default: node-external-ip/node-ip) */
|
|
150
|
+
"advertise-address"?: string;
|
|
151
|
+
/** (listener) Port that apiserver uses to advertise to members of the cluster (default: https-listen-port) */
|
|
152
|
+
"advertise-port"?: number;
|
|
153
|
+
/** (cluster) File containing the agent secret */
|
|
154
|
+
"agent-token-file"?: string;
|
|
155
|
+
/** (logging) Log to standard error as well as file (if set) */
|
|
156
|
+
alsologtostderr?: boolean;
|
|
157
|
+
/** (listener) bind address (default: 0.0.0.0) */
|
|
158
|
+
"bind-address"?: string;
|
|
159
|
+
/** (networking) IPv4/IPv6 network CIDRs to use for pod IPs (default: 10.42.0.0/16) */
|
|
160
|
+
"cluster-cidr"?: string | string[];
|
|
161
|
+
/** (networking) IPv4/IPv6 Cluster IP for coredns service. Should be in your service-cidr range (default: 10.43.0.10) */
|
|
162
|
+
"cluster-dns"?: string | string[];
|
|
163
|
+
/** (networking) Cluster Domain (default: cluster.local) */
|
|
164
|
+
"cluster-domain"?: string;
|
|
165
|
+
/** (cluster) Initialize a new cluster using embedded Etcd */
|
|
166
|
+
"cluster-init"?: boolean;
|
|
167
|
+
/** (cluster) Forget all peers and become sole member of a new cluster */
|
|
168
|
+
"cluster-reset"?: boolean;
|
|
169
|
+
/** (db) Path to snapshot file to be restored */
|
|
170
|
+
"cluster-reset-restore-path"?: string;
|
|
171
|
+
/** (agent/runtime) Disable embedded containerd and use the CRI socket at the given path; when used with --docker this sets the docker socket path */
|
|
172
|
+
"container-runtime-endpoint"?: string;
|
|
173
|
+
/** (data) Folder to hold state default /var/lib/rancher/ or ${HOME}/.rancher/ if not root */
|
|
174
|
+
"data-dir"?: string;
|
|
175
|
+
/** (db) TLS Certificate Authority file used to secure datastore backend communication */
|
|
176
|
+
"datastore-cafile"?: string;
|
|
177
|
+
/** (db) TLS certification file used to secure datastore backend communication */
|
|
178
|
+
"datastore-certfile"?: string;
|
|
179
|
+
/** (db) Specify etcd, NATS, MySQL, Postgres, or SQLite (default) data source name */
|
|
180
|
+
"datastore-endpoint"?: string;
|
|
181
|
+
/** (db) TLS key file used to secure datastore backend communication */
|
|
182
|
+
"datastore-keyfile"?: string;
|
|
183
|
+
/** (logging) Turn on debug logs */
|
|
184
|
+
debug?: boolean;
|
|
185
|
+
/** (storage) Default local storage path for local provisioner storage class */
|
|
186
|
+
"default-local-storage-path"?: string;
|
|
187
|
+
/** (agent/runtime) Set the default runtime in containerd */
|
|
188
|
+
"default-runtime"?: string;
|
|
189
|
+
/** (components) Do not deploy packaged components and delete any deployed components (valid values: ) */
|
|
190
|
+
disable?: string | string[];
|
|
191
|
+
/** (components) Disable default cloud controller manager */
|
|
192
|
+
"disable-cloud-controller"?: boolean;
|
|
193
|
+
/** (agent/containerd) Disables containerd's fallback default registry endpoint when a mirror is configured for that registry */
|
|
194
|
+
"disable-default-registry-endpoint"?: boolean;
|
|
195
|
+
/** (components) Disable Helm controller */
|
|
196
|
+
"disable-helm-controller"?: boolean;
|
|
197
|
+
/** (components) Disable running kube-proxy */
|
|
198
|
+
"disable-kube-proxy"?: boolean;
|
|
199
|
+
/** (components) Disable default network policy controller */
|
|
200
|
+
"disable-network-policy"?: boolean;
|
|
201
|
+
/** (components) Disable Kubernetes default scheduler */
|
|
202
|
+
"disable-scheduler"?: boolean;
|
|
203
|
+
/** (agent/runtime) (experimental) Use cri-dockerd instead of containerd */
|
|
204
|
+
docker?: boolean;
|
|
205
|
+
/** (networking) One of 'agent', 'cluster', 'pod', 'disabled' (default: agent) */
|
|
206
|
+
"egress-selector-mode"?: string;
|
|
207
|
+
/** (components) Enable embedded distributed container registry; requires use of embedded containerd; when enabled agents will also listen on the supervisor port */
|
|
208
|
+
"embedded-registry"?: boolean;
|
|
209
|
+
/** (experimental) Enable pprof endpoint on supervisor port */
|
|
210
|
+
"enable-pprof"?: boolean;
|
|
211
|
+
/** (flags) Customized flag for etcd process */
|
|
212
|
+
"etcd-arg"?: string | string[];
|
|
213
|
+
/** (db) Disable automatic etcd snapshots */
|
|
214
|
+
"etcd-disable-snapshots"?: boolean;
|
|
215
|
+
/** (db) Expose etcd metrics to client interface */
|
|
216
|
+
"etcd-expose-metrics"?: boolean;
|
|
217
|
+
/** (db) Enable backup to S3 */
|
|
218
|
+
"etcd-s3"?: boolean;
|
|
219
|
+
/** (db) S3 access key */
|
|
220
|
+
"etcd-s3-access-key"?: string;
|
|
221
|
+
/** (db) S3 bucket name */
|
|
222
|
+
"etcd-s3-bucket"?: string;
|
|
223
|
+
/** (db) S3 bucket lookup type, one of 'auto', 'dns', 'path'; default is 'auto' if not set */
|
|
224
|
+
"etcd-s3-bucket-lookup-type"?: string;
|
|
225
|
+
/** (db) Name of secret in the kube-system namespace used to configure S3, if etcd-s3 is enabled and no other etcd-s3 options are set */
|
|
226
|
+
"etcd-s3-config-secret"?: string;
|
|
227
|
+
/** (db) S3 endpoint url (default: s3.amazonaws.com) */
|
|
228
|
+
"etcd-s3-endpoint"?: string;
|
|
229
|
+
/** (db) S3 custom CA cert to connect to S3 endpoint */
|
|
230
|
+
"etcd-s3-endpoint-ca"?: string;
|
|
231
|
+
/** (db) S3 folder */
|
|
232
|
+
"etcd-s3-folder"?: string;
|
|
233
|
+
/** (db) Disables S3 over HTTPS */
|
|
234
|
+
"etcd-s3-insecure"?: boolean;
|
|
235
|
+
/** (db) Proxy server to use when connecting to S3, overriding any proxy-releated environment variables */
|
|
236
|
+
"etcd-s3-proxy"?: string;
|
|
237
|
+
/** (db) S3 region / bucket location (optional) (default: us-east-1) */
|
|
238
|
+
"etcd-s3-region"?: string;
|
|
239
|
+
/** (db) S3 retention limit */
|
|
240
|
+
"etcd-s3-retention"?: number;
|
|
241
|
+
/** (db) S3 secret key */
|
|
242
|
+
"etcd-s3-secret-key"?: string;
|
|
243
|
+
/** (db) S3 session token */
|
|
244
|
+
"etcd-s3-session-token"?: string;
|
|
245
|
+
/** (db) Disables S3 SSL certificate validation */
|
|
246
|
+
"etcd-s3-skip-ssl-verify"?: boolean;
|
|
247
|
+
/** (db) S3 timeout */
|
|
248
|
+
"etcd-s3-timeout"?: string;
|
|
249
|
+
/** (db) Compress etcd snapshot */
|
|
250
|
+
"etcd-snapshot-compress"?: boolean;
|
|
251
|
+
/** (db) Directory to save db snapshots. (default: ${data-dir}/server/db/snapshots) */
|
|
252
|
+
"etcd-snapshot-dir"?: string;
|
|
253
|
+
/** (db) Set the base name of etcd snapshots, appended with UNIX timestamp (default: etcd-snapshot) */
|
|
254
|
+
"etcd-snapshot-name"?: string;
|
|
255
|
+
/** (db) Snapshot reconcile interval */
|
|
256
|
+
"etcd-snapshot-reconcile-interval"?: string;
|
|
257
|
+
/** (db) Number of snapshots to retain */
|
|
258
|
+
"etcd-snapshot-retention"?: number;
|
|
259
|
+
/** (db) Snapshot interval time in cron spec. eg. every 5 hours '0 *\/5 * * *' (default: 0 *\/12 * * *) */
|
|
260
|
+
"etcd-snapshot-schedule-cron"?: string;
|
|
261
|
+
/** (networking) Backend (valid values: 'none', 'vxlan', 'host-gw', 'wireguard-native' (default: vxlan) */
|
|
262
|
+
"flannel-backend"?: string;
|
|
263
|
+
/** (agent/networking) Override default flannel cni config file */
|
|
264
|
+
"flannel-cni-conf"?: string;
|
|
265
|
+
/** (agent/networking) Override default flannel config file */
|
|
266
|
+
"flannel-conf"?: string;
|
|
267
|
+
/** (networking) Use node external IP addresses for Flannel traffic */
|
|
268
|
+
"flannel-external-ip"?: boolean;
|
|
269
|
+
/** (agent/networking) Override default flannel interface */
|
|
270
|
+
"flannel-iface"?: string;
|
|
271
|
+
/** (networking) Enable IPv6 masquerading for pod */
|
|
272
|
+
"flannel-ipv6-masq"?: boolean;
|
|
273
|
+
/** (flags) Customized flag for helm-controller process */
|
|
274
|
+
"helm-controller-arg"?: string | string[];
|
|
275
|
+
/** (listener) HTTPS listen port (default: 6443) */
|
|
276
|
+
"https-listen-port"?: number;
|
|
277
|
+
/** (agent/node) The path to the directory where credential provider plugin binaries are located (default: /var/lib/rancher/credentialprovider/bin) */
|
|
278
|
+
"image-credential-provider-bin-dir"?: string;
|
|
279
|
+
/** (agent/node) The path to the credential provider plugin config file (default: /var/lib/rancher/credentialprovider/config.yaml) */
|
|
280
|
+
"image-credential-provider-config"?: string;
|
|
281
|
+
/** (agent/runtime) Disable embedded containerd image service and use remote image service socket at the given path. If not specified, defaults to --container-runtime-endpoint. */
|
|
282
|
+
"image-service-endpoint"?: string;
|
|
283
|
+
/** (flags) Customized flag for kube-apiserver process */
|
|
284
|
+
"kube-apiserver-arg"?: string | string[];
|
|
285
|
+
/** (flags) Customized flag for kube-cloud-controller-manager process */
|
|
286
|
+
"kube-cloud-controller-manager-arg"?: string | string[];
|
|
287
|
+
/** (flags) Customized flag for kube-controller-manager process */
|
|
288
|
+
"kube-controller-manager-arg"?: string | string[];
|
|
289
|
+
/** (agent/flags) Customized flag for kube-proxy process */
|
|
290
|
+
"kube-proxy-arg"?: string | string[];
|
|
291
|
+
/** (flags) Customized flag for kube-scheduler process */
|
|
292
|
+
"kube-scheduler-arg"?: string | string[];
|
|
293
|
+
/** (agent/flags) Customized flag for kubelet process */
|
|
294
|
+
"kubelet-arg"?: string | string[];
|
|
295
|
+
/** (agent/node) Local port for supervisor client load-balancer. If the supervisor and apiserver are not colocated an additional port 1 less than this port will also be used for the apiserver client load-balancer. (default: 6444) */
|
|
296
|
+
"lb-server-port"?: number;
|
|
297
|
+
/** (logging) Log to file */
|
|
298
|
+
log?: string;
|
|
299
|
+
/** (agent/networking) external DNS addresses to advertise for node */
|
|
300
|
+
"node-external-dns"?: string | string[];
|
|
301
|
+
/** (agent/networking) IPv4/IPv6 external IP addresses to advertise for node */
|
|
302
|
+
"node-external-ip"?: string | string[];
|
|
303
|
+
/** (agent/networking) internal DNS addresses to advertise for node */
|
|
304
|
+
"node-internal-dns"?: string | string[];
|
|
305
|
+
/** (agent/networking) IPv4/IPv6 addresses to advertise for node */
|
|
306
|
+
"node-ip"?: string | string[];
|
|
307
|
+
/** (agent/node) Registering and starting kubelet with set of labels */
|
|
308
|
+
"node-label"?: string | string[];
|
|
309
|
+
/** (agent/node) Node name */
|
|
310
|
+
"node-name"?: string;
|
|
311
|
+
/** (agent/node) Registering kubelet with set of taints */
|
|
312
|
+
"node-taint"?: string | string[];
|
|
313
|
+
/** (agent/containerd) Allows non-root pods to access devices by setting device_ownership_from_security_context=true in the containerd CRI config */
|
|
314
|
+
"nonroot-devices"?: boolean;
|
|
315
|
+
/** (agent/runtime) Customized pause image for containerd or docker sandbox (default: rancher/mirrored-pause:3.10.2) */
|
|
316
|
+
"pause-image"?: string;
|
|
317
|
+
/** (experimental) Prefer bundled userspace binaries over host binaries */
|
|
318
|
+
"prefer-bundled-bin"?: boolean;
|
|
319
|
+
/** (agent/runtime) Private registry configuration file */
|
|
320
|
+
"private-registry"?: string;
|
|
321
|
+
/** (agent/node) Kernel tuning behavior. If set, error if kernel tunables are different than kubelet defaults. */
|
|
322
|
+
"protect-kernel-defaults"?: boolean;
|
|
323
|
+
/** (agent/networking) Kubelet resolv.conf file */
|
|
324
|
+
"resolv-conf"?: string;
|
|
325
|
+
/** (experimental) Run rootless */
|
|
326
|
+
rootless?: boolean;
|
|
327
|
+
/** Enable secret encryption at rest */
|
|
328
|
+
"secrets-encryption"?: boolean;
|
|
329
|
+
/** (experimental) Secret encryption provider (valid values: 'aescbc', 'secretbox') (default: aescbc) */
|
|
330
|
+
"secrets-encryption-provider"?: string;
|
|
331
|
+
/** (agent/node) Enable SELinux in containerd */
|
|
332
|
+
selinux?: boolean;
|
|
333
|
+
/** (cluster) Server to connect to, used to join a cluster */
|
|
334
|
+
server?: string;
|
|
335
|
+
/** (networking) IPv4/IPv6 network CIDRs to use for service IPs (default: 10.43.0.0/16) */
|
|
336
|
+
"service-cidr"?: string | string[];
|
|
337
|
+
/** (networking) Port range to reserve for services with NodePort visibility (default: 30000-32767) */
|
|
338
|
+
"service-node-port-range"?: string;
|
|
339
|
+
/** (networking) Namespace of the pods for the servicelb component (default: kube-system) */
|
|
340
|
+
"servicelb-namespace"?: string;
|
|
341
|
+
/** (agent/runtime) Override default containerd snapshotter */
|
|
342
|
+
snapshotter?: string;
|
|
343
|
+
/** (experimental/components) Enable serving internal metrics on the supervisor port; when enabled agents will also listen on the supervisor port */
|
|
344
|
+
"supervisor-metrics"?: boolean;
|
|
345
|
+
/** (agent/runtime) Private registry to be used for all system images */
|
|
346
|
+
"system-default-registry"?: string;
|
|
347
|
+
/** (listener) Add additional hostnames or IPv4/IPv6 addresses as Subject Alternative Names on the server TLS cert */
|
|
348
|
+
"tls-san"?: string | string[];
|
|
349
|
+
/** (listener) Protect the server TLS cert by refusing to add Subject Alternative Names not associated with the kubernetes apiserver service, server nodes, or values of the tls-san option (default: true) (default: true) */
|
|
350
|
+
"tls-san-security"?: boolean;
|
|
351
|
+
/** (cluster) File containing the token */
|
|
352
|
+
"token-file"?: string;
|
|
353
|
+
/** (logging) Number for the log level verbosity */
|
|
354
|
+
v?: number;
|
|
355
|
+
/** (logging) Comma-separated list of FILE_PATTERN=LOG_LEVEL settings for file-filtered logging */
|
|
356
|
+
vmodule?: string;
|
|
357
|
+
/** (agent/networking) (experimental) Credentials for the VPN provider. It must include the provider name and join key in the format name=<vpn-provider>,joinKey=<key>[,controlServerURL=<url>][,extraArgs=<args>] */
|
|
358
|
+
"vpn-auth"?: string;
|
|
359
|
+
/** (agent/networking) (experimental) File containing credentials for the VPN provider. It must include the provider name and join key in the format name=<vpn-provider>,joinKey=<key>[,controlServerURL=<url>][,extraArgs=<args>] */
|
|
360
|
+
"vpn-auth-file"?: string;
|
|
361
|
+
/** (agent/node) Append id to node name */
|
|
362
|
+
"with-node-id"?: boolean;
|
|
363
|
+
/** (client) Write kubeconfig for admin client to this file */
|
|
364
|
+
"write-kubeconfig"?: string;
|
|
365
|
+
/** (client) Write kubeconfig with this group */
|
|
366
|
+
"write-kubeconfig-group"?: string;
|
|
367
|
+
/** (client) Write kubeconfig with this mode */
|
|
368
|
+
"write-kubeconfig-mode"?: string;
|
|
369
|
+
});
|
|
370
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate-cli.d.ts","sourceRoot":"","sources":["../src/validate-cli.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validate generated lexicon-k3s artifacts.
|
|
3
|
+
*
|
|
4
|
+
* Thin wrapper around the core validation framework
|
|
5
|
+
* with k3s-specific configuration.
|
|
6
|
+
*/
|
|
7
|
+
import { type ValidateResult } from "@intentius/chant/codegen/validate";
|
|
8
|
+
export type { ValidateCheck, ValidateResult } from "@intentius/chant/codegen/validate";
|
|
9
|
+
/**
|
|
10
|
+
* Validate the generated lexicon-k3s artifacts.
|
|
11
|
+
*/
|
|
12
|
+
export declare function validate(opts?: {
|
|
13
|
+
basePath?: string;
|
|
14
|
+
}): Promise<ValidateResult>;
|
|
15
|
+
//# sourceMappingURL=validate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../src/validate.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAA4B,KAAK,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAElG,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAkBvF;;GAEG;AACH,wBAAsB,QAAQ,CAAC,IAAI,CAAC,EAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,cAAc,CAAC,CAQpF"}
|
package/package.json
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@intentius/chant-lexicon-k3s",
|
|
3
|
+
"version": "0.44.3",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"files": [
|
|
6
|
+
"src/",
|
|
7
|
+
"dist/"
|
|
8
|
+
],
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"development": "./src/index.ts",
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"default": "./src/index.ts"
|
|
14
|
+
},
|
|
15
|
+
"./*": {
|
|
16
|
+
"development": "./src/*.ts",
|
|
17
|
+
"types": "./dist/*.d.ts",
|
|
18
|
+
"default": "./src/*.ts"
|
|
19
|
+
},
|
|
20
|
+
"./lint/post-synth": {
|
|
21
|
+
"development": "./src/lint/post-synth/index.ts",
|
|
22
|
+
"types": "./dist/lint/post-synth/index.d.ts",
|
|
23
|
+
"default": "./src/lint/post-synth/index.ts"
|
|
24
|
+
},
|
|
25
|
+
"./manifest": "./dist/manifest.json",
|
|
26
|
+
"./meta": "./dist/meta.json",
|
|
27
|
+
"./types": "./dist/types/index.d.ts"
|
|
28
|
+
},
|
|
29
|
+
"scripts": {
|
|
30
|
+
"generate": "npx tsx src/codegen/generate-cli.ts",
|
|
31
|
+
"validate": "npx tsx src/validate-cli.ts",
|
|
32
|
+
"docs": "npx tsx src/codegen/docs-cli.ts",
|
|
33
|
+
"build": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json && find dist -type f \\( -name \"*.js\" -o -name \"*.js.map\" \\) -delete",
|
|
34
|
+
"prepack": "npm run generate && npm run bundle && npm run validate && npm run build",
|
|
35
|
+
"bundle": "tsx src/package-cli.ts"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@intentius/chant": "*",
|
|
39
|
+
"tsc-alias": "^1.8.17",
|
|
40
|
+
"typescript": "^5.9.3",
|
|
41
|
+
"js-yaml": "^4.1.0",
|
|
42
|
+
"@types/js-yaml": "^4.0.9"
|
|
43
|
+
},
|
|
44
|
+
"publishConfig": {
|
|
45
|
+
"access": "public"
|
|
46
|
+
},
|
|
47
|
+
"peerDependencies": {
|
|
48
|
+
"@intentius/chant": "^0.44.3",
|
|
49
|
+
"typescript": "^5.9.3"
|
|
50
|
+
},
|
|
51
|
+
"description": "k3s lexicon for chant — the k3s distro's host configuration as declarable data",
|
|
52
|
+
"license": "Apache-2.0",
|
|
53
|
+
"homepage": "https://github.com/INTENTIUS/chant#readme",
|
|
54
|
+
"repository": {
|
|
55
|
+
"type": "git",
|
|
56
|
+
"url": "https://github.com/INTENTIUS/chant.git",
|
|
57
|
+
"directory": "lexicons/k3s"
|
|
58
|
+
},
|
|
59
|
+
"bugs": {
|
|
60
|
+
"url": "https://github.com/INTENTIUS/chant/issues"
|
|
61
|
+
},
|
|
62
|
+
"keywords": [
|
|
63
|
+
"chant",
|
|
64
|
+
"k3s",
|
|
65
|
+
"kubernetes",
|
|
66
|
+
"iac"
|
|
67
|
+
]
|
|
68
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { docsPipeline, writeDocsSite } from "@intentius/chant/codegen/docs";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Generate documentation site for the k3s lexicon.
|
|
5
|
+
*/
|
|
6
|
+
export async function generateDocs(options?: { verbose?: boolean }): Promise<void> {
|
|
7
|
+
const config = {
|
|
8
|
+
name: "k3s",
|
|
9
|
+
displayName: "K3s",
|
|
10
|
+
description: "k3s lexicon documentation",
|
|
11
|
+
distDir: "./dist",
|
|
12
|
+
outDir: "./docs",
|
|
13
|
+
// TODO: Implement service grouping for your provider
|
|
14
|
+
serviceFromType: (type: string) => type.split("::")[1] ?? type,
|
|
15
|
+
// TODO: Implement resource documentation URLs
|
|
16
|
+
resourceTypeUrl: (type: string) => `#${type}`,
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const result = docsPipeline(config);
|
|
20
|
+
writeDocsSite(config, result);
|
|
21
|
+
|
|
22
|
+
if (options?.verbose) {
|
|
23
|
+
console.error("Documentation generated");
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
#!/usr/bin/env tsx
|
|
2
|
+
import { generate, writeGeneratedFiles } from "./generate";
|
|
3
|
+
import { dirname } from "path";
|
|
4
|
+
import { fileURLToPath } from "url";
|
|
5
|
+
|
|
6
|
+
const pkgDir = dirname(dirname(dirname(fileURLToPath(import.meta.url))));
|
|
7
|
+
const result = await generate({ verbose: true });
|
|
8
|
+
writeGeneratedFiles(result, pkgDir);
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lexicon JSON generator — produces lexicon-k3s.json with metadata
|
|
3
|
+
* for all k3s entities.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { PropertyConstraints } from "@intentius/chant/codegen/json-schema";
|
|
7
|
+
import type { K3sParseResult } from "./parse";
|
|
8
|
+
import { k3sShortName } from "./parse";
|
|
9
|
+
import type { NamingStrategy } from "./naming";
|
|
10
|
+
import {
|
|
11
|
+
buildRegistry,
|
|
12
|
+
serializeRegistry,
|
|
13
|
+
type RegistryResource,
|
|
14
|
+
} from "@intentius/chant/codegen/generate-registry";
|
|
15
|
+
|
|
16
|
+
export interface LexiconEntry {
|
|
17
|
+
resourceType: string;
|
|
18
|
+
kind: "resource" | "property";
|
|
19
|
+
lexicon: "k3s";
|
|
20
|
+
deprecatedProperties?: string[];
|
|
21
|
+
constraints?: Record<string, PropertyConstraints>;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Generate the lexicon-k3s.json content.
|
|
26
|
+
*/
|
|
27
|
+
export function generateLexiconJSON(results: K3sParseResult[], naming: NamingStrategy): string {
|
|
28
|
+
const registryResources: RegistryResource[] = results.map((r) => ({
|
|
29
|
+
typeName: r.resource.typeName,
|
|
30
|
+
attributes: r.resource.attributes,
|
|
31
|
+
properties: r.resource.properties,
|
|
32
|
+
propertyTypes: r.propertyTypes.map((pt) => ({ name: pt.name, specType: pt.defType })),
|
|
33
|
+
}));
|
|
34
|
+
|
|
35
|
+
const entries = buildRegistry<LexiconEntry>(registryResources, naming, {
|
|
36
|
+
shortName: k3sShortName,
|
|
37
|
+
buildEntry: (resource, _tsName, _attrs, propConstraints) => {
|
|
38
|
+
const r = results.find((res) => res.resource.typeName === resource.typeName);
|
|
39
|
+
return {
|
|
40
|
+
resourceType: resource.typeName,
|
|
41
|
+
kind: (r?.isProperty ? "property" : "resource") as "resource" | "property",
|
|
42
|
+
lexicon: "k3s" as const,
|
|
43
|
+
...(r?.resource.deprecatedProperties?.length && {
|
|
44
|
+
deprecatedProperties: r.resource.deprecatedProperties,
|
|
45
|
+
}),
|
|
46
|
+
...(propConstraints &&
|
|
47
|
+
Object.keys(propConstraints).length > 0 && { constraints: propConstraints }),
|
|
48
|
+
};
|
|
49
|
+
},
|
|
50
|
+
buildPropertyEntry: (resourceType, propertyType) => ({
|
|
51
|
+
resourceType: `${resourceType}.${propertyType}`,
|
|
52
|
+
kind: "property" as const,
|
|
53
|
+
lexicon: "k3s" as const,
|
|
54
|
+
}),
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
return serializeRegistry(entries);
|
|
58
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TypeScript declaration file generator — produces index.d.ts with all
|
|
3
|
+
* k3s entity classes.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { K3sParseResult } from "./parse";
|
|
7
|
+
import type { NamingStrategy } from "./naming";
|
|
8
|
+
import {
|
|
9
|
+
writeResourceClass,
|
|
10
|
+
type DtsProperty,
|
|
11
|
+
type DtsAttribute,
|
|
12
|
+
} from "@intentius/chant/codegen/generate-typescript";
|
|
13
|
+
|
|
14
|
+
interface ResourceEntry {
|
|
15
|
+
tsName: string;
|
|
16
|
+
properties: DtsProperty[];
|
|
17
|
+
attributes: DtsAttribute[];
|
|
18
|
+
remap: Map<string, string>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Generate the complete .d.ts file content.
|
|
23
|
+
*/
|
|
24
|
+
export function generateTypeScriptDeclarations(
|
|
25
|
+
results: K3sParseResult[],
|
|
26
|
+
naming: NamingStrategy,
|
|
27
|
+
): string {
|
|
28
|
+
const lines: string[] = [];
|
|
29
|
+
lines.push("// Code generated by chant k3s generate. DO NOT EDIT.");
|
|
30
|
+
|
|
31
|
+
const resources: ResourceEntry[] = [];
|
|
32
|
+
|
|
33
|
+
for (const r of results) {
|
|
34
|
+
const typeName = r.resource.typeName;
|
|
35
|
+
const tsName = naming.resolve(typeName);
|
|
36
|
+
if (!tsName) continue;
|
|
37
|
+
|
|
38
|
+
const dtsProps: DtsProperty[] = r.resource.properties.map((p) => ({
|
|
39
|
+
name: p.name,
|
|
40
|
+
type: p.tsType,
|
|
41
|
+
required: p.required,
|
|
42
|
+
description: p.description,
|
|
43
|
+
}));
|
|
44
|
+
const dtsAttrs: DtsAttribute[] = r.resource.attributes.map((a) => ({
|
|
45
|
+
name: a.name,
|
|
46
|
+
type: a.tsType,
|
|
47
|
+
}));
|
|
48
|
+
|
|
49
|
+
resources.push({ tsName, properties: dtsProps, attributes: dtsAttrs, remap: new Map() });
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
resources.sort((a, b) => a.tsName.localeCompare(b.tsName));
|
|
53
|
+
|
|
54
|
+
lines.push("");
|
|
55
|
+
lines.push("// --- k3s Entity classes ---");
|
|
56
|
+
for (const re of resources) {
|
|
57
|
+
writeResourceClass(lines, re.tsName, re.properties, re.attributes, re.remap);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
lines.push("");
|
|
61
|
+
|
|
62
|
+
return lines.join("\n");
|
|
63
|
+
}
|