Set volume to pod properly

This commit is contained in:
Moto Ishizawa 2020-04-30 18:41:17 +09:00 committed by KUOKA Yusuke
parent b96979888c
commit f80c3c1928
1 changed files with 2 additions and 2 deletions

View File

@ -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)
@ -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...)