ConfigureSettingsAnnotations
All available annotations for StormForge configuration
You're viewing the 2.x documentation. For the most recent release, see the latest StormForge documentation.
The purpose of this topic is to describe how to use the cluster-defaults ConfigMap to configure default optimization settings for a cluster.
Topics:
Cluster-level defaults:
cluster-defaults in the stormforge-system namespacekubectl applyCreate a YAML file that defines a ConfigMap called cluster-defaults, with a cluster-defaults.yaml data key, and the settings you want to set in annotation syntax.
For a complete list of annotations for StormForge settings, see the Optimization settings and descriptions topic.
Your file will look something like this:
apiVersion: v1
kind: ConfigMap
metadata:
name: cluster-defaults
namespace: stormforge-system
data:
cluster-defaults.yaml: |
live.stormforge.io/schedule: "P1D"
live.stormforge.io/auto-deploy: "Disabled"
live.stormforge.io/containers.cpu.requests.min: "10m"
live.stormforge.io/containers.cpu.requests.max: "16000m"
...
Apply the file:
kubectl apply -f FILENAME -n stormforge-system
Restart the StormForge Agent:
kubectl rollout restart deployment stormforge-agent-workload-controller -n stormforge-system
To check the status of the restart, run:
kubectl rollout status deployment stormforge-agent-workload-controller -n stormforge-system -w
Any previous cluster-level default values are now removed, and your new defaults are in effect unless they are overridden at the namespace or workload level.
Optional: Confirm your changes by running the following command and then reviewing the cluster-defaults.yaml item in the Data section of the output:
kubectl describe configmap cluster-defaults -n stormforge-system
kubectl editIf the cluster-defaults ConfigMap has already been created, you can edit the ConfigMap directly.
Run the following command:
kubectl edit configmap cluster-defaults -n stormforge-system
If you see a Error from server (NotFound): configmaps "cluster-defaults" not found message, no cluster-level defaults are set. You must first create and apply a cluster defaults YAML file as described above.
If you don’t see an error message, continue to the next step.
In the .data.cluster-defaults.yaml section, add, edit, or remove annotation strings as needed.
As an example, your annotations in the cluster-defaults ConfigMap might look something like this excerpt when you’re done:
# Please edit the object below. Lines beginning with a '#' will be ignored,
# and an empty file will abort the edit. If an error occurs while saving this file will be
# reopened with the relevant failures.
#
apiVersion: v1
kind: ConfigMap
data:
cluster-defaults.yaml: |
live.stormforge.io/auto-deploy: "Enabled"
live.stormforge.io/cpu.optimization-goal: "Reliability"
live.stormforge.io/memory.optimization-goal: "Reliability"
...
To save time, you can copy the complete list of annotations from the sample ConfigMap YAML excerpt on the Cluster tab in the Copy a template section of the configuration topic.
Save your changes.
Restart the StormForge Agent:
kubectl rollout restart deployment stormforge-agent-workload-controller -n stormforge-system
To check the status of the restart, run:
kubectl rollout status deployment stormforge-agent-workload-controller -n stormforge-system -w
Any previous cluster-level default values are now removed, and your new defaults are in effect unless they are overridden at the namespace or workload level.
Optional: Confirm your changes by running the following command and then reviewing the annotations in the Data section of the output:
kubectl describe configmap cluster-defaults -n stormforge-system