Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build/vmagent: set STS
serviceName
for headless service with non em…
…pty shardCount Previously, `serviceName` param for `VMAgent` with `statefulMode` and shardCount != nil was not set. It caused an issue with headless service routing. By default, kubernetes expects it to be the same as Statefulset name. But for sharded `VMAgent` operator creates multiple StatefulSets with a single Service. Consider the following example: * headless service name - `vmagent-main` * statefulsets shard names - `vmagent-main-0`, `vmagent-main-1` Kubernetes expects corresponding Service to exist. But since operator defines only a single Service. It requires to set `serviceName: vmagent-main` for each StatefulSet. This issue makes dns name: `vmagent-main-0-0.vmagent-main.default.svc` unreachable. This commit fixes it by explicitly set `serviceName` for `shardCount != nil`. Signed-off-by: f41gh7 <[email protected]>
- Loading branch information