-
Notifications
You must be signed in to change notification settings - Fork 189
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
I am are trying to implement a Pod Disruption budget for vmAgent across multiple shards.
Example
I have 5 shards with 3x replicas each. I want a policy to ensure each shard can have max 1 pod unavailable in a budgeting scenario.
Using label selectors to achieve this in our deployment:
podDisruptionBudget:
maxUnavailable: 1
selectorLabels:
app.kubernetes.io/component: monitoring
app.kubernetes.io/instance: vmagent
app.kubernetes.io/name: vmagent
managed-by: vm-operator
shard-num: '%SHARD_NUM%'
Issue arises with the last line shard-num: '%SHARD_NUM%'
The logs show this error
error":"cannot update pod disruption budget for vmagent: PodDisruptionBudget.policy \"vmagent-vmagent\" is invalid: spec.selector.matchLabels: Invalid value: \"%SHARD_NUM%\": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')"}
The SHARD_NUM is not getting processed by the operator.
Due to this I am struggling to get vmagent scheduled.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working