Skip to content

Commit

Permalink
karmadactl init: set default value of imagePullPolicy to IfNotPresent
Browse files Browse the repository at this point in the history
Signed-off-by: zhzhuang-zju <[email protected]>
  • Loading branch information
zhzhuang-zju committed May 27, 2024
1 parent b57bff1 commit d909f60
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions pkg/karmadactl/cmdinit/kubernetes/deployments.go
Original file line number Diff line number Diff line change
Expand Up @@ -444,8 +444,9 @@ func (i *CommandInitOption) makeKarmadaSchedulerDeployment() *appsv1.Deployment
},
Containers: []corev1.Container{
{
Name: schedulerDeploymentNameAndServiceAccountName,
Image: i.karmadaSchedulerImage(),
Name: schedulerDeploymentNameAndServiceAccountName,
Image: i.karmadaSchedulerImage(),
ImagePullPolicy: corev1.PullIfNotPresent,
Command: []string{
"/bin/karmada-scheduler",
"--kubeconfig=/etc/kubeconfig",
Expand Down Expand Up @@ -559,8 +560,9 @@ func (i *CommandInitOption) makeKarmadaControllerManagerDeployment() *appsv1.Dep
},
Containers: []corev1.Container{
{
Name: controllerManagerDeploymentAndServiceName,
Image: i.karmadaControllerManagerImage(),
Name: controllerManagerDeploymentAndServiceName,
Image: i.karmadaControllerManagerImage(),
ImagePullPolicy: corev1.PullIfNotPresent,
Command: []string{
"/bin/karmada-controller-manager",
"--kubeconfig=/etc/kubeconfig",
Expand Down Expand Up @@ -677,8 +679,9 @@ func (i *CommandInitOption) makeKarmadaWebhookDeployment() *appsv1.Deployment {
AutomountServiceAccountToken: pointer.Bool(false),
Containers: []corev1.Container{
{
Name: webhookDeploymentAndServiceAccountAndServiceName,
Image: i.karmadaWebhookImage(),
Name: webhookDeploymentAndServiceAccountAndServiceName,
Image: i.karmadaWebhookImage(),
ImagePullPolicy: corev1.PullIfNotPresent,
Command: []string{
"/bin/karmada-webhook",
"--kubeconfig=/etc/kubeconfig",
Expand Down Expand Up @@ -847,9 +850,10 @@ func (i *CommandInitOption) makeKarmadaAggregatedAPIServerDeployment() *appsv1.D
AutomountServiceAccountToken: pointer.Bool(false),
Containers: []corev1.Container{
{
Name: karmadaAggregatedAPIServerDeploymentAndServiceName,
Image: i.karmadaAggregatedAPIServerImage(),
Command: command,
Name: karmadaAggregatedAPIServerDeploymentAndServiceName,
Image: i.karmadaAggregatedAPIServerImage(),
ImagePullPolicy: corev1.PullIfNotPresent,
Command: command,
VolumeMounts: []corev1.VolumeMount{
{
Name: KubeConfigSecretAndMountName,
Expand Down

0 comments on commit d909f60

Please sign in to comment.