Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: enable imagePullPolicy to be used for containers #32

Merged
merged 1 commit into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading