Config.yaml Location #194
-
Can the config.yaml be placed in different location or overridden in anyway? It's current location means that I haven't been able to overwrite it as a configmap without setting readOnlyRootFilesystem: false, which our cluster policies doesn't allow. Or is there some other way of overwriting the values in that file, such as downscaleStabilization or the metric name |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @vobrien-axway, yes the location of the config.yaml file can be configured through the environment variable You can pass any configuration value as an environment variable: You provide this in the Custom Pod Autoscaler definition, for example: apiVersion: custompodautoscaler.com/v1
kind: CustomPodAutoscaler
metadata:
name: simple-pod-metrics-python
spec:
template:
spec:
containers:
- name: simple-pod-metrics-python
image: simple-pod-metrics-python:latest
imagePullPolicy: IfNotPresent
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: flask-metric
config:
- name: configPath
value: "/my/custom/config.yaml" This would set the CPA to look for the config file at Hope that helps! |
Beta Was this translation helpful? Give feedback.
Hi @vobrien-axway, yes the location of the config.yaml file can be configured through the environment variable
configPath
:https://custom-pod-autoscaler.readthedocs.io/en/latest/reference/configuration/#configpath
You can pass any configuration value as an environment variable:
https://custom-pod-autoscaler.readthedocs.io/en/latest/reference/configuration/#configuration-passed-as-environment-variables-defined-in-deployment-yaml
You provide this in the Custom Pod Autoscaler definition, for example: