From c12323c2dc74a4ec92d94551e777ceb7e8a51d0e Mon Sep 17 00:00:00 2001 From: Mario Manno Date: Tue, 29 Nov 2022 13:54:00 +0100 Subject: [PATCH] Add reference for (internal) config options --- docs/ref-configuration.md | 57 +++++++++++++++++++++++++++++++++++++++ sidebars.js | 1 + 2 files changed, 58 insertions(+) create mode 100644 docs/ref-configuration.md diff --git a/docs/ref-configuration.md b/docs/ref-configuration.md new file mode 100644 index 000000000..aa492cfec --- /dev/null +++ b/docs/ref-configuration.md @@ -0,0 +1,57 @@ +# Configuration + +A reference list of, mostly internal, configuration options. + +## Helm Charts + +The Helm charts accept, at least, the options as shown with their default in `values.yaml`: + +* https://github.com/rancher/fleet/blob/master/charts/fleet/values.yaml +* https://github.com/rancher/fleet/blob/master/charts/fleet-crds/values.yaml +* https://github.com/rancher/fleet/blob/master/charts/fleet-agent/values.yaml + +## Environment Variables + +The controllers can be started with these environment variables: + +* `CATTLE_DEV_MODE` - used to debug wrangler, not usable +* `FLEET_CLUSTER_ENQUEUE_DELAY` - tune how often non-ready clusters are checked +* `FLEET_CPU_PPROF_PERIOD` - used to turn on [performance profiling](https://github.com/rancher/fleet/blob/master/DEVELOPING.md#examining-performance-issues) + +## Configuration + +In cluster configuration for the agent and fleet manager. Changing these can lead to full re-deployments. + +The config [struct](https://github.com/rancher/fleet/blob/master/pkg/config/config.go#L40-L52) is used in both config maps: + +* cattle-fleet-system/fleet-agent +* cattle-fleet-system/fleet-controller + +## Labels + +Labels used by fleet: + +* `fleet.cattle.io/agent=true` - NodeSelector label for agent's deployment affinity setting +* `fleet.cattle.io/non-managed-agent` - managed agent bundle won't target Clusters with this label +* `fleet.cattle.io/repo-name` - used on Bundle to reference the git repo resource +* `fleet.cattle.io/bundle-namespace` - used on BundleDeployment to reference the Bundle resource +* `fleet.cattle.io/bundle-name` - used on BundleDeployment to reference the Bundle resource +* `fleet.cattle.io/managed=true` - cluster namespaces with this label will be cleaned up. Other resources will be cleaned up if it is in a label. Used in Rancher to identify fleet namespaces. +* `fleet.cattle.io/bootstrap-token` - unused + + +## Annotations + +Annotations used by fleet: + +* `fleet.cattle.io/agent-namespace` +* `fleet.cattle.io/bundle-id` +* `fleet.cattle.io/cluster`, `fleet.cattle.io/cluster-namespace` - if present on a Cluster, the namespace won't be cleaned up +* `fleet.cattle.io/cluster`, `fleet.cattle.io/cluster-namespace` - used on a cluster namespace to reference the cluster registration namespace +* `fleet.cattle.io/cluster-group` +* `fleet.cattle.io/cluster-registration-namespace` +* `fleet.cattle.io/cluster-registration` +* `fleet.cattle.io/commit` +* `fleet.cattle.io/managed` - appears unused +* `fleet.cattle.io/service-account` + diff --git a/sidebars.js b/sidebars.js index be24dacc3..939b72873 100644 --- a/sidebars.js +++ b/sidebars.js @@ -68,6 +68,7 @@ module.exports = { type: 'category', label: 'Reference', items:[ + 'ref-configuration', 'ref-components', 'ref-bundle-stages', 'ref-resources',