-
Notifications
You must be signed in to change notification settings - Fork 43
pulls in DRONE_RUNNER_ANNOTATONS and puts it on the job spec #61
base: master
Are you sure you want to change the base?
Conversation
engine/kube/util.go
Outdated
config, err := config.Environ() | ||
|
||
if err != nil { | ||
logrus.WithError(err).Fatalln("invalid configuration") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should return an error. Fatalln
will kill the program.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been removed in refactoring to use step config!
engine/kube/util.go
Outdated
|
||
"github.com/drone/drone-runtime/engine" | ||
"github.com/drone/drone/cmd/drone-controller/config" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a standalone package and should not link to the main Drone repository as a dependency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was wondering about this. I couldn't find a better way to pull the config in without copy-pasting the config code.. :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you would typically pass these through the Engine Constructor from Drone https://github.com/drone/drone-runtime/blob/master/engine/kube/kube.go#L34
I recommend looking at how the controller passes the Node to the Engine, for example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the tip. I will work on this tonight
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This, too has been removed in recent commits!
engine/spec.go
Outdated
@@ -40,6 +40,7 @@ type ( | |||
// Step defines a pipeline step. | |||
Step struct { | |||
Metadata Metadata `json:"metadata,omitempty"` | |||
Annotations map[string]string `json:annotations,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like there's a double quote missing here.
This should be all fixed up! |
Any update on this one? |
May I ask when will this pr be merged? |
I can't talk about the plans from @bradrydzewski, but I would guess that he prefers a dedicated kubernetes runner like he already started to provide for exec and ssh. |
This pulls in config from harness/harness#2639 and then injects it into the pod job spec
This is to hopefully work towards resolving #38
Thanks!