Sets environment variables that can be accessed inside the container.
()
| 551 | |
| 552 | // Sets environment variables that can be accessed inside the container. |
| 553 | func (b *etlBootstraper) setPodEnvVariables() { |
| 554 | containers := b.pod.Spec.Containers |
| 555 | debug.Assert(len(containers) > 0) |
| 556 | for idx := range containers { |
| 557 | containers[idx].Env = append(containers[idx].Env, corev1.EnvVar{ |
| 558 | Name: "AIS_TARGET_URL", |
| 559 | Value: b.t.Snode().URL(cmn.NetPublic) + apc.URLPathETLObject.Join(reqSecret), |
| 560 | }) |
| 561 | for k, v := range b.env { |
| 562 | containers[idx].Env = append(containers[idx].Env, corev1.EnvVar{ |
| 563 | Name: k, |
| 564 | Value: v, |
| 565 | }) |
| 566 | } |
| 567 | } |
| 568 | |
| 569 | for idx := range b.pod.Spec.InitContainers { |
| 570 | for k, v := range b.env { |
| 571 | b.pod.Spec.InitContainers[idx].Env = append(b.pod.Spec.InitContainers[idx].Env, corev1.EnvVar{ |
| 572 | Name: k, |
| 573 | Value: v, |
| 574 | }) |
| 575 | } |
| 576 | } |
| 577 | } |
| 578 | |
| 579 | // waitPodReady waits until ETL Pod becomes `Ready`. This happens |
| 580 | // only after the Pod's containers will have started and the Pod's `readinessProbe` |
no test coverage detected