Configure a custom values file for Scalar Manager
This document explains how to create your custom values file for the Scalar Manager chart. If you want to know the details of the parameters, please refer to the README of the Scalar Manager chart.
Required configurations​
Service configurations​
You must set service.type
to specify the Service resource type of Kubernetes. If you want to use a load balancer provided by could providers, you need to set service.type
to LoadBalancer
.
service:
type: LoadBalancer
Security concerns regarding exposing Scalar Manager​
Setting service.type
to LoadBalancer
exposes Scalar Manager outside the cluster, which may be a security concern.
Currently, Scalar Manager lacks authentication or access-control mechanisms. Because of this, exposing Scalar Manager directly to a public network without proper security measures can lead to unauthorized actions, because Scalar Manager provides features like scheduling jobs to pause Scalar products.
If external access is necessary, using a private network or properly configuring network access to your Kubernetes cluster is recommended.
Image configurations​
You must set api.image.repository
and web.image.repository
. Be sure to specify the Scalar Manager container image so that you can pull the image from the container repository.
api:
image:
repository: <SCALAR_MANAGER_API_IMAGE>
web:
image:
repository: <SCALAR_MANAGER_WEB_IMAGE>
Optional configurations​
This section explains the optional configurations when setting up a custom values file for Scalar Manager.
Scalar Manager configurations (optional based on your environment)​
You can override the api.applicationProperties
custom value to change the default configurations of Scalar Manager.
api:
applicationProperties: |
grafana.kubernetesServiceLabelName="app.kubernetes.io/name"
grafana.kubernetesServiceLabelValue="grafana"
grafana.kubernetesServicePortName="http-web"
Scalar Manager has default configurations that, for example, discover Scalar product deployments and the Prometheus and Loki services in the cluster. In most use cases, especially if you follow the guide to deploy kube-prometheus-stack
and the guide to deploy loki-stack
, you don't need to change the default configurations.
Properties that you can set in api.applicationProperties
​
The configurations for Scalar Manager are in the format of Java application properties, which are key=value
pairs. These application properties can be set by using the api.applicationProperties
custom value in the Scalar Manager Helm Chart.
Name | Description | Default value |
---|---|---|
grafana.kubernetesServiceLabelName | The label name used to discover the Grafana service in Kubernetes | app.kubernetes.io/name |
grafana.kubernetesServiceLabelValue | The label value corresponding to grafana.kubernetesServiceLabelName | grafana |
grafana.kubernetesServicePortName | The port name used to discover the Grafana service port in Kubernetes | http-web |
prometheus.kubernetesServiceLabelName | The label name used to discover the Prometheus service in Kubernetes | app |
prometheus.kubernetesServiceLabelValue | The label value corresponding to prometheus.kubernetesServiceLabelName | kube-prometheus-stack-prometheus |
prometheus.kubernetesServicePortName | The port name used to discover the Prometheus service port in Kubernetes | http-web |
loki.kubernetesServiceLabelName | The label name used to discover the Loki service in Kubernetes | app |
loki.kubernetesServiceLabelValue | The label value corresponding to loki.kubernetesServiceLabelName | loki |
loki.kubernetesServicePortName | The port name used to discover the Loki service port in Kubernetes | http-metrics |
helm.scalarRepositoryName | The name used to represent the Scalar Helm repository | scalar-labs |
helm.scalarRepositoryUrl | The URL of the Scalar Helm repository | https://scalar-labs.github.io/helm-charts |
helm.scalarAdminForKubernetesChartName | The Helm Chart name of Scalar Admin for Kubernetes in the Scalar Helm repository | scalar-admin-for-kubernetes |
helm.scalarAdminForKubernetesChartVersion | The version of the Scalar Admin for Kubernetes Helm Chart | 1.0.0 |
configMapNamespace | The namespace where the ConfigMap used by Scalar Manager is deployed | default |
configMapName | The name of the ConfigMap used by Scalar Manager | scalar-manager-metadata |
paused-state-retention.storage | The storage type used to retain paused states | configmap |
paused-state-retention.max-number | The max number that the paused states are retained by Scalar Manager | 100 |
Service discovery​
Scalar Manager uses label selectors to discover Grafana, Prometheus, and Loki services in Kubernetes, and then uses the port name to connect to them. You can modify the label selectors and the port name by setting the *.kubernetesServiceLabelName
, *.kubernetesServiceLabelValue
, and *.kubernetesServicePortName
configurations.
In general, you don't need to modify these configurations. However, if you customized the labels or port names of the Grafana, Prometheus, or Loki services when installing their Helm Charts, you should adjust these configurations to match your customizations.
Use of Scalar Admin for Kubernetes​
Scalar Manager installs the Scalar Admin for Kubernetes Helm Chart to schedule or execute the pausing of jobs on Scalar products. It sets up the Scalar Helm repository and locates the Helm Chart by using the following configurations:
helm.scalarRepositoryName
helm.scalarRepositoryUrl
helm.scalarAdminForKubernetesChartName
helm.scalarAdminForKubernetesChartVersion
Modifying these configurations isn't recommended unless you have a specific reason to do so.
ConfigMap used by Scalar Manager​
Scalar Manager uses ConfigMap to store metadata, such as the default application properties. ConfigMap is deployed in the namespace specified by the following configurations:
configMapNamespace
configMapName
Modifying these configurations isn't recommended unless you have a specific reason to do so, like if you're using a conflicting ConfigMap.
Retention of paused states​
Scalar Manager retains the paused states of Scalar products in storage. Currently, Scalar Manager can only use ConfigMap as the storage, so the paused-state-retention.storage
configuration must be set to configmap
. You can adjust the maximum number of paused states that Scalar Manager retains by setting the paused-state-retention.max-number
configuration.
When using ConfigMap for storage, it is not recommended to set a large value for paused-state-retention.max-number
due to the size limitation of ConfigMap. Data stored in a ConfigMap cannot exceed 1 MiB, which means that the maximum number of paused states that Scalar Manager can retain is approximately 3,000.