uralkal: pass explicit true to Vector require-healthy
This commit is contained in:
parent
9ce09df7b1
commit
3a6214f113
@ -86,5 +86,15 @@ path = root / 'vector-check.yaml'
|
|||||||
path.write_text(yaml.safe_dump(vector, sort_keys=False))
|
path.write_text(yaml.safe_dump(vector, sort_keys=False))
|
||||||
subprocess.run([args.vector_bin, 'validate', '--skip-healthchecks', str(path)], env=env, check=True)
|
subprocess.run([args.vector_bin, 'validate', '--skip-healthchecks', str(path)], env=env, check=True)
|
||||||
subprocess.run([args.vector_bin, 'test', str(path)], env=env, check=True)
|
subprocess.run([args.vector_bin, 'test', str(path)], env=env, check=True)
|
||||||
|
# Exercise the actual pod argv, stopping at a deliberately missing config before any listeners/sinks start.
|
||||||
|
statefulset = next(d for d in yaml.safe_load_all((repo / 'infrastructure/vector/base/statefulset.yaml').read_text()) if d.get('kind') == 'StatefulSet')
|
||||||
|
container = next(c for c in statefulset['spec']['template']['spec']['containers'] if c['name'] == 'vector')
|
||||||
|
startup_args = list(container['args'])
|
||||||
|
missing_config = root / 'missing-vector-startup-config.yaml'
|
||||||
|
startup_args[startup_args.index('--config') + 1] = str(missing_config)
|
||||||
|
startup = subprocess.run([args.vector_bin, *startup_args], env=env, text=True, capture_output=True, timeout=10)
|
||||||
|
assert startup.returncode != 0 and str(missing_config) in startup.stdout + startup.stderr, \
|
||||||
|
'Vector pod arguments were rejected before config loading: ' + startup.stdout + startup.stderr
|
||||||
|
print('Vector pod CLI arguments accepted')
|
||||||
temporary.cleanup()
|
temporary.cleanup()
|
||||||
print('All local service-log checks passed. Live MinIO/Vault/registry delivery is not tested.')
|
print('All local service-log checks passed. Live MinIO/Vault/registry delivery is not tested.')
|
||||||
|
|||||||
@ -52,7 +52,7 @@ spec:
|
|||||||
containers:
|
containers:
|
||||||
- name: vector
|
- name: vector
|
||||||
image: timberio/vector:0.56.0-debian
|
image: timberio/vector:0.56.0-debian
|
||||||
args: ["--config", "/etc/vector/vector.yaml", "--require-healthy"]
|
args: ["--config", "/etc/vector/vector.yaml", "--require-healthy", "true"]
|
||||||
env:
|
env:
|
||||||
- {name: VECTOR_LOG, value: info}
|
- {name: VECTOR_LOG, value: info}
|
||||||
- {name: AWS_EC2_METADATA_DISABLED, value: "true"}
|
- {name: AWS_EC2_METADATA_DISABLED, value: "true"}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user