Add imagePullSecrets to PodSpec
This commit is contained in:
@@ -66,6 +66,8 @@ type CreateOptions struct {
|
||||
Retries int
|
||||
// Specify the image to use
|
||||
Image string
|
||||
// Specify secrets to use when pulling the image
|
||||
ImagePullSecrets []string
|
||||
}
|
||||
|
||||
// ReadOptions queries runtime services
|
||||
@@ -92,6 +94,13 @@ func CreateImage(img string) CreateOption {
|
||||
}
|
||||
}
|
||||
|
||||
// CreateImagePullSecret sets a secret to use
|
||||
func CreateImagePullSecret(secret string) CreateOption {
|
||||
return func(o *CreateOptions) {
|
||||
o.ImagePullSecrets = append(o.ImagePullSecrets, secret)
|
||||
}
|
||||
}
|
||||
|
||||
// WithCommand specifies the command to execute
|
||||
func WithCommand(cmd ...string) CreateOption {
|
||||
return func(o *CreateOptions) {
|
||||
|
Reference in New Issue
Block a user