Skip to content

Commit

Permalink
Add image override
Browse files Browse the repository at this point in the history
  • Loading branch information
agouin committed Sep 18, 2023
1 parent 18f98d4 commit e505b73
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/v1/cosmosfullnode_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -696,6 +696,10 @@ type InstanceOverridesSpec struct {
// Overrides an individual instance's PVC.
// +optional
VolumeClaimTemplate *PersistentVolumeClaimSpec `json:"volumeClaimTemplate"`

// Overrides an individual instance's Image.
// +optional
Image string `json:"image"`
}

type DisableStrategy string
Expand Down
3 changes: 3 additions & 0 deletions internal/fullnode/build_pods.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ func BuildPods(crd *cosmosv1.CosmosFullNode, cksums ConfigChecksums) ([]diff.Res
if disable := overrides[pod.Name].DisableStrategy; disable != nil {
continue
}
if image := overrides[pod.Name].Image; image != "" {
pod.Spec.Containers[0].Image = image
}
if _, shouldSnapshot := candidates[pod.Name]; shouldSnapshot {
continue
}
Expand Down

0 comments on commit e505b73

Please sign in to comment.