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

implement a kubernetes runtime for linux executor #57

Closed
kneal opened this issue Feb 5, 2020 · 16 comments
Closed

implement a kubernetes runtime for linux executor #57

kneal opened this issue Feb 5, 2020 · 16 comments
Assignees
Labels
feature Indicates a new feature

Comments

@kneal
Copy link
Contributor

kneal commented Feb 5, 2020

Description

What is your idea?

Value

Why is this important? Who does it impact? Will this make something better, faster, etc?

Definition of Done

What is the end goal of this story?

Effort (Optional)

Estimated effort to complete this story? (Best Guess e.g. 1-2 days)

Impacted Personas (Optional)

Which personas will benefit from completing this story? (Users, Administrators, etc)

@kneal kneal added the feature Indicates a new feature label Feb 5, 2020
@jbrockopp
Copy link
Contributor

@kneal and I are going to begin by writing the ability to create volumes in Kubernetes.

It appears the gitRepo volume type is deprecated:

Warning: The gitRepo volume type is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod’s container.

We will follow the recommended guidelines to use emptyDir instead 👍

@jbrockopp
Copy link
Contributor

After some trial and error, we've come to a roadblock 😞

Unfortunately, it would appear that Kubernetes prevents the ability to patch specific fields in a Pod. Specifically, it appears that we're unable to patch some Container fields which is required to maintain a "1 pod per build" strategy.

The initial plan was to create a single pod per build, and then to patch that pod with each container (step) from the pipeline.

The error message we receive:

spec: Forbidden: pod updates may not change fields other than `spec.containers[*].image`, `spec.initContainers[*].image`, `spec.activeDeadlineSeconds` or `spec.tolerations` (only additions to existing tolerations)

Issue with more information:

kubernetes/kubernetes#9043

@jbrockopp
Copy link
Contributor

Create separate runtime package:

go-vela/pkg-runtime#1

@jbrockopp
Copy link
Contributor

Store Kubernetes pod in client struct:

go-vela/pkg-runtime#2

@jbrockopp
Copy link
Contributor

Use the go-vela/compiler for our runtime CLI:

go-vela/pkg-runtime#3

@jbrockopp
Copy link
Contributor

Create a working runtime CLI:

go-vela/pkg-runtime#4

@jbrockopp
Copy link
Contributor

Add container wait logic for Kubernetes:

go-vela/pkg-runtime#5

@jbrockopp
Copy link
Contributor

Add container tail logic for Kubernetes:

go-vela/pkg-runtime#6

@jbrockopp
Copy link
Contributor

Use default (strategic merge) patch for Kubernetes pods:

go-vela/pkg-runtime#7

@jbrockopp
Copy link
Contributor

Add logic to remove Kubernetes resources:

go-vela/pkg-runtime#8

@kneal
Copy link
Contributor Author

kneal commented Mar 10, 2020

Tune Kubernetes tail backoff for large pipelines
go-vela/pkg-runtime#9

@kneal
Copy link
Contributor Author

kneal commented Mar 10, 2020

Implement the inspect process for Kubernetes
go-vela/pkg-runtime#10

@kneal
Copy link
Contributor Author

kneal commented Mar 10, 2020

Make the namespace configurable
go-vela/pkg-runtime#11

@jbrockopp
Copy link
Contributor

Add function to create new runtime:

go-vela/pkg-runtime#12

@jbrockopp
Copy link
Contributor

Add validate logic for runtime:

go-vela/pkg-runtime#13

@jbrockopp
Copy link
Contributor

Add actions pipeline:

go-vela/pkg-runtime#14

@kneal kneal closed this as completed Mar 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Indicates a new feature
Projects
None yet
Development

No branches or pull requests

2 participants