メインコンテンツまでスキップ
バージョン: 3.11

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.

NameDescriptionDefault value
grafana.kubernetesServiceLabelNameThe label name used to discover the Grafana service in Kubernetesapp.kubernetes.io/name
grafana.kubernetesServiceLabelValueThe label value corresponding to grafana.kubernetesServiceLabelNamegrafana
grafana.kubernetesServicePortNameThe port name used to discover the Grafana service port in Kuberneteshttp-web
prometheus.kubernetesServiceLabelNameThe label name used to discover the Prometheus service in Kubernetesapp
prometheus.kubernetesServiceLabelValueThe label value corresponding to prometheus.kubernetesServiceLabelNamekube-prometheus-stack-prometheus
prometheus.kubernetesServicePortNameThe port name used to discover the Prometheus service port in Kuberneteshttp-web
loki.kubernetesServiceLabelNameThe label name used to discover the Loki service in Kubernetesapp
loki.kubernetesServiceLabelValueThe label value corresponding to loki.kubernetesServiceLabelNameloki
loki.kubernetesServicePortNameThe port name used to discover the Loki service port in Kuberneteshttp-metrics
helm.scalarRepositoryNameThe name used to represent the Scalar Helm repositoryscalar-labs
helm.scalarRepositoryUrlThe URL of the Scalar Helm repositoryhttps://scalar-labs.github.io/helm-charts
helm.scalarAdminForKubernetesChartNameThe Helm Chart name of Scalar Admin for Kubernetes in the Scalar Helm repositoryscalar-admin-for-kubernetes
helm.scalarAdminForKubernetesChartVersionThe version of the Scalar Admin for Kubernetes Helm Chart1.0.0
configMapNamespaceThe namespace where the ConfigMap used by Scalar Manager is deployeddefault
configMapNameThe name of the ConfigMap used by Scalar Managerscalar-manager-metadata
paused-state-retention.storageThe storage type used to retain paused statesconfigmap
paused-state-retention.max-numberThe max number that the paused states are retained by Scalar Manager100
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.