-
Notifications
You must be signed in to change notification settings - Fork 16.8k
Conversation
Hi @bacongobbler. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
43dcc4d
to
c1a5208
Compare
@bacongobbler Might want to add an optional |
Good point. I forgot to add that to the TODO list, but that is certainly on the radar. 👍 |
incubator/drone/templates/NOTES.txt
Outdated
@@ -0,0 +1,17 @@ | |||
1. Get your Drone URL by running: | |||
|
|||
{{- if contains "NodePort" .Values.serviceType }} |
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.
serviceType
should be: service.type
incubator/drone/templates/NOTES.txt
Outdated
NOTE: It may take a few minutes for the LoadBalancer IP to be available. | ||
Watch the status with: 'kubectl get svc -w {{ template "fullname" . }}' | ||
{{- else if contains "ClusterIP" .Values.serviceType }} | ||
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "fullname" . }}" -o jsonpath="{.items[0].metadata.name}") |
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.
Think the label selector is supposed to be:
"app={{ template "fullname" . }}-server"
incubator/drone/values.yaml
Outdated
# Drone server configuration. Values in here get injected as environment variables. | ||
# See http://readme.drone.io/admin/installation-reference#server-options for a list of possible values. | ||
env: | ||
DRONE_DEBUG: "false" |
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've found that I must at least add the following to get the default sqlite db driver to work:
DRONE_DATABASE_DATASOURCE: drone.sqlite
Otherwise drone-server fails to find/ping the database for some reason and crashloops. It could probably work with the default datasource (/var/lib/drone/drone.sqlite
) if this chart created a volume, empty or persistent, mounted to /var/lib/drone
.
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 section should also include some commented out environment variables for git service setup, or at least a note that without a git service configured drone-server will fail to start.
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.
done.
port: {{ .Values.service.http.externalPort }} | ||
targetPort: {{ .Values.service.http.internalPort }} | ||
selector: | ||
app: {{ template "fullname" . }} |
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.
selector needs to be app: {{ template "fullname" . }}-server
, and the same change should probably be made for service name:
and app:
label.
Setting up drone has a few parts:
As it is, his chart doesn't work. I think it's important to have a minimal chart that works out of the box. |
Yes, I have been busy with other things... our company recently announced we were getting acquired by Microsoft so needless to say I've been super busy for the last bit :) hope to get back to a regular schedule soon so I can get back to this. |
@bacongobbler I have modified your chart to include the Ingress and the github envvars to be able to set up a simple example. @lachie83 told me to look at it and ... well, if you want my bits & bobs I can send you a PR |
@bacongobbler gentle ping - hope you're able to pick this up again! |
Hi! yes actually today would be a perfect day to pick this back up again. Thank you for the ping. :) |
Yay! I'm excited for this one. |
afad83d
to
621a246
Compare
rebased on top of master and addressed all comments. |
0915a3e
to
440e9d6
Compare
things to note since I last worked on this:
|
- http://readme.drone.io/ | ||
maintainers: | ||
- name: Matthew Fisher | ||
email: mfisher@deis.com |
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.
- Can you change your name to your github handle? Recent thing we started doing.
- Change your email address
|
||
Alternatively, a YAML file that specifies the values for the parameters can be provided while | ||
installing the chart. 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.
A quick note about the limitations with the default DB and scaling would be helpful.
key: secret | ||
{{ range $key, $value := .Values.server.env }} | ||
- name: {{ $key }} | ||
value: {{ $value | quote }} |
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 like this pattern for quickly iterating over the values. Also like that the ENV vars are the defined with the caps case you'd expect in the values file itself.
This looks great @bacongobbler. I'll try out the chart later and let you know how it goes. |
@k8s-bot ok to test |
resources: | ||
{{ toYaml .Values.agent.resources | indent 10 }} | ||
volumeMounts: | ||
# Enables Docker in Docker |
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.
Just a thought, the way I've done this before (with Jenkins) is to run docker:dind in the same pod and set DOCKER_HOST
in the other container to tcp://localhost:2375
. IMO this is a much cleaner way of getting docker in docker on k8s.
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.
Can you run docker-in-docker on GKE though? I thought you'd need elevated privs to run something like docker in a pod.
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.
Yeah, the docker-in-docker container does need to be run as privileged. In my experience GKE allows this though, however other platforms may not and it will probably need to be called out in the README.
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.
Agreed. I'll go ahead and do that. I'm on vacation atm but I'll be back next week :)
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.
Awesome, yeah I thought you were - what are you doing on GitHub ;)?
- "agent" | ||
env: | ||
- name: DRONE_SERVER | ||
value: ws://{{ template "fullname" . }}/ws/broker |
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.
Shouldn't this be ws://{{ template "fullname" . }}.{{ .Release.Namespace }}:{{ .Values.service.http.externalPort }}/ws/broker
?
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.
If the agent and server are in the same namespace (which they are), you can omit the namespace.
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.
Duh! So used to filling in addresses this way. 🙈
@bacongobbler server pod failed to start when I tried:
|
Hey @bacongobbler, in case you weren't aware @ipedrazas put together a drone chart too, maybe useful for inspiration: https://github.com/kubecamp/drone-chart |
Ping @bacongobbler |
- path: / | ||
backend: | ||
serviceName: {{ template "fullname" . }} | ||
servicePort: {{ .values.service.http.externalPort }} |
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.
Typo here (.values
-> .Values
)
enabled: false | ||
# enable TLS via kube-lego | ||
tls: false | ||
hostname: drone.example.com |
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.
Might want to add ingress.annotations
here....
Couple of fixes done, as well as I changed the drone server to communicate with a docker-in-docker container running in the same pod as opposed to mounting the host socket from Kubernetes. |
Only problem now is to document that the administrator needs to change some fields in values.yaml in order for drone to actually work. As it stands right now doing a bare install of drone will fail because no git repo is set up by default.
|
@bacongobbler: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
I've added incubator/gogs as a dependency so it'll pass CI, but it appears that gogs has some issues of its own.
I simply don't have the time to work on this PR any more since we're no longer using drone internally. If anyone wants to take on this effort further, please let me know. |
Whoa, I'm not sure I'd want to pull gogs in within the Drone releases we'll be creating during installation. gogs should be explicitly installed and managed in its own release. Accidentally nuking your gogs setup by removing Drone would be not great. I assume this was meant to be an ease of use change, but I'd rather set the URL/API tokens like the other providers. |
It's both an ease of use change + a way to get around how CI expects every chart to work out of the box with If you don't like the direction of this PR, please feel free to take it over! |
Closing as stale. |
This is a re-write of #353, focusing on chart extensibility. This has not been tested on a kubernetes cluster just yet, just PR'ing this effort for other users' enjoyment.
TODO: