In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article analyzes "how to analyze the startup parameters of external-provisioner components". The content is detailed and easy to understand, and friends who are interested in "how to analyze the startup parameters of external-provisioner components" can follow the editor's idea to read it slowly and deeply. I hope it will be helpful to you after reading. Let's follow the editor to learn more about "how to analyze the startup parameters of external-provisioner components".
External-provisioner component startup parameter list
Refer to https://github.com/kubernetes-csi/external-provisioner#command-line-options for more information.
Var (master = flag.String ("master", "", "Master URL to build a client config from. Either this or kubeconfig needs to be set if the provisioner is being run out of cluster.") Kubeconfig = flag.String ("kubeconfig", "", "Absolute path to the kubeconfig file. Either this or master needs to be set if the provisioner is being run out of cluster.") CsiEndpoint = flag.String ("csi-address", "/ run/csi/socket", "The gRPC endpoint for Target CSI Volume.") _ = deprecatedflags.Add ("connection-timeout") volumeNamePrefix = flag.String ("volume-name-prefix", "pvc", "Prefix to apply to the name of a created volume.") VolumeNameUUIDLength = flag.Int ("volume-name-uuid-length"-1, "Truncates generated UUID of a created volume to this length. Defaults behavior is to NOT truncate.") ShowVersion = flag.Bool ("version", false, "Show version.") RetryIntervalStart = flag.Duration ("retry-interval-start", time.Second, "Initial retry interval of failed provisioning or deletion It doubles with each failure, up to retry-interval-max.") RetryIntervalMax = flag.Duration ("retry-interval-max", 5*time.Minute, "Maximum retry interval of failed provisioning or deletion.") WorkerThreads = flag.Uint ("worker-threads", 100,100," Number of provisioner worker threads, in other words nr. Of simultaneous CSI calls. ") FinalizerThreads = flag.Uint ("cloning-protection-threads", 1, "Number of simultaniously running threads, handling cloning finalizer removal") operationTimeout = flag.Duration ("timeout", 10*time.Second, "Timeout for waiting for creation or deletion of a volume") _ = deprecatedflags.Add ("provisioner") enableLeaderElection = flag.Bool ("enable-leader-election", false, "Enables leader election. If leader election is enabled, additional RBAC rules are required. Please refer to the Kubernetes CSI documentation for instructions on setting up these RBAC rules. ") LeaderElectionType = flag.String ("leader-election-type", "endpoints", "the type of leader election, options are 'endpoints' (default) or' leases' (strongly recommended). The 'endpoints' option is deprecated in favor of' leases'.") LeaderElectionNamespace = flag.String ("leader-election-namespace", "", "Namespace where the leader election resource lives. Defaults to the pod namespace if not set.") StrictTopology = flag.Bool ("strict-topology", false, "Passes only selected node topology to CreateVolume Request, unlike default behavior of passing aggregated cluster topologies that match with topology keys of the selected node.") ExtraCreateMetadata = flag.Bool ("extra-create-metadata", false, "If set, add pv/pvc metadata to plugin create requests as parameters.") MetricsAddress = flag.String ("metrics-address", "", "The TCP network address where the prometheus metrics endpoint will listen (example: `: 8080`) .The default is empty string, which means metrics endpoint is disabled.") MetricsPath = flag.String ("metrics-path", "/ metrics", "The HTTP path where prometheus metrics will be exposed. Default is `/ metrics`.") FeatureGates map [string] bool provisionController * controller.ProvisionController version = "unknown") func main () {var config * rest.Config var err error flag.Var (utilflag.NewMapStringBool (& featureGates), "feature-gates", "A set of key=value pairs that describe feature gates for alpha/experimental features. "+" Options are:\ n "+ strings.Join (utilfeature.DefaultFeatureGate.KnownFeatures (),"\ n ") klog.InitFlags (nil) flag.CommandLine.AddGoFlagSet (goflag.CommandLine) flag.Set (" logtostderr "," true ") flag.Parse (). Configuration of startup parameters for external-provisioner container deployment. Args:-- "--csi-address=$ (ADDRESS)"-- "--timeout=150s"-- "--retry-interval-start=500ms"-- "--enable-leader-election=true"-- "--leader-election-type=leases"-- "- feature-gates=Topology=true" env:-name: ADDRESS value: unix:/ / / csi/csi-provisioner.sock imagePullPolicy: "Always" volumeMounts:-name: socket-dir mountPath: / csi volumes:-name: socket-dir emptyDir: {medium: "Memory"}.
The following is part of the parameter resolution. For other parameters, please refer to https://github.com/kubernetes-csi/external-provisioner#command-line-options
Csi-address
The grpc service socket address exposed by the ceph-csi component, with which the external-provisioner component will communicate to make requests to create and delete storage. The default is / run/csi/socket.
Timeout
The timeout for creating storage and deleting storage requests is 10 seconds by default.
Enable-leader-election
Whether to enable leader election. Enable when the configuration value is true. Default is false.
Leader-election-type
There are two types of locks used in leader elections, the default endpoint and the officially recommended lease.
Leader-election-namespace
Leader elects the command space in which the lock objects are stored, by default in the namespace where external-provisioner pod is located.
Extra-create-metadata
When set to true, additional request parameters are added when the storage is created: the name of pvc, namespace, and the name of pv. The default value is false.
Worker-threads
The number of worker to perform CreateVolume/DeleteVolume operations at the same time. The default value is 100.
Retry-interval-start
The initial retry interval after failed to create or delete storage. The default value is 1 second. With each failure, the retry interval doubles until the upper limit of the-- retry-interval-max configuration is reached.
Retry-interval-max
The maximum retry interval after failed to create or delete storage. The default value is 5 minutes.
Volume-name-prefix
The prefix added to the pv name when creating the pv. The default value is pvc.
Feature-gates
Property configuration.
Configuration example:-- feature-gates=Topology=true, related to storage topology. For more information, please see:
Https://kubernetes.io/zh/blog/2018/10/11/kubernetes-%E4%B8%AD%E7%9A%84%E6%8B%93%E6%89%91%E6%84%9F%E7%9F%A5%E6%95%B0%E6%8D%AE%E5%8D%B7%E4%BE%9B%E5%BA%94/
Https://kubernetes-csi.github.io/docs/topology.html
Kube-api-qps and kube-api-burst
Used to limit the current of the client kube-client when kube-client communicates with kube-apiserver.
The implementation of current limit is token bucket algorithm. Kube-api-qps can be regarded as the speed at which tokens are generated per second, while kube-api-burst can be regarded as the size of token buckets. Requests sent by kube-client to kube-apiserver need to get tokens in token buckets before they can be sent.
Where the default value of kube-api-qps is 5 and the default value is 10.
About how to carry on the external-provisioner component startup parameter analysis to share here, hope that the above content can let you have some improvement. If you want to learn more knowledge, please pay more attention to the editor's updates. Thank you for following the website!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.