From ba2a4954a137a8fc7a8ec690b72b0f51ce800be9 Mon Sep 17 00:00:00 2001 From: Vladimir Vagaytsev <10628074+vvagaytsev@users.noreply.github.com> Date: Wed, 30 Oct 2024 14:58:38 +0100 Subject: [PATCH] fix: correct deploy action validation in container plugin extension (#6606) * fix: correct deploy action validation in container plugin extension Call base handler from original container plugin before doing extra validation. * fix: correct deploy action validation in openshift plugin extension Call base handler from original container plugin before doing extra validation. --- core/src/plugins/kubernetes/container/extensions.ts | 5 ++++- core/src/plugins/openshift/deploy.ts | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/core/src/plugins/kubernetes/container/extensions.ts b/core/src/plugins/kubernetes/container/extensions.ts index ad6d119a76..42ec815969 100644 --- a/core/src/plugins/kubernetes/container/extensions.ts +++ b/core/src/plugins/kubernetes/container/extensions.ts @@ -146,7 +146,10 @@ export const k8sContainerDeployExtension = (): DeployActionExtension { + validate: async ({ ctx, action, base }) => { + if (base) { + await base({ action }) + } validateDeploySpec(action.name, ctx.provider, action.getSpec()) return {} }, diff --git a/core/src/plugins/openshift/deploy.ts b/core/src/plugins/openshift/deploy.ts index ed59622e85..23fc7453de 100644 --- a/core/src/plugins/openshift/deploy.ts +++ b/core/src/plugins/openshift/deploy.ts @@ -42,7 +42,10 @@ export const openshiftContainerDeployExtension = (): DeployActionExtension { + validate: async ({ ctx, action, base }) => { + if (base) { + await base({ action }) + } validateDeploySpec(action.name, ctx.provider, action.getSpec()) return {} },