@@ -18,17 +18,32 @@ type ConfigUnset struct {
1818
1919// Config is the structure of an app's config.
2020type Config struct {
21- Owner string `json:"owner,omitempty"`
22- App string `json:"app,omitempty"`
23- Values map [string ]interface {} `json:"values,omitempty"`
24- Memory map [string ]interface {} `json:"memory,omitempty"`
25- CPU map [string ]interface {} `json:"cpu,omitempty"`
21+ // Owner is the app owner. It cannot be updated with config.Set(). See app.Transfer().
22+ Owner string `json:"owner,omitempty"`
23+ // App is the app name. It cannot be updated at all right now.
24+ App string `json:"app,omitempty"`
25+ // Values are exposed as environment variables to the app.
26+ Values map [string ]interface {} `json:"values,omitempty"`
27+ // Memory is used to set process memory limits. The key is the process name
28+ // and the value is a number followed by a memory unit (G, M, K, or B). Ex: 200G
29+ Memory map [string ]interface {} `json:"memory,omitempty"`
30+ // CPU is used to set process CPU limits. It can be set in terms of whole CPUs
31+ // (ex 1) or in milli units to reflect the number of CPU shares (ex 500m).
32+ CPU map [string ]interface {} `json:"cpu,omitempty"`
33+ // Healthchecks are the healthchecks that the application uses.
2634 Healthcheck map [string ]* Healthcheck `json:"healthcheck,omitempty"`
27- Tags map [string ]interface {} `json:"tags,omitempty"`
28- Registry map [string ]interface {} `json:"registry,omitempty"`
29- Created string `json:"created,omitempty"`
30- Updated string `json:"updated,omitempty"`
31- UUID string `json:"uuid,omitempty"`
35+ // Tags restrict applications to run on k8s nodes with that label.
36+ Tags map [string ]interface {} `json:"tags,omitempty"`
37+ // Registry is a key-value pair to provide authentication for docker registries.
38+ // The key is the username and the value is the password.
39+ Registry map [string ]interface {} `json:"registry,omitempty"`
40+ // Created is the time that the application was created and cannot be updated.
41+ Created string `json:"created,omitempty"`
42+ // Updated is the last time the configuration was changed and cannot be updated.
43+ Updated string `json:"updated,omitempty"`
44+ // UUID is a unique string reflecting the configuration in its current state.
45+ // It changes every time the configuration is changed and cannot be updated.
46+ UUID string `json:"uuid,omitempty"`
3247}
3348
3449// Healthcheck is the structure for an application healthcheck.
@@ -56,9 +71,13 @@ Failure Threshold: {{.FailureThreshold}}
5671Exec Probe: {{or .Exec "N/A"}}
5772HTTP GET Probe: {{or .HTTPGet "N/A"}}
5873TCP Socket Probe: {{or .TCPSocket "N/A"}}` )
59- if err != nil { panic (err ) }
74+ if err != nil {
75+ panic (err )
76+ }
6077 err = tmpl .Execute (& doc , h )
61- if err != nil { panic (err ) }
78+ if err != nil {
79+ panic (err )
80+ }
6281 return doc .String ()
6382}
6483
@@ -70,7 +89,7 @@ type KVPair struct {
7089}
7190
7291func (k KVPair ) String () string {
73- return k .Key + "=" + k .Value
92+ return k .Key + "=" + k .Value
7493}
7594
7695// ExecProbe executes a command within a Pod.
0 commit comments