mirror of https://github.com/k3s-io/k3s
Merge pull request #73942 from rumshenoy/cleanup_constants
Move all constants to a single `const (`pull/564/head
commit
a20c186d80
|
@ -16,104 +16,106 @@ limitations under the License.
|
||||||
|
|
||||||
package options
|
package options
|
||||||
|
|
||||||
|
const (
|
||||||
// APIServerAdvertiseAddress flag sets the IP address the API Server will advertise it's listening on. Specify '0.0.0.0' to use the address of the default network interface.
|
// APIServerAdvertiseAddress flag sets the IP address the API Server will advertise it's listening on. Specify '0.0.0.0' to use the address of the default network interface.
|
||||||
const APIServerAdvertiseAddress = "apiserver-advertise-address"
|
APIServerAdvertiseAddress = "apiserver-advertise-address"
|
||||||
|
|
||||||
// APIServerBindPort flag sets the port for the API Server to bind to.
|
// APIServerBindPort flag sets the port for the API Server to bind to.
|
||||||
const APIServerBindPort = "apiserver-bind-port"
|
APIServerBindPort = "apiserver-bind-port"
|
||||||
|
|
||||||
// APIServerCertSANs flag sets extra Subject Alternative Names (SANs) to use for the API Server serving certificate. Can be both IP addresses and DNS names.
|
// APIServerCertSANs flag sets extra Subject Alternative Names (SANs) to use for the API Server serving certificate. Can be both IP addresses and DNS names.
|
||||||
const APIServerCertSANs = "apiserver-cert-extra-sans"
|
APIServerCertSANs = "apiserver-cert-extra-sans"
|
||||||
|
|
||||||
// APIServerExtraArgs flag sets a extra flags to pass to the API Server or override default ones in form of <flagname>=<value>.
|
// APIServerExtraArgs flag sets a extra flags to pass to the API Server or override default ones in form of <flagname>=<value>.
|
||||||
const APIServerExtraArgs = "apiserver-extra-args"
|
APIServerExtraArgs = "apiserver-extra-args"
|
||||||
|
|
||||||
// CertificatesDir flag sets the path where to save and read the certificates.
|
// CertificatesDir flag sets the path where to save and read the certificates.
|
||||||
const CertificatesDir = "cert-dir"
|
CertificatesDir = "cert-dir"
|
||||||
|
|
||||||
// CfgPath flag sets the path to kubeadm config file.
|
// CfgPath flag sets the path to kubeadm config file.
|
||||||
const CfgPath = "config"
|
CfgPath = "config"
|
||||||
|
|
||||||
// ControllerManagerExtraArgs flag sets extra flags to pass to the Controller Manager or override default ones in form of <flagname>=<value>.
|
// ControllerManagerExtraArgs flag sets extra flags to pass to the Controller Manager or override default ones in form of <flagname>=<value>.
|
||||||
const ControllerManagerExtraArgs = "controller-manager-extra-args"
|
ControllerManagerExtraArgs = "controller-manager-extra-args"
|
||||||
|
|
||||||
// DryRun flag instruct kubeadm to don't apply any changes; just output what would be done.
|
// DryRun flag instruct kubeadm to don't apply any changes; just output what would be done.
|
||||||
const DryRun = "dry-run"
|
DryRun = "dry-run"
|
||||||
|
|
||||||
// FeatureGatesString flag sets key=value pairs that describe feature gates for various features.
|
// FeatureGatesString flag sets key=value pairs that describe feature gates for various features.
|
||||||
const FeatureGatesString = "feature-gates"
|
FeatureGatesString = "feature-gates"
|
||||||
|
|
||||||
// IgnorePreflightErrors sets the path a list of checks whose errors will be shown as warnings. Example: 'IsPrivilegedUser,Swap'. Value 'all' ignores errors from all checks.
|
// IgnorePreflightErrors sets the path a list of checks whose errors will be shown as warnings. Example: 'IsPrivilegedUser,Swap'. Value 'all' ignores errors from all checks.
|
||||||
const IgnorePreflightErrors = "ignore-preflight-errors"
|
IgnorePreflightErrors = "ignore-preflight-errors"
|
||||||
|
|
||||||
// ImageRepository sets the container registry to pull control plane images from.
|
// ImageRepository sets the container registry to pull control plane images from.
|
||||||
const ImageRepository = "image-repository"
|
ImageRepository = "image-repository"
|
||||||
|
|
||||||
// KubeconfigDir flag sets the path where to save the kubeconfig file.
|
// KubeconfigDir flag sets the path where to save the kubeconfig file.
|
||||||
const KubeconfigDir = "kubeconfig-dir"
|
KubeconfigDir = "kubeconfig-dir"
|
||||||
|
|
||||||
// KubeconfigPath flag sets the kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations are searched for an existing KubeConfig file.
|
// KubeconfigPath flag sets the kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations are searched for an existing KubeConfig file.
|
||||||
const KubeconfigPath = "kubeconfig"
|
KubeconfigPath = "kubeconfig"
|
||||||
|
|
||||||
// KubernetesVersion flag sets the Kubernetes version for the control plane.
|
// KubernetesVersion flag sets the Kubernetes version for the control plane.
|
||||||
const KubernetesVersion = "kubernetes-version"
|
KubernetesVersion = "kubernetes-version"
|
||||||
|
|
||||||
// NetworkingDNSDomain flag sets the domain for services, e.g. "myorg.internal".
|
// NetworkingDNSDomain flag sets the domain for services, e.g. "myorg.internal".
|
||||||
const NetworkingDNSDomain = "service-dns-domain"
|
NetworkingDNSDomain = "service-dns-domain"
|
||||||
|
|
||||||
// NetworkingServiceSubnet flag sets the range of IP address for service VIPs.
|
// NetworkingServiceSubnet flag sets the range of IP address for service VIPs.
|
||||||
const NetworkingServiceSubnet = "service-cidr"
|
NetworkingServiceSubnet = "service-cidr"
|
||||||
|
|
||||||
// NetworkingPodSubnet flag sets the range of IP addresses for the pod network. If set, the control plane will automatically allocate CIDRs for every node.
|
// NetworkingPodSubnet flag sets the range of IP addresses for the pod network. If set, the control plane will automatically allocate CIDRs for every node.
|
||||||
const NetworkingPodSubnet = "pod-network-cidr"
|
NetworkingPodSubnet = "pod-network-cidr"
|
||||||
|
|
||||||
// NodeCRISocket flag sets the CRI socket to connect to.
|
// NodeCRISocket flag sets the CRI socket to connect to.
|
||||||
const NodeCRISocket = "cri-socket"
|
NodeCRISocket = "cri-socket"
|
||||||
|
|
||||||
// NodeName flag sets the node name.
|
// NodeName flag sets the node name.
|
||||||
const NodeName = "node-name"
|
NodeName = "node-name"
|
||||||
|
|
||||||
// SchedulerExtraArgs flag sets extra flags to pass to the Scheduler or override default ones in form of <flagname>=<value>".
|
// SchedulerExtraArgs flag sets extra flags to pass to the Scheduler or override default ones in form of <flagname>=<value>".
|
||||||
const SchedulerExtraArgs = "scheduler-extra-args"
|
SchedulerExtraArgs = "scheduler-extra-args"
|
||||||
|
|
||||||
// SkipTokenPrint flag instruct kubeadm to skip printing of the default bootstrap token generated by 'kubeadm init'.
|
// SkipTokenPrint flag instruct kubeadm to skip printing of the default bootstrap token generated by 'kubeadm init'.
|
||||||
const SkipTokenPrint = "skip-token-print"
|
SkipTokenPrint = "skip-token-print"
|
||||||
|
|
||||||
// CSROnly flag instructs kubeadm to create CSRs instead of automatically creating or renewing certs
|
// CSROnly flag instructs kubeadm to create CSRs instead of automatically creating or renewing certs
|
||||||
const CSROnly = "csr-only"
|
CSROnly = "csr-only"
|
||||||
|
|
||||||
// CSRDir flag sets the location for CSRs and flags to be output
|
// CSRDir flag sets the location for CSRs and flags to be output
|
||||||
const CSRDir = "csr-dir"
|
CSRDir = "csr-dir"
|
||||||
|
|
||||||
// TokenStr flags sets both the discovery-token and the tls-bootstrap-token when those values are not provided
|
// TokenStr flags sets both the discovery-token and the tls-bootstrap-token when those values are not provided
|
||||||
const TokenStr = "token"
|
TokenStr = "token"
|
||||||
|
|
||||||
// TokenTTL flag sets the time to live for token
|
// TokenTTL flag sets the time to live for token
|
||||||
const TokenTTL = "token-ttl"
|
TokenTTL = "token-ttl"
|
||||||
|
|
||||||
// TokenUsages flag sets the usages of the token
|
// TokenUsages flag sets the usages of the token
|
||||||
const TokenUsages = "usages"
|
TokenUsages = "usages"
|
||||||
|
|
||||||
// TokenGroups flag sets the authentication groups of the token
|
// TokenGroups flag sets the authentication groups of the token
|
||||||
const TokenGroups = "groups"
|
TokenGroups = "groups"
|
||||||
|
|
||||||
// TokenDescription flag sets the description of the token
|
// TokenDescription flag sets the description of the token
|
||||||
const TokenDescription = "description"
|
TokenDescription = "description"
|
||||||
|
|
||||||
// TLSBootstrapToken flag sets the token used to temporarily authenticate with the Kubernetes Master to submit a certificate signing request (CSR) for a locally created key pair
|
// TLSBootstrapToken flag sets the token used to temporarily authenticate with the Kubernetes Master to submit a certificate signing request (CSR) for a locally created key pair
|
||||||
const TLSBootstrapToken = "tls-bootstrap-token"
|
TLSBootstrapToken = "tls-bootstrap-token"
|
||||||
|
|
||||||
// TokenDiscovery flag sets the token used to validate cluster information fetched from the API server (for token-based discovery)
|
// TokenDiscovery flag sets the token used to validate cluster information fetched from the API server (for token-based discovery)
|
||||||
const TokenDiscovery = "discovery-token"
|
TokenDiscovery = "discovery-token"
|
||||||
|
|
||||||
// TokenDiscoveryCAHash flag instruct kubeadm to validate that the root CA public key matches this hash (for token-based discovery)
|
// TokenDiscoveryCAHash flag instruct kubeadm to validate that the root CA public key matches this hash (for token-based discovery)
|
||||||
const TokenDiscoveryCAHash = "discovery-token-ca-cert-hash"
|
TokenDiscoveryCAHash = "discovery-token-ca-cert-hash"
|
||||||
|
|
||||||
// TokenDiscoverySkipCAHash flag instruct kubeadm to skip CA hash verification (for token-based discovery)
|
// TokenDiscoverySkipCAHash flag instruct kubeadm to skip CA hash verification (for token-based discovery)
|
||||||
const TokenDiscoverySkipCAHash = "discovery-token-unsafe-skip-ca-verification"
|
TokenDiscoverySkipCAHash = "discovery-token-unsafe-skip-ca-verification"
|
||||||
|
|
||||||
// FileDiscovery flag sets the file or URL from which to load cluster information (for file-based discovery)
|
// FileDiscovery flag sets the file or URL from which to load cluster information (for file-based discovery)
|
||||||
const FileDiscovery = "discovery-file"
|
FileDiscovery = "discovery-file"
|
||||||
|
|
||||||
// ControlPlane flag instruct kubeadm to create a new control plane instance on this node
|
// ControlPlane flag instruct kubeadm to create a new control plane instance on this node
|
||||||
const ControlPlane = "experimental-control-plane"
|
ControlPlane = "experimental-control-plane"
|
||||||
|
)
|
||||||
|
|
Loading…
Reference in New Issue