diff --git a/models/kube/backend/server_backend.k b/models/kube/backend/server_backend.k index 196cf7e..57323f8 100644 --- a/models/kube/backend/server_backend.k +++ b/models/kube/backend/server_backend.k @@ -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] diff --git a/models/kube/frontend/server.k b/models/kube/frontend/server.k index 2c14021..d0c1b40 100644 --- a/models/kube/frontend/server.k +++ b/models/kube/frontend/server.k @@ -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. @@ -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 {} diff --git a/models/kube/frontend/sidecar/sidecar.k b/models/kube/frontend/sidecar/sidecar.k index fed29c2..b64cdf7 100644 --- a/models/kube/frontend/sidecar/sidecar.k +++ b/models/kube/frontend/sidecar/sidecar.k @@ -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. @@ -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