Skip to content
This repository has been archived by the owner on Mar 17, 2020. It is now read-only.

Commit

Permalink
Add kubernetes namespace customization to Spotguide
Browse files Browse the repository at this point in the history
  • Loading branch information
sagikazarmark committed Mar 21, 2019
1 parent 5202e4f commit 1281112
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 21 deletions.
5 changes: 3 additions & 2 deletions .banzaicloud/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pipeline:
clusterSecret:
name: '{{ .CICD_REPO_NAME }}-mysql-user'
# sourceSecretName:
namespace: default
# namespace:
merge: true
spec:
- name: mysql-username
Expand All @@ -62,7 +62,7 @@ pipeline:
clusterSecret:
name: '{{ .CICD_REPO_NAME }}-mysql-root-password'
# sourceSecretName:
namespace: default
# namespace:
merge: true
spec:
- name: mysql-root-password
Expand All @@ -77,6 +77,7 @@ pipeline:
action: EnsureDeployment
deployment:
name: './spotguide-modern-go-application-0.2.0.tgz'
# namespace:
reuseValues: true
releaseName: '{{ .CICD_REPO_NAME }}'
wait: true
Expand Down
53 changes: 34 additions & 19 deletions .banzaicloud/spotguide.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ questions:
- type: secret
dataType: password
name: docker-hub
group: Docker Hub credentials
group: 1. Docker Hub credentials
required:
input: true
username: true
Expand All @@ -27,15 +27,15 @@ questions:
- type: pipeline
dataType: boolean
key: mysql-install
group: MySQL
group: 2. MySQL database
label: Install MySQL server
default: true
order: 1
targets:
- deploy_application.deployment.values.mysql.enabled
- type: pipeline
dataType: string
group: MySQL
group: 2. MySQL database
label: Host
required: true
minLength: 1
Expand All @@ -48,7 +48,7 @@ questions:
const: false
- type: pipeline
dataType: number
group: MySQL
group: 2. MySQL database
label: Port
required: true
default: 3306
Expand All @@ -64,7 +64,7 @@ questions:
- type: secret
dataType: password
name: mysql-existing-user-credentials
group: MySQL
group: 2. MySQL database
label: User credentials
order: 4
required:
Expand All @@ -82,7 +82,7 @@ questions:
- type: secret
dataType: password
name: mysql-user-credentials
group: MySQL
group: 2. MySQL database
label: User credentials
order: 4
required:
Expand All @@ -99,7 +99,7 @@ questions:
const: true
- type: pipeline
dataType: string
group: MySQL
group: 2. MySQL database
label: Database name
required: true
default: app
Expand All @@ -110,7 +110,7 @@ questions:
- type: pipeline
dataType: boolean
key: mysql-root-password
group: MySQL
group: 2. MySQL database
label: Configure MySQL root password
default: false
order: 6
Expand All @@ -122,7 +122,7 @@ questions:
dataType: password
name: mysql-root-password
label: Root password
group: MySQL
group: 2. MySQL database
order: 7
required:
username: root
Expand All @@ -140,22 +140,37 @@ questions:
const: true
mysql-root-password:
const: true
- type: pipeline
dataType: string
group: 3. Deployment
label: Namespace
description: Kubernetes namespace where the application will be installed
required: true
minLength: 1
maxLength: 63
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
default: default
order: 1
targets:
- deploy_application.deployment.namespace
- install_mysql_user_credentials_secret.clusterSecret.namespace
- install_mysql_root_password_secret.clusterSecret.namespace
- type: pipeline
dataType: boolean
key: application_resources
group: Resources
group: 3. Deployment
label: Customize application resources
default: false
order: 1
order: 2
- type: pipeline
dataType: string
group: Resources
group: 3. Deployment
label: Memory request
description: Minimum amount of memory the application container needs
required: true
pattern: ^\d+(E|P|T|G|M|K|Ei|Pi|Ti|Gi|Mi|Ki)?$
default: 128Mi
order: 2
order: 3
targets:
- deploy_application.deployment.values.resources.requests.memory
showIf:
Expand All @@ -164,13 +179,13 @@ questions:
const: true
- type: pipeline
dataType: string
group: Resources
group: 3. Deployment
label: Memory limit
description: Maximum amount of memory the application container can use
required: true
pattern: ^\d+(E|P|T|G|M|K|Ei|Pi|Ti|Gi|Mi|Ki)?$
default: 512Mi
order: 3
order: 4
targets:
- deploy_application.deployment.values.resources.limits.memory
showIf:
Expand All @@ -179,13 +194,13 @@ questions:
const: true
- type: pipeline
dataType: string
group: Resources
group: 3. Deployment
label: CPU request
description: Minimum amount of CPU the application container needs
required: true
pattern: ^\d+(\.?\d+|m)?$
default: 250m
order: 4
order: 5
targets:
- deploy_application.deployment.values.resources.requests.cpu
showIf:
Expand All @@ -194,13 +209,13 @@ questions:
const: true
- type: pipeline
dataType: string
group: Resources
group: 3. Deployment
label: CPU limit
description: Maximum amount of CPU the application container can use
required: true
pattern: ^\d+(\.?\d+|m)?$
default: 500m
order: 5
order: 6
targets:
- deploy_application.deployment.values.resources.limits.cpu
showIf:
Expand Down

0 comments on commit 1281112

Please sign in to comment.