Skip to content
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
3 changes: 1 addition & 2 deletions xtask/src/env/combined_site_demo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4359,8 +4359,7 @@ fn apply_image_overrides(config: &mut serde_yaml::Value) {
let operator_image = std::env::var("GRID_XTASK_OPERATOR_IMAGE")
.unwrap_or_else(|_| "ghcr.io/praxis-proxy/grid-operator:v0.1.3".to_owned());
let vcr_image = crate::env::image_overrides::vcr_image();
let image_pull_policy =
std::env::var("GRID_XTASK_IMAGE_PULL_POLICY").unwrap_or_else(|_| "IfNotPresent".to_owned());
let image_pull_policy = std::env::var("GRID_XTASK_IMAGE_PULL_POLICY").unwrap_or_else(|_| "IfNotPresent".to_owned());

let (gateway_repo, gateway_tag) = parse_image_ref(&gateway_image);
let (operator_repo, operator_tag) = parse_image_ref(&operator_image);
Expand Down
17 changes: 7 additions & 10 deletions xtask/src/env/image_overrides.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,13 @@ pub(crate) fn image_pull_policy() -> String {
}

/// Get the image pull policy for the given ingress mode.
///
/// Both `IngressMode` variants currently use the same registry-backed
/// default; the parameter is kept so a future mode-specific default can be
/// added without changing this function's signature.
pub(crate) fn demo_image_pull_policy(mode: IngressMode) -> String {
let default = match mode {
IngressMode::Global => DEFAULT_WORKLOAD_IMAGE_PULL_POLICY,
IngressMode::Workload => DEFAULT_WORKLOAD_IMAGE_PULL_POLICY,
IngressMode::Global | IngressMode::Workload => DEFAULT_WORKLOAD_IMAGE_PULL_POLICY,
};
env::var(IMAGE_PULL_POLICY_ENV).unwrap_or_else(|_| default.to_owned())
}
Expand Down Expand Up @@ -170,14 +173,8 @@ mod tests {
assert_eq!(DEFAULT_GATEWAY_IMAGE, "localhost/praxis-ai:llmd-ext-proc");
assert_eq!(DEFAULT_MOCK_EPP_IMAGE, "localhost/praxis-ai-mock-epp:latest");
assert_eq!(DEFAULT_OPERATOR_IMAGE, "grid-operator:latest");
assert_eq!(
DEFAULT_GLB_GATEWAY_IMAGE,
"ghcr.io/praxis-proxy/grid-ai-rollup:v0.1.3"
);
assert_eq!(
DEFAULT_GLB_OPERATOR_IMAGE,
"ghcr.io/praxis-proxy/grid-operator:v0.1.3"
);
assert_eq!(DEFAULT_GLB_GATEWAY_IMAGE, "ghcr.io/praxis-proxy/grid-ai-rollup:v0.1.3");
assert_eq!(DEFAULT_GLB_OPERATOR_IMAGE, "ghcr.io/praxis-proxy/grid-operator:v0.1.3");
assert_eq!(DEFAULT_IMAGE_PULL_POLICY, "Never");
assert_eq!(
DEFAULT_WORKLOAD_GATEWAY_IMAGE,
Expand Down
Loading