Skip to content

Commit

Permalink
Add entrypoint in deploymnent config
Browse files Browse the repository at this point in the history
  • Loading branch information
Jake Gealer committed Nov 5, 2022
1 parent f073922 commit d38c309
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 44 deletions.
4 changes: 4 additions & 0 deletions types/ignite.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,9 @@ type DeploymentConfigPartial struct {

// RestartPolicy is the restart policy for this deployment.
RestartPolicy RestartPolicy `json:"restart_policy"`

// Entrypoint is used to define the entrypoint for the application. Can be nil.
Entrypoint []string `json:"entrypoint"`
}

func (x DeploymentConfigPartial) makeMap() map[string]any {
Expand All @@ -246,6 +249,7 @@ func (x DeploymentConfigPartial) makeMap() map[string]any {
"env": x.Env,
"resources": x.Resources,
"restart_policy": x.RestartPolicy,
"entrypoint": x.Entrypoint,
}
}

Expand Down
83 changes: 43 additions & 40 deletions types/testdata/types.Deployment.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
"created_at": "ghi",
"config": {
"container_strategy": "jkl",
"entrypoint": [
"abc"
],
"env": {
"jkl": "mno"
},
Expand Down Expand Up @@ -36,62 +39,62 @@
"version": "pqr"
},
"active_rollout": {
"count": 21,
"created_at": "abc",
"deployment_id": "def",
"id": "ghi",
"status": "jkl",
"count": 22,
"created_at": "def",
"deployment_id": "ghi",
"id": "jkl",
"status": "mno",
"build": {
"id": "mno",
"deployment_id": "pqr",
"id": "pqr",
"deployment_id": "stu",
"metadata": {
"account_type": "stu",
"account_type": "vwx",
"author": {
"avatar_url": "vwx",
"username": "abc"
"avatar_url": "abc",
"username": "def"
},
"repo_id": 31,
"repo_name": "def",
"branch": "ghi",
"commit_sha": "jkl",
"commit_msg": "mno",
"commit_url": "pqr"
"repo_id": 32,
"repo_name": "ghi",
"branch": "jkl",
"commit_sha": "mno",
"commit_msg": "pqr",
"commit_url": "stu"
},
"method": "stu",
"started_at": "vwx",
"finished_at": "abc",
"state": "def",
"digest": "ghi"
"method": "vwx",
"started_at": "abc",
"finished_at": "def",
"state": "ghi",
"digest": "jkl"
}
},
"active_build": {
"id": "jkl",
"deployment_id": "mno",
"id": "mno",
"deployment_id": "pqr",
"metadata": {
"account_type": "pqr",
"account_type": "stu",
"author": {
"avatar_url": "stu",
"username": "vwx"
"avatar_url": "vwx",
"username": "abc"
},
"repo_id": 47,
"repo_name": "abc",
"branch": "def",
"commit_sha": "ghi",
"commit_msg": "jkl",
"commit_url": "mno"
"repo_id": 48,
"repo_name": "def",
"branch": "ghi",
"commit_sha": "jkl",
"commit_msg": "mno",
"commit_url": "pqr"
},
"method": "pqr",
"started_at": "stu",
"finished_at": "vwx",
"state": "abc",
"digest": "def"
"method": "stu",
"started_at": "vwx",
"finished_at": "abc",
"state": "def",
"digest": "ghi"
},
"metadata": {
"container_port_mappings": {
"ghi": [
"jkl"
"jkl": [
"mno"
]
}
},
"running_container_count": 60
"running_container_count": 61
}
11 changes: 7 additions & 4 deletions types/testdata/types.DeploymentConfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"container_strategy": "abc",
"entrypoint": [
"pqr"
],
"env": {
"abc": "def"
},
Expand All @@ -15,7 +18,7 @@
"branch": "vwx"
}
},
"name": "pqr",
"name": "stu",
"resources": {
"ram": "ghi",
"vcpu": 11,
Expand All @@ -30,8 +33,8 @@
"type": "def",
"version": "ghi",
"volume": {
"fs": "stu",
"size": "vwx",
"mountpath": "abc"
"fs": "vwx",
"size": "abc",
"mountpath": "def"
}
}
3 changes: 3 additions & 0 deletions types/testdata/types.DeploymentConfigPartial.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"container_strategy": "abc",
"entrypoint": [
"pqr"
],
"env": {
"abc": "def"
},
Expand Down

0 comments on commit d38c309

Please sign in to comment.