Skip to content

Commit

Permalink
Merge pull request #32 from eminaktas/enable-pull-policy
Browse files Browse the repository at this point in the history
feat: enable imagePullPolicy to be used for containers
  • Loading branch information
Peefy authored Nov 15, 2024
2 parents 48823a6 + 7d411a8 commit f0daf4c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions models/kube/backend/server_backend.k
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ schema ServerBackend[inputConfig: server.Server]:
env = config.mainContainer.env | app.envs
name = config.mainContainer.name or "main"
image = config.image
imagePullPolicy = config.imagePullPolicy
resource = config?.schedulingStrategy?.resource
})])?[0]

Expand Down
7 changes: 7 additions & 0 deletions models/kube/frontend/server.k
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ schema Server:
image: str, default is Undefined, required.
Container image name.
More info: https://kubernetes.io/docs/concepts/containers/images
imagePullPolicy : str, default is Undefined, optional
A Container-level attribute.
The policy for image pulling. The value of
this field must be one of "Always", "IfNotPresent" or
"Never". Defaults to "IfNotPresent".
schedulingStrategy: strategy.SchedulingStrategy, default is Undefined, required.
SchedulingStrategy represents scheduling strategy.
mainContainer: container.Main, default is Undefined, required.
Expand Down Expand Up @@ -118,6 +123,8 @@ schema Server:

# Main container image
image: str = option("image")
# Main container imagePullPolicy
imagePullPolicy?: "Always" | "IfNotPresent" | "Never"
# Main container resource
schedulingStrategy: strategy.SchedulingStrategy = strategy.SchedulingStrategy {}

Expand Down
6 changes: 6 additions & 0 deletions models/kube/frontend/sidecar/sidecar.k
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ schema Sidecar:
image: str, default is Undefined, required
A Container-level attribute.
Container image name. More info: https://kubernetes.io/docs/concepts/containers/images
imagePullPolicy : str, default is Undefined, optional
A Container-level attribute.
The policy for image pulling. The value of
this field must be one of "Always", "IfNotPresent" or
"Never". Defaults to "IfNotPresent".
livenessProbe: p.Probe, default is Undefined, optional.
A Container-level attribute.
The probe to check whether container is live or not.
Expand Down Expand Up @@ -76,6 +81,7 @@ schema Sidecar:
ports?: [cp.ContainerPort]
resource: str | res.Resource
image: str
imagePullPolicy?: "Always" | "IfNotPresent" | "Never"

readinessProbe?: p.Probe
livenessProbe?: p.Probe
Expand Down

0 comments on commit f0daf4c

Please sign in to comment.