Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: InitContainer support for ACI Connector #204

Merged
merged 66 commits into from
Nov 19, 2022

Conversation

t-ysalazar
Copy link
Contributor

@t-ysalazar t-ysalazar commented Jun 9, 2022

This change adds ACI initContainers virtual node support to virtual kubelet. The user can add ACI initContainers to the pod definition.

  • Added InitContainer method and called on CreatePod so initContainers from the pod specs are created.
  • Factorize common methods between getInitContainer and getContainer.
  • Throw errors for properties no supported on initContainers.
  • Unit tests for InitContainers.
  • E2E test for InitContainers.

ACI InitContainerDefinition

According to ACI documentation, InitContainerDefinition unlike Container does not support livenessProbe, ports, readinessProbe and resources.

image

Test

Validated the change by testing on minikube.

image
image

1.

image
image

2.

image
image

3.

image
image

Validated the change by testing on AKS.

image

image
image

References

https://docs.microsoft.com/en-us/rest/api/container-instances/container-groups/create-or-update#request-body
https://docs.microsoft.com/en-us/rest/api/container-instances/container-groups/create-or-update#initcontainerdefinition
https://docs.microsoft.com/en-us/rest/api/container-instances/container-groups/create-or-update#container
https://kubernetes.io/docs/concepts/workloads/pods/init-containers/

@t-ysalazar t-ysalazar changed the title t-ysalazar/init-containers InitContainer support for ACI Connector Jun 10, 2022
.gitignore Outdated Show resolved Hide resolved
client/aci/types.go Outdated Show resolved Hide resolved
@mainaksarcar
Copy link
Collaborator

@helayoty - Can you please help review this PR for InitContainers support?

@fnuarnav fnuarnav temporarily deployed to test November 14, 2022 22:40 Inactive
@fnuarnav fnuarnav temporarily deployed to test November 15, 2022 00:07 Inactive
@fnuarnav fnuarnav temporarily deployed to test November 15, 2022 00:07 Inactive
@fnuarnav fnuarnav temporarily deployed to test November 16, 2022 09:03 Inactive
@fnuarnav fnuarnav temporarily deployed to test November 17, 2022 21:51 Inactive
@fnuarnav fnuarnav temporarily deployed to test November 17, 2022 21:51 Inactive
@fnuarnav fnuarnav temporarily deployed to test November 18, 2022 00:23 Inactive
e2e/pods_test.go Outdated Show resolved Hide resolved
@fnuarnav fnuarnav temporarily deployed to test November 18, 2022 00:32 Inactive
@fnuarnav fnuarnav temporarily deployed to test November 18, 2022 00:33 Inactive
@fnuarnav fnuarnav temporarily deployed to test November 18, 2022 01:25 Inactive
@fnuarnav fnuarnav temporarily deployed to test November 18, 2022 01:25 Inactive
pkg/provider/aci.go Outdated Show resolved Hide resolved
pkg/provider/aci.go Outdated Show resolved Hide resolved
@fnuarnav fnuarnav temporarily deployed to test November 18, 2022 20:25 Inactive
@fnuarnav fnuarnav temporarily deployed to test November 18, 2022 20:25 Inactive
@Fei-Guo Fei-Guo merged commit 93389d1 into virtual-kubelet:master Nov 19, 2022
@helayoty helayoty deleted the t-ysalazar/init-containers branch November 19, 2022 00:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants