Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into main
  • Loading branch information
sigarus committed Nov 5, 2024
2 parents 1c0141f + 3aa1306 commit d7f0b16
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
6 changes: 6 additions & 0 deletions api/v1alpha1/dragonfly_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ type DragonflySpec struct {
// Image is the Dragonfly image to use
Image string `json:"image,omitempty"`

// (Optional) imagePullPolicy to set to Dragonfly, default is Always
// +optional
// +kubebuilder:validation:Optional
// +kubebuilder:default:="Always"
ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`

// (Optional) Dragonfly container args to pass to the container
// Refer to the Dragonfly documentation for the list of supported args
// +optional
Expand Down
5 changes: 5 additions & 0 deletions config/crd/bases/dragonflydb.io_dragonflies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1371,6 +1371,11 @@ spec:
image:
description: Image is the Dragonfly image to use
type: string
imagePullPolicy:
default: Always
description: (Optional) imagePullPolicy to set to Dragonfly, default
is Always
type: string
labels:
additionalProperties:
type: string
Expand Down
2 changes: 1 addition & 1 deletion internal/resources/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ func GetDragonflyResources(ctx context.Context, df *resourcesv1.Dragonfly) ([]cl
SuccessThreshold: 1,
TimeoutSeconds: 5,
},
ImagePullPolicy: corev1.PullAlways,
ImagePullPolicy: df.Spec.ImagePullPolicy,
},
},
},
Expand Down

0 comments on commit d7f0b16

Please sign in to comment.