feat(cli): provide imagepullsecret option for container as function (#2680)
Signed-off-by: Shubham Nazare <shubham4443@gmail.com>
This commit is contained in:
@@ -173,6 +173,7 @@ func Commands() *cobra.Command {
|
||||
flag.RunTimeMinCPU, flag.RunTimeMaxCPU, flag.RunTimeMinMemory,
|
||||
flag.RunTimeMaxMemory, flag.ReplicasMin,
|
||||
flag.ReplicasMax, flag.RunTimeTargetCPU,
|
||||
flag.RunImagePullSecret,
|
||||
|
||||
flag.NamespaceFunction, flag.SpecSave, flag.SpecDry,
|
||||
},
|
||||
|
||||
@@ -106,6 +106,8 @@ func (opts *RunContainerSubCommand) complete(input cli.Input) error {
|
||||
console.Warn("grace period must be a non-negative integer, using default value (6 mins)")
|
||||
}
|
||||
|
||||
pullSecret := []apiv1.LocalObjectReference{{Name: input.String(flagkey.RunImagePullSecret)}}
|
||||
|
||||
var imageName string
|
||||
var port int
|
||||
var command, args string
|
||||
@@ -208,6 +210,7 @@ func (opts *RunContainerSubCommand) complete(input cli.Input) error {
|
||||
opts.function.Spec.PodSpec = &apiv1.PodSpec{
|
||||
Containers: []apiv1.Container{*container},
|
||||
TerminationGracePeriodSeconds: &fnGracePeriod,
|
||||
ImagePullSecrets: pullSecret,
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user