Skip to content

Commit

Permalink
introduce pull policy "refresh"
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas De Loof <[email protected]>
  • Loading branch information
ndeloof committed Feb 21, 2025
1 parent 23f270a commit 3dfba1e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion schema/compose-spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -371,8 +371,9 @@
"privileged": {"type": ["boolean", "string"]},
"profiles": {"$ref": "#/definitions/list_of_strings"},
"pull_policy": {"type": "string", "enum": [
"always", "never", "if_not_present", "build", "missing"
"always", "never", "if_not_present", "build", "missing", "refresh"
]},
"pull_refresh_after": {"type": "string"},
"read_only": {"type": ["boolean", "string"]},
"restart": {"type": "string"},
"runtime": {
Expand Down
3 changes: 3 additions & 0 deletions types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ type ServiceConfig struct {
Ports []ServicePortConfig `yaml:"ports,omitempty" json:"ports,omitempty"`
Privileged bool `yaml:"privileged,omitempty" json:"privileged,omitempty"`
PullPolicy string `yaml:"pull_policy,omitempty" json:"pull_policy,omitempty"`
PullRefresh *Duration `yaml:"pull_refresh_after,omitempty" json:"pull_refresh_after,omitempty"`
ReadOnly bool `yaml:"read_only,omitempty" json:"read_only,omitempty"`
Restart string `yaml:"restart,omitempty" json:"restart,omitempty"`
Runtime string `yaml:"runtime,omitempty" json:"runtime,omitempty"`
Expand Down Expand Up @@ -215,6 +216,8 @@ const (
PullPolicyMissing = "missing"
// PullPolicyBuild force building images
PullPolicyBuild = "build"
// PullPolicyRefresh checks image needs to be updatedq
PullPolicyRefresh = "refresh"
)

const (
Expand Down

0 comments on commit 3dfba1e

Please sign in to comment.