Configuration file structure
furyctl uses a configuration file (named furyctl.yaml by default) to define the complete configuration of a SIGHUP Distribution cluster.
The configuration file structure depends on the kind (alias for the Provider) of the cluster being created.
All configuration files share a common base structure though:
apiVersion: <version>
kind: <kind>
metadata:
name: <name>
spec:
infrastructure:
kubernetes:
distribution:
plugins:
flags: # optional
For each field of each provider, see the configuration file reference.
Spec
The .spec portion contains the phases that are executed by furyctl to provision a SD cluster.
.spec.infrastructure
The .spec.infrastructure portion will contain all the parameters needed to create the infrastructure that will host a Kubernetes cluster. For example, on AWS this will configure the VPC and VPN. Not all providers have this phase, see the Providers documentation for more details.
.spec.kubernetes
The .spec.kubernetes portion will contain the actual configuration for the Kubernetes cluster, options and nodepools. It is used to drive the creation of a Kubernetes cluster with a provider of your choice. Not all providers have this phase, see the Providers documentation for more details.
.spec.distribution
The .spec.distribution portion will contain all the configurations on the SIGHUP Distribution core modules that will be installed inside the Kubernetes cluster.
The defaults give a production-grade cluster, not an empty one. furyctl fills each field that the configuration file does not set with a default value, and the defaults enable modules. For example, if the file does not set them, furyctl installs Logging with OpenSearch, Monitoring with Prometheus and Tracing with Tempo. The file that furyctl create config writes also enables modules, for example Policy with Gatekeeper.
So a module that is not in the file can still be installed. To not install a module, set its type to none (for Ingress, set nginx.type and haproxy.type):
spec:
distribution:
modules:
tracing: # or another module
type: none
The defaults also set these values:
- Data retention: Loki, Prometheus, Mimir and Tempo keep data for 30 days. Prometheus also keeps at most 120 GB. The Disaster recovery module keeps the etcd backups for 10 days. To change a value, set the
retentionTimefield of the component, for examplespec.distribution.modules.monitoring.prometheus.retentionTime. - Ingresses: when the Ingress module is installed, each module that has a web interface gets an Ingress resource.
For the default values of each provider, see the distribution repository.
.spec.distribution.customPatches
The .spec.distribution.customPatches section allows you to apply patches to the manifests generated during the distribution phase.
As furyctl uses Kustomize under the hood to generate the distribution's manifests, the .spec.distribution.customPatches is a hook to insert custom behavior during the execution of Kustomize.
You can specify:
-
a
patchesStrategicMergearray of files that follow Kustomize'spatchesStrategicMergespec.warningThis field is not recommended anymore, as we switched to Kustomize v5 and it is deprecated there. Use
patchesinstead, see more below. -
a
patchesarray of objects that follow Kustomize's patches spec. -
a
configMapGeneratorarray of objects that follow Kustomize'sconfigMapGeneratorspec. -
a
secretGeneratorarray of objects that follow Kustomize'ssecretGeneratorspec. -
a
imagesarray of objects that follow Kustomize'simagesspec.
Custom patches can disrupt a cluster's configuration in unpredictable ways. This field can possibly make your cluster unavailable and it should be used only if you know exactly what you are doing.
Use with caution!
For examples of customPatches, see Customize the Dex branding and Enable the PROXY protocol.
.spec.distribution.customResources
The .spec.distribution.customResources section adds your own resources to the manifests of the distribution phase.
furyctl appends each entry to the resources list of the Kustomization that builds the distribution. Kustomize applies these resources together with the SD core modules, in the same phase. All the providers support this field.
Each entry is a string that points to one of these:
- a manifest file.
- a directory that contains a Kustomize base.
- a remote resource, such as a Git repository or a URL. It uses Kustomize's remote target syntax.
furyctl resolves a local path against the directory that contains furyctl.yaml. Both ./my-base and my-base are correct.
If an entry does not match a local file or directory, furyctl passes the entry to Kustomize without a change. Remote resources work in this way.
A local path with a typo does not match a file, so furyctl passes it to Kustomize unchanged. When Kustomize builds the manifests, the distribution phase fails.
Keep your resources inside the project directory. If a path resolves outside the directory that contains furyctl.yaml, furyctl prints a warning. The generated manifests are then different on other machines.
For example:
...
spec:
...
distribution:
customResources:
- "./manifests/storageclass.yaml"
- "./manifests/csi-driver"
- "github.com/example/repo//base?ref=v1.0.0"
Use customResources only when furyctl must apply the resources in the distribution phase, together with the core modules.
For all the other resources, use plugins. Plugins are the preferred way to add resources to a cluster, and you can remove them with helm or kapp.
Put the provider of the default StorageClass in customResources. Some components need a default StorageClass, and the distribution phase skips them when there is none. After the distribution phase, furyctl finds the StorageClass and applies the distribution phase again, before the plugins phase. A provider in plugins also works, but furyctl installs these components only after the plugins phase.
.spec.plugins
The .spec.plugins portion will contain all the additional Helm Charts/Kustomize projects that we want to install inside the Kubernetes cluster. This is intended to be the place where you add things that you consider to be part of the cluster's core components, which will be managed by furyctl and not by other means. It's not intended as a mean to place actual application workload inside the cluster.
As an example, you could install as a plugin the resources needed to use a CSI of your choice.
Flags
The optional flags section, at the same level as spec, keeps the default values of the furyctl command flags. Then each person who uses the file runs the commands with the same flags. The section has one group for each command, and the global group for all the commands:
flags:
global:
debug: true
apply:
skipDepsValidation: true
timeout: 7200
A FURYCTL_* environment variable or a flag on the command line overrides the value in the file. You cannot set the config flag in this section. For the commands and the flags that you can set, see Flags configuration.
Phases
Each one of the aforementioned portions defines also a phase of furyctl's execution.
During creation, the phases will be executed in the following order: infrastructure -> kubernetes -> distribution -> plugins.
The phases can also be executed in standalone mode if necessary, using the flag
--phasewithfuryctl.