Skip to content

Commit

Permalink
fix: correct deploy action validation in container plugin extension (#…
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
vvagaytsev authored Oct 30, 2024
1 parent 4ebe997 commit ba2a495
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion core/src/plugins/kubernetes/container/extensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,10 @@ export const k8sContainerDeployExtension = (): DeployActionExtension<ContainerDe
stopSync: k8sContainerStopSync,
getSyncStatus: k8sContainerGetSyncStatus,

validate: async ({ ctx, action }) => {
validate: async ({ ctx, action, base }) => {
if (base) {
await base({ action })
}
validateDeploySpec(action.name, <KubernetesProvider>ctx.provider, action.getSpec())
return {}
},
Expand Down
5 changes: 4 additions & 1 deletion core/src/plugins/openshift/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ export const openshiftContainerDeployExtension = (): DeployActionExtension<Conta
stopSync: k8sContainerStopSync,
getSyncStatus: k8sContainerGetSyncStatus,

validate: async ({ ctx, action }) => {
validate: async ({ ctx, action, base }) => {
if (base) {
await base({ action })
}
validateDeploySpec(action.name, <KubernetesProvider>ctx.provider, action.getSpec())
return {}
},
Expand Down

0 comments on commit ba2a495

Please sign in to comment.