A values.yaml file stores customizable and changeable parameters and variable values. For variable values that do not need to be changed, you can write them in a YAML file used by Kubernetes, for example, deployment.yaml. |
A values.yaml file defines the values of variables used by application packages. Replace the placeholders in the files in the template directory with the actual values defined in the value.yaml file. If a helm package contains multiple subcharts, and the subcharts must use variables in the parent chart, you create a global key.
global:
nodeSelector:{}
advance:{}
namespace:
cloudPaas:
name: cloud-paas
project: cloud-paas
serviceAccount:
name:admin
You can configure custom variables for each application package. The custom variables are stored in global.inputs. The system resolves the variables after you upload the application packages, and you can edit the default values of the variables when deploying applications.
global:
groups: # Group flag (fixed)
mysql: # Key of the parameter group
label: MySQL parameter group # Name of the parameter group (The group key is displayed if you do not specify a name.)
description: MySQL parameter group description # Description for the group (optional)
inputs: # Input flag (fixed)
mysqlService: # Key of the group parameter
value: mysql-service:3306 # Default value of the parameter (optional)
type: STRING #Parameter value type (STRING for a single line and TEXT for multiple lines)
label: MySQL connection address # Parameter name (Optional. The parameter key is displayed if you do not specify a name.)
validate: # Regular expression used to verify the parameter value (optional)
maxLength: 120 # Maximum parameter length (optional)
minLength: 1 #Minimum parameter length (optional)
necessary: true # Whether the parameter must be specified (optional)
constraintDescription: MySQL address, a string of 1 to 120 characters # Parameter description (optional)
description: MySQL service connection address # Detailed description for the parameter (optional)
group: mysql # Key of the group to which the parameter belongs (optional)
mysqlPassword:
label: MySQL password
description: MySQL service password
group: mysql
mysqlUser:
type: TEXT
label: MySQL user
maxLength: 120
description: MySQL service user
group: mysql
wordpressReplicas:value: 1
label: WordPress instance quantity
maxLength: 120