1 /* 2 Copyright 2019 The Kubernetes Authors. 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 */ 16 17 package options 18 19 const ( 20 // 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. 21 APIServerAdvertiseAddress = "apiserver-advertise-address" 22 23 // APIServerBindPort flag sets the port for the API Server to bind to. 24 APIServerBindPort = "apiserver-bind-port" 25 26 // APIServerCertSANs flag sets extra Subject Alternative Names (SANs) to use for the API Server serving certificate. Can be both IP addresses and DNS names. 27 APIServerCertSANs = "apiserver-cert-extra-sans" 28 29 // APIServerExtraArgs flag sets a extra flags to pass to the API Server or override default ones in form of <flagname>=<value>. 30 APIServerExtraArgs = "apiserver-extra-args" 31 32 // CertificatesDir flag sets the path where to save and read the certificates. 33 CertificatesDir = "cert-dir" 34 35 // CfgPath flag sets the path to kubeadm config file. 36 CfgPath = "config" 37 38 // ControllerManagerExtraArgs flag sets extra flags to pass to the Controller Manager or override default ones in form of <flagname>=<value>. 39 ControllerManagerExtraArgs = "controller-manager-extra-args" 40 41 // ControlPlaneEndpoint flag sets a stable IP address or DNS name for the control plane. 42 ControlPlaneEndpoint = "control-plane-endpoint" 43 44 // DryRun flag instructs kubeadm to don't apply any changes; just output what would be done. 45 DryRun = "dry-run" 46 47 // FeatureGatesString flag sets key=value pairs that describe feature gates for various features. 48 FeatureGatesString = "feature-gates" 49 50 // 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. 51 IgnorePreflightErrors = "ignore-preflight-errors" 52 53 // ImageRepository sets the container registry to pull control plane images from. 54 ImageRepository = "image-repository" 55 56 // KubeconfigDir flag sets the path where to save the kubeconfig file. 57 KubeconfigDir = "kubeconfig-dir" 58 59 // 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. 60 KubeconfigPath = "kubeconfig" 61 62 // KubernetesVersion flag sets the Kubernetes version for the control plane. 63 KubernetesVersion = "kubernetes-version" 64 65 // NetworkingDNSDomain flag sets the domain for services, e.g. "myorg.internal". 66 NetworkingDNSDomain = "service-dns-domain" 67 68 // NetworkingServiceSubnet flag sets the range of IP address for service VIPs. 69 NetworkingServiceSubnet = "service-cidr" 70 71 // NetworkingPodSubnet flag sets the range of IP addresses for the pod network. If set, the control plane will automatically allocate CIDRs for every node. 72 NetworkingPodSubnet = "pod-network-cidr" 73 74 // NodeCRISocket flag sets the CRI socket to connect to. 75 NodeCRISocket = "cri-socket" 76 77 // NodeName flag sets the node name. 78 NodeName = "node-name" 79 80 // SchedulerExtraArgs flag sets extra flags to pass to the Scheduler or override default ones in form of <flagname>=<value>". 81 SchedulerExtraArgs = "scheduler-extra-args" 82 83 // SkipTokenPrint flag instructs kubeadm to skip printing of the default bootstrap token generated by 'kubeadm init'. 84 SkipTokenPrint = "skip-token-print" 85 86 // TokenStr flags sets both the discovery-token and the tls-bootstrap-token when those values are not provided 87 TokenStr = "token" 88 89 // TokenTTL flag sets the time to live for token 90 TokenTTL = "token-ttl" 91 92 // TokenUsages flag sets the usages of the token 93 TokenUsages = "usages" 94 95 // TokenGroups flag sets the authentication groups of the token 96 TokenGroups = "groups" 97 98 // TokenDescription flag sets the description of the token 99 TokenDescription = "description" 100 101 // TLSBootstrapToken flag sets the token used to temporarily authenticate with the Kubernetes Control Plane to submit a certificate signing request (CSR) for a locally created key pair 102 TLSBootstrapToken = "tls-bootstrap-token" 103 104 // TokenDiscovery flag sets the token used to validate cluster information fetched from the API server (for token-based discovery) 105 TokenDiscovery = "discovery-token" 106 107 // TokenDiscoveryCAHash flag instructs kubeadm to validate that the root CA public key matches this hash (for token-based discovery) 108 TokenDiscoveryCAHash = "discovery-token-ca-cert-hash" 109 110 // TokenDiscoverySkipCAHash flag instructs kubeadm to skip CA hash verification (for token-based discovery) 111 TokenDiscoverySkipCAHash = "discovery-token-unsafe-skip-ca-verification" 112 113 // FileDiscovery flag sets the file or URL from which to load cluster information (for file-based discovery) 114 FileDiscovery = "discovery-file" 115 116 // ControlPlane flag instructs kubeadm to create a new control plane instance on this node 117 ControlPlane = "control-plane" 118 119 // UploadCerts flag instructs kubeadm to upload certificates 120 UploadCerts = "upload-certs" 121 122 // CertificateKey flag sets the key used to encrypt and decrypt certificate secrets 123 CertificateKey = "certificate-key" 124 125 // SkipCertificateKeyPrint flag instructs kubeadm to skip printing certificate key used to encrypt certs by 'kubeadm init'. 126 SkipCertificateKeyPrint = "skip-certificate-key-print" 127 128 // ForceReset flag instructs kubeadm to reset the node without prompting for confirmation 129 ForceReset = "force" 130 131 // CertificateRenewal flag instructs kubeadm to execute certificate renewal during upgrades 132 CertificateRenewal = "certificate-renewal" 133 134 // EtcdUpgrade flag instructs kubeadm to execute etcd upgrade during upgrades 135 EtcdUpgrade = "etcd-upgrade" 136 137 // Patches flag sets the folder where kubeadm component patches are stored 138 Patches = "patches" 139 140 // PrintManifest flag instructs kubeadm to print the addon manifests to STDOUT instead of installing them. 141 PrintManifest = "print-manifest" 142 143 // CleanupTmpDir flag indicates whether reset will cleanup the tmp dir 144 CleanupTmpDir = "cleanup-tmp-dir" 145 146 // AllowExperimentalAPI flag can be used to allow experimental / work in progress APIs 147 AllowExperimentalAPI = "allow-experimental-api" 148 149 // AllowRCUpgrades enable this flag will allow upgrading to a release candidate version of Kubernetes. 150 AllowRCUpgrades = "allow-release-candidate-upgrades" 151 152 // AllowExperimentalUpgrades enable this flag will allow upgrading to an alpha/beta/release candidate version of Kubernetes. 153 AllowExperimentalUpgrades = "allow-experimental-upgrades" 154 155 // PrintConfig specifies whether the cluster configuration that will be used in the upgrade should be printed or not. 156 PrintConfig = "print-config" 157 ) 158