From 2a7ad236d5d1c662980f90b7f3b68f5ee38004fa Mon Sep 17 00:00:00 2001 From: ElderMatt <18527012+ElderMatt@users.noreply.github.com> Date: Mon, 30 Mar 2026 09:15:59 +0200 Subject: [PATCH 1/2] feat: only allow container creation when tekton is enabled --- src/otomi-stack.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/otomi-stack.ts b/src/otomi-stack.ts index 5bf07125..b893a747 100644 --- a/src/otomi-stack.ts +++ b/src/otomi-stack.ts @@ -1397,6 +1397,8 @@ export default class OtomiStack { } async createAplBuild(teamId: string, data: AplBuildRequest): Promise { + const tekton = this.getApp('tekton') + if (!tekton?.values?.enabled) throw new ForbiddenError('Tekton is not enabled, cannot create container image') const buildName = `${data?.spec?.imageName}-${data?.spec?.tag}` if (data.spec.secretName && data.spec.secretName.length < 2) throw new ValidationError('Secret name must be at least 2 characters long') From db48a344e831e1f8cdd45ff82db36eccd22c9de4 Mon Sep 17 00:00:00 2001 From: ElderMatt <18527012+ElderMatt@users.noreply.github.com> Date: Tue, 31 Mar 2026 11:00:36 +0200 Subject: [PATCH 2/2] fix: add check for harbor on build create --- src/otomi-stack.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/otomi-stack.ts b/src/otomi-stack.ts index b893a747..f3779502 100644 --- a/src/otomi-stack.ts +++ b/src/otomi-stack.ts @@ -1398,7 +1398,9 @@ export default class OtomiStack { async createAplBuild(teamId: string, data: AplBuildRequest): Promise { const tekton = this.getApp('tekton') - if (!tekton?.values?.enabled) throw new ForbiddenError('Tekton is not enabled, cannot create container image') + const harbor = this.getApp('harbor') + if (!tekton?.values?.enabled || !harbor?.values?.enabled) + throw new ForbiddenError('Tekton and Harbor need to be enabled, cannot create container image') const buildName = `${data?.spec?.imageName}-${data?.spec?.tag}` if (data.spec.secretName && data.spec.secretName.length < 2) throw new ValidationError('Secret name must be at least 2 characters long')