fix: use context for k8s config
This commit is contained in:
parent
acd042b4de
commit
c5c2f8a93b
@ -58,10 +58,10 @@ export default class KubernetesIntegration extends Integration<T> {
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Some very ugly nesting but it's necessary
|
// Some very ugly nesting but it's necessary
|
||||||
if (process.env.HEADSCALE_INTEGRATION_UNSTRICT === 'true') {
|
if (this.context.validate_manifest === false) {
|
||||||
log.warn('INTG', 'Skipping strict Pod status check');
|
log.warn('INTG', 'Skipping strict Pod status check');
|
||||||
} else {
|
} else {
|
||||||
const pod = process.env.POD_NAME;
|
const pod = this.context.pod_name;
|
||||||
if (!pod) {
|
if (!pod) {
|
||||||
log.error('INTG', 'Missing POD_NAME variable');
|
log.error('INTG', 'Missing POD_NAME variable');
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@ -37,6 +37,7 @@ const dockerConfig = type({
|
|||||||
|
|
||||||
const kubernetesConfig = type({
|
const kubernetesConfig = type({
|
||||||
enabled: stringToBool,
|
enabled: stringToBool,
|
||||||
|
pod_name: 'string',
|
||||||
validate_manifest: stringToBool,
|
validate_manifest: stringToBool,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user