Skip to content

Commit

Permalink
mirror at 20220528194359
Browse files Browse the repository at this point in the history
  • Loading branch information
acoshift committed May 28, 2022
1 parent 908a77a commit 8146840
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions api/deployer.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ type DeployerCommandDeploymentDeploySpec struct {
MaxReplicas int `json:"maxReplicas"`
Port int `json:"port"`
Protocol DeploymentProtocol `json:"protocol"`
Internal bool `json:"internal"`
Schedule string `json:"schedule"`
Annotations map[string]string `json:"annotations"`
CPU string `json:"cpu"`
Expand Down
3 changes: 2 additions & 1 deletion api/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ type DeploymentDeploy struct {
Type DeploymentType `json:"type" yaml:"type"`
Port *int `json:"port" yaml:"port"`
Protocol *DeploymentProtocol `json:"protocol" yaml:"protocol"` // protocol for WebService
Internal *bool `json:"internal" yaml:"internal"` // run WebService as internal service
Env map[string]string `json:"env" yaml:"env"` // override all env
AddEnv map[string]string `json:"addEnv" yaml:"addEnv"` // add env to old revision env
RemoveEnv []string `json:"removeEnv" yaml:"removeEnv"` // remove env from old revision env
Expand All @@ -234,7 +235,6 @@ type DeploymentDisk struct {
func (m *DeploymentDeploy) Valid() error {
m.Name = strings.TrimSpace(m.Name)
m.Image = strings.ReplaceAll(m.Image, " ", "") // remove all space in image
// m.Image = strings.ToLower(m.Image) // image tag can be lowercase

// TODO: autofill location until all user migrate
if m.Location == "" {
Expand Down Expand Up @@ -382,6 +382,7 @@ type DeploymentItem struct {
Schedule string `json:"schedule" yaml:"schedule"`
Port int `json:"port" yaml:"port"`
Protocol DeploymentProtocol `json:"protocol" yaml:"protocol"`
Internal bool `json:"internal" yaml:"internal"`
NodePort int `json:"nodePort" yaml:"nodePort"`
Annotations map[string]string `json:"annotations" yaml:"annotations"`
Resources DeploymentResource `json:"resources" yaml:"resources"`
Expand Down

0 comments on commit 8146840

Please sign in to comment.