From 0be1c85cea2c7bc32354a1801b348f102973fbc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Mass=C3=A9?= Date: Thu, 15 Jun 2023 12:00:50 +0200 Subject: [PATCH] build is optional --- charts/eshop/templates/eshop-api.yaml | 2 ++ charts/eshop/templates/eshop-web.yaml | 2 ++ charts/eshop/values.schema.json | 19 ++++++++++++++++++- charts/eshop/values.yaml | 2 ++ 4 files changed, 24 insertions(+), 1 deletion(-) diff --git a/charts/eshop/templates/eshop-api.yaml b/charts/eshop/templates/eshop-api.yaml index 8c2bd26..e7d8aa1 100644 --- a/charts/eshop/templates/eshop-api.yaml +++ b/charts/eshop/templates/eshop-api.yaml @@ -16,6 +16,7 @@ spec: lookupPolicy: local: false --- +{{ if .Values.build.enabled }} apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: @@ -61,6 +62,7 @@ spec: - type: ConfigChange - imageChange: {} type: ImageChange +{{ end }} --- apiVersion: apps/v1 kind: Deployment diff --git a/charts/eshop/templates/eshop-web.yaml b/charts/eshop/templates/eshop-web.yaml index 4f0c7dc..0f33dcf 100644 --- a/charts/eshop/templates/eshop-web.yaml +++ b/charts/eshop/templates/eshop-web.yaml @@ -16,6 +16,7 @@ spec: lookupPolicy: local: false --- +{{ if .Values.build.enabled }} apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: @@ -61,6 +62,7 @@ spec: - type: ConfigChange - imageChange: {} type: ImageChange +{{ end }} --- apiVersion: apps/v1 kind: Deployment diff --git a/charts/eshop/values.schema.json b/charts/eshop/values.schema.json index e39767a..e7ea31e 100644 --- a/charts/eshop/values.schema.json +++ b/charts/eshop/values.schema.json @@ -69,11 +69,28 @@ "webHostname" ], "title": "Ingress" + }, + "build": { + "type": "object", + "additionalProperties": false, + "properties": { + "enabled": { + "title": "Build enabled?", + "type": "boolean", + "default": true, + "description": "Build the eShopOnWeb application in this namespace?" + } + }, + "required": [ + "enabled" + ], + "title": "Build" } }, "required": [ "database", - "ingress" + "ingress", + "build" ], "title": "eShopOnWeb Application" } diff --git a/charts/eshop/values.yaml b/charts/eshop/values.yaml index 10e8189..10e7d79 100644 --- a/charts/eshop/values.yaml +++ b/charts/eshop/values.yaml @@ -7,3 +7,5 @@ database: ingress: webHostname: "" apiHostname: "" +build: + enabled: true