feat(custom-app): Add custom command UI (#2983)

* feat(custom-app): Add custom command UI

* give custom command it's own checkbox

Co-authored-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl>
This commit is contained in:
Stavros Kois
2022-06-27 12:38:05 +03:00
committed by GitHub
parent 4e708732a9
commit e4e6f86d2c
5 changed files with 29 additions and 1 deletions

View File

@@ -31,6 +31,11 @@ include_questions(){
/# Include{controllerExpert}/ { for (i=0;i<n;++i) print a[i]; next }
1' templates/questions/controllerExpert.yaml ${target}/questions.yaml > "tmp${chartname}" && mv "tmp${chartname}" ${target}/questions.yaml
# Replace # Include{controllerExpertCommand} with the standard controllerExpertCommand codesnippet
awk 'NR==FNR { a[n++]=$0; next }
/# Include{controllerExpertCommand}/ { for (i=0;i<n;++i) print a[i]; next }
1' templates/questions/controllerExpertCommand.yaml ${target}/questions.yaml > "tmp${chartname}" && mv "tmp${chartname}" ${target}/questions.yaml
# Replace # Include{containerConfig} with the standard containerConfig codesnippet
awk 'NR==FNR { a[n++]=$0; next }
/# Include{containerConfig}/ { for (i=0;i<n;++i) print a[i]; next }

View File

@@ -19,7 +19,7 @@ name: custom-app
sources:
- https://github.com/truecharts/apps/tree/master/charts/stable/custom-app
type: application
version: 5.0.16
version: 5.1.0
annotations:
truecharts.org/catagories: |
- custom

View File

@@ -106,6 +106,7 @@ questions:
description: "RollingUpdate: Create new pods and then kill old ones"
- value: "OnDelete"
description: "(Legacy) OnDelete: ignore .spec.template changes"
# Include{controllerExpertCommand}
# Include{controllerExpert}
# Include{containerConfig}

View File

@@ -0,0 +1,17 @@
- variable: customcommand
label: "Show Custom Command Options"
schema:
type: boolean
default: false
show_subquestions_if: true
subquestions:
- variable: command
label: "Command"
schema:
type: list
default: []
items:
- variable: param
label: "param"
schema:
type: string

View File

@@ -130,6 +130,11 @@ include_questions(){
/# Include{controllerExpert}/ { for (i=0;i<n;++i) print a[i]; next }
1' templates/questions/controllerExpert.yaml ${target}/questions.yaml > "tmp${chartname}" && mv "tmp${chartname}" ${target}/questions.yaml
# Replace # Include{controllerExpertCommand} with the standard controllerExpertCommand codesnippet
awk 'NR==FNR { a[n++]=$0; next }
/# Include{controllerExpertCommand}/ { for (i=0;i<n;++i) print a[i]; next }
1' templates/questions/controllerExpertCommand.yaml ${target}/questions.yaml > "tmp${chartname}" && mv "tmp${chartname}" ${target}/questions.yaml
# Replace # Include{containerConfig} with the standard containerConfig codesnippet
awk 'NR==FNR { a[n++]=$0; next }
/# Include{containerConfig}/ { for (i=0;i<n;++i) print a[i]; next }