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

control-service: add kaniko job builder #152

Merged
merged 2 commits into from
Aug 30, 2021

Conversation

antoniivanov
Copy link
Collaborator

The following use-cases necessisate the change
We need to be able to run in a more secure environment where running as
priveleged is disabled. And although buildkit and img (which was used
now) allow that they also requires seccomp and AppArmor to be disabled
which is also an issue (see
https://github.com/GoogleContainerTools/kaniko#comparison-with-other-tools
and https://github.com/genuinetools/img#running-with-kubernetes)

We would like to be able to run against insecure (http only) docker
registry deployed within the namespace only and not accessible outside
in order to enable single command installation of our helm chart. Kaniko
make it easy by passing --insecure flag. Adding extra arguments option
will be in separate change.

Created new directory and moved only the relevant code there.
The old directory and source in vdk_job_builder will be deleted after
some time.

Testing Done: the integration test passed I ran it both with ECR
registry and docker registry as data job image registry and verified in
both cases images are uploaded successfully. I don't forsee any issues
iwth the images itself but our post deployment test (vdk-heartbeat)
would catch if there any when it runs on main branch

Signed-off-by: Antoni Ivanov [email protected]

@antoniivanov antoniivanov force-pushed the person/aivanov/control-service branch 2 times, most recently from 9624d7e to db04b21 Compare August 30, 2021 09:45
@antoniivanov antoniivanov force-pushed the person/aivanov/control-service branch from db04b21 to 56ee2db Compare August 30, 2021 10:38
@antoniivanov antoniivanov enabled auto-merge (squash) August 30, 2021 10:39
@ivakoleva
Copy link
Contributor

Do you plan to revise other vdk_job_builder usages in projects/control-service/cicd/.gitlab-ci.yml?

The following use-cases necessisate the change
We need to be able to run in a more secure environment where running as
priveleged is disabled. And although buildkit and img (which was used
now) allow that they also requires seccomp and AppArmor to be disabled
which is also an issue (see
https://github.com/GoogleContainerTools/kaniko#comparison-with-other-tools
and https://github.com/genuinetools/img#running-with-kubernetes)

We would like to be able to run against insecure (http only) docker
registry deployed within the namespace only and not accessible outside
in order to enable single command installation of our helm chart. Kaniko
make it easy by passing --insecure flag. Adding extra arguments option
will be in separate change.

Created new directory and moved only the relevant code there.
The old directory and source in vdk_job_builder will be deleted after
some time.

Testing Done: the integration test passed I ran it both with ECR
registry and docker registry as data job image registry and verified in
both cases images are uploaded successfully. I don't forsee any issues
iwth the images itself but our post deployment test (vdk-heartbeat)
would catch if there any when it runs on main branch

Signed-off-by: Antoni Ivanov <[email protected]>
@antoniivanov antoniivanov force-pushed the person/aivanov/control-service branch from 56ee2db to a9d42d7 Compare August 30, 2021 11:44
@antoniivanov
Copy link
Collaborator Author

Do you plan to revise other vdk_job_builder usages in projects/control-service/cicd/.gitlab-ci.yml?

Yes, I will do that in a separate change in the spirit of breaking commits into small self-contained units

@antoniivanov antoniivanov merged commit d929093 into main Aug 30, 2021
@antoniivanov antoniivanov deleted the person/aivanov/control-service branch August 30, 2021 11:59
antoniivanov added a commit that referenced this pull request Aug 30, 2021
#152 introduced new
kaniko job builder. And we need to produce docker image as part of our
CI. It follows the same way as before - if version.txt file is edited it
will trigger control_service_publish_job_builder_image step in Gitlab CI
which will produce image with tags:
 job-builder:{version}
 job-builder:latest

Testing Done:  Will verify CI has produced correct image when it runs on
main

Signed-off-by: Antoni Ivanov <[email protected]>
antoniivanov added a commit that referenced this pull request Aug 30, 2021
#152 introduced new
kaniko job builder. And we need to produce docker image as part of our
CI. It follows the same way as before - if version.txt file is edited it
will trigger control_service_publish_job_builder_image step in Gitlab CI
which will produce image with tags:
 job-builder:{version}
 job-builder:latest

Testing Done:  Will verify CI has produced correct image when it runs on
main

Signed-off-by: Antoni Ivanov <[email protected]>
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.

4 participants