provider-k3s/api/agent_config.go
Nianyu Shen 701adfd4a4
PE-6055 fix: use string slice instead of string for k3s args (#106)
* fix: use string slice instead of string for k3s args

Signed-off-by: Nianyu Shen <xiaoyu9964@gmail.com>

* fix: test

Signed-off-by: Nianyu Shen <xiaoyu9964@gmail.com>

---------

Signed-off-by: Nianyu Shen <xiaoyu9964@gmail.com>
2025-01-30 19:54:25 -08:00

51 lines
4.8 KiB
Go

package api
type K3sAgentConfig struct {
ConfigFile string `json:"config,omitempty" yaml:"config,omitempty"`
Debug bool `json:"debug,omitempty" yaml:"debug,omitempty"`
V int `json:"v,omitempty" yaml:"v,omitempty"`
VModule string `json:"vmodule,omitempty" yaml:"vmodule,omitempty"`
Log string `json:"log,omitempty" yaml:"log,omitempty"`
AlsoLogToStderr bool `json:"alsologtostderr,omitempty" yaml:"alsologtostderr,omitempty"`
Token string `json:"token,omitempty" yaml:"token,omitempty"`
TokenFile string `json:"token-file,omitempty" yaml:"token-file,omitempty"`
Server string `json:"server,omitempty" yaml:"server,omitempty"`
DataDir string `json:"data-dir,omitempty" yaml:"data-dir,omitempty"`
NodeName string `json:"node-name,omitempty" yaml:"node-name,omitempty"`
WithNodeID bool `json:"with-node-id,omitempty" yaml:"with-node-id,omitempty"`
NodeLabels []string `json:"node-label,omitempty" yaml:"node-label,omitempty"`
NodeTaints []string `json:"node-taint,omitempty" yaml:"node-taint,omitempty"`
ImageCredentialProviderBinDir string `json:"image-credential-provider-bin-dir,omitempty" yaml:"image-credential-provider-bin-dir,omitempty"`
ImageCredentialProviderConfig string `json:"image-credential-provider-config,omitempty" yaml:"image-credential-provider-config,omitempty"`
EnableSELinux bool `json:"selinux,omitempty" yaml:"selinux,omitempty"`
LBServerPort int `json:"lb-server-port,omitempty" yaml:"lb-server-port,omitempty"`
ProtectKernelDefaults bool `json:"protect-kernel-defaults,omitempty" yaml:"protect-kernel-defaults,omitempty"`
ContainerRuntimeEndpoint string `json:"container-runtime-endpoint,omitempty" yaml:"container-runtime-endpoint,omitempty"`
DefaultRuntime string `json:"default-runtime,omitempty" yaml:"default-runtime,omitempty"`
ImageServiceEndpoint string `json:"image-service-endpoint,omitempty" yaml:"image-service-endpoint,omitempty"`
PauseImage string `json:"pause-image,omitempty" yaml:"pause-image,omitempty"`
Snapshotter string `json:"snapshotter,omitempty" yaml:"snapshotter,omitempty"`
PrivateRegistry string `json:"private-registry,omitempty" yaml:"private-registry,omitempty"`
DisableDefaultRegistryEndpoint bool `json:"disable-default-registry-endpoint,omitempty" yaml:"disable-default-registry-endpoint,omitempty"`
NonrootDevices bool `json:"nonroot-devices,omitempty" yaml:"nonroot-devices,omitempty"`
AirgapExtraRegistry []string `json:"airgap-extra-registry,omitempty" yaml:"airgap-extra-registry,omitempty"`
NodeIP []string `json:"node-ip,omitempty" yaml:"node-ip,omitempty"`
BindAddress string `json:"bind-address,omitempty" yaml:"bind-address,omitempty"`
NodeExternalIP []string `json:"node-external-ip,omitempty" yaml:"node-external-ip,omitempty"`
NodeInternalDNS []string `json:"node-internal-dns,omitempty" yaml:"node-internal-dns,omitempty"`
NodeExternalDNS []string `json:"node-external-dns,omitempty" yaml:"node-external-dns,omitempty"`
ResolvConf string `json:"resolv-conf,omitempty" yaml:"resolv-conf,omitempty"`
FlannelIface string `json:"flannel-iface,omitempty" yaml:"flannel-iface,omitempty"`
FlannelConf string `json:"flannel-conf,omitempty" yaml:"flannel-conf,omitempty"`
FlannelCniConfFile string `json:"flannel-cni-conf,omitempty" yaml:"flannel-cni-conf,omitempty"`
KubeletArg []string `json:"kubelet-arg,omitempty" yaml:"kubelet-arg,omitempty"`
KubeProxyArg []string `json:"kube-proxy-arg,omitempty" yaml:"kube-proxy-arg,omitempty"`
EnablePProf bool `json:"enable-pprof,omitempty" yaml:"enable-pprof,omitempty"`
Rootless bool `json:"rootless,omitempty" yaml:"rootless,omitempty"`
PreferBundledBin bool `json:"prefer-bundled-bin,omitempty" yaml:"prefer-bundled-bin,omitempty"`
Docker bool `json:"docker,omitempty" yaml:"docker,omitempty"`
VPNAuth string `json:"vpn-auth,omitempty" yaml:"vpn-auth,omitempty"`
VPNAuthFile string `json:"vpn-auth-file,omitempty" yaml:"vpn-auth-file,omitempty"`
DisableApiServerLB bool `json:"disable-apiserver-lb,omitempty" yaml:"disable-apiserver-lb,omitempty"`
}