Skip to content

Commit

Permalink
Set volume to pod properly
Browse files Browse the repository at this point in the history
  • Loading branch information
summerwind authored and mumoshu committed Apr 30, 2020
1 parent b969798 commit f80c3c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controllers/runner_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func (r *RunnerReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) {
}
} else {
finalizers, removed := removeFinalizer(runner.ObjectMeta.Finalizers)

if removed {
if len(runner.Status.Registration.Token) > 0 {
ok, err := r.unregisterRunner(ctx, runner.Spec.Organization, runner.Spec.Repository, runner.Name)
Expand Down Expand Up @@ -360,7 +360,7 @@ func (r *RunnerReconciler) newPod(runner v1alpha1.Runner) (corev1.Pod, error) {
}

if len(runner.Spec.Volumes) != 0 {
pod.Spec.Volumes = append(runner.Spec.Volumes, runner.Spec.Volumes...)
pod.Spec.Volumes = append(pod.Spec.Volumes, runner.Spec.Volumes...)
}
if len(runner.Spec.InitContainers) != 0 {
pod.Spec.InitContainers = append(pod.Spec.InitContainers, runner.Spec.InitContainers...)
Expand Down

0 comments on commit f80c3c1

Please sign in to comment.