Browse Source

build is optional

pull/1/head
Nicolas Massé 3 years ago
parent
commit
0be1c85cea
  1. 2
      charts/eshop/templates/eshop-api.yaml
  2. 2
      charts/eshop/templates/eshop-web.yaml
  3. 19
      charts/eshop/values.schema.json
  4. 2
      charts/eshop/values.yaml

2
charts/eshop/templates/eshop-api.yaml

@ -16,6 +16,7 @@ spec:
lookupPolicy: lookupPolicy:
local: false local: false
--- ---
{{ if .Values.build.enabled }}
apiVersion: build.openshift.io/v1 apiVersion: build.openshift.io/v1
kind: BuildConfig kind: BuildConfig
metadata: metadata:
@ -61,6 +62,7 @@ spec:
- type: ConfigChange - type: ConfigChange
- imageChange: {} - imageChange: {}
type: ImageChange type: ImageChange
{{ end }}
--- ---
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment

2
charts/eshop/templates/eshop-web.yaml

@ -16,6 +16,7 @@ spec:
lookupPolicy: lookupPolicy:
local: false local: false
--- ---
{{ if .Values.build.enabled }}
apiVersion: build.openshift.io/v1 apiVersion: build.openshift.io/v1
kind: BuildConfig kind: BuildConfig
metadata: metadata:
@ -61,6 +62,7 @@ spec:
- type: ConfigChange - type: ConfigChange
- imageChange: {} - imageChange: {}
type: ImageChange type: ImageChange
{{ end }}
--- ---
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment

19
charts/eshop/values.schema.json

@ -69,11 +69,28 @@
"webHostname" "webHostname"
], ],
"title": "Ingress" "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": [ "required": [
"database", "database",
"ingress" "ingress",
"build"
], ],
"title": "eShopOnWeb Application" "title": "eShopOnWeb Application"
} }

2
charts/eshop/values.yaml

@ -7,3 +7,5 @@ database:
ingress: ingress:
webHostname: "" webHostname: ""
apiHostname: "" apiHostname: ""
build:
enabled: true

Loading…
Cancel
Save