Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Add a Chart for GitLab CI Runner #608

Closed
wants to merge 4 commits into from

Conversation

twk3
Copy link
Contributor

@twk3 twk3 commented Feb 10, 2017

In order for this Chart to properly work, you need to specify the GitLab URL that you want to register the runner to. And the registration token, taken from the GitLab instance. (Either from the Shared Runners page for Admins, or any Project's CI/CD Pipelines settings)

In order for this Chart to properly work, you need to specify the GitLab URL that you want to register the runner to. And the registration token, taken from the GitLab instance. (Either from the Shared Runners page for Admins, or any Project's CI/CD Pipelines settings)
@k8s-ci-robot
Copy link
Contributor

Hi @twk3. 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 @k8s-bot ok to test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

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.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 10, 2017
@rothgar
Copy link
Contributor

rothgar commented Feb 10, 2017

Getting the token requires manual involvement from a user and kubectl execing into the gitlab pod. Is that correct?

Is there a way to export that token from the gitlab pod as a secret and consume the secret in the runner?

value: true
{{ end }}
- name: KUBERNETES_NAMESPACE
value: {{ default "" .Values.runners.namespace | quote }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when not specified would it make sense to default to Release.Namespace instead?
ref: https://github.com/kubernetes/helm/blob/master/docs/charts.md#predefined-values

@kwiesmueller
Copy link

Hey, tested this with k8s on GCE and am getting errors with docker builds.
Seams like it is not mounting the docker.sock or the privileged flag is not working.

Is this a mistake on our side or something intended?

@so0k
Copy link
Contributor

so0k commented Feb 14, 2017

@rothgar - I tried to automate the token retrieval process here: https://github.com/honestbee/gitlab-infra#registering-multi-runner

…er deployment

The value was being passed as a boolean when it should have been a string
@twk3
Copy link
Contributor Author

twk3 commented Feb 16, 2017

@sameersbn thanks, I added that in

@kwiesmueller there was a bug in how I passed the privileged env variable. I updated it, and it should now be fixed. kube clusters that allow privileged should work with dind if you flag privileged to true now.

Copy link

@kwiesmueller kwiesmueller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That fixed it on my side as well. Thanks.

@Dexyon
Copy link

Dexyon commented Mar 1, 2017

What can I do to help here? I just deployed the chart from a local clone and at first sight everything looks ok!

@lachie83 lachie83 modified the milestone: Milestone 4 Mar 9, 2017
Copy link
Member

@prydonius prydonius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking great, I just have a few comments.

@@ -0,0 +1,27 @@
{{- if default "" .Values.gitlabUrl }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you use default here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copying what was used in the gitlab-ce chart. I've dropped them here now.

@@ -0,0 +1,15 @@
name: gitlab-runner
version: 0.1.0
description: GitLab Runner
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we improve the description and add an icon?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated with better description and added icon

Copy link

@kwiesmueller kwiesmueller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, there is a mismatch of the values in values.yaml and the template files.
The rest looks good, so far. Test instance is starting up.

## The GitLab Server URL (with protocol) that want to register the runner against
## ref: https://docs.gitlab.com/runner/commands/README.html#gitlab-runner-register
##
# gitlabURL: http://gitlab.your-domain.com/

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You got a not matching value here: gitlabURL in default values but gitlabUrl in all templates.
Just discovered this while testing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, fixed

twk3 added 2 commits April 4, 2017 11:17
Fix values.yml reference to gitlabUrl, case issue
Drop unnessesary defaulting in the Notes.txt
Add better chart description, and include icon
@twk3
Copy link
Contributor Author

twk3 commented Apr 4, 2017

@prydonius I've updated the chart with the requested changes

@twk3
Copy link
Contributor Author

twk3 commented Apr 24, 2017

@prydonius are there any additional changes needed?

@lsjostro
Copy link
Contributor

@twk3 would be nice if you could enable the metrics server for the runner.

@rimusz
Copy link
Contributor

rimusz commented Apr 25, 2017

+1 for optional metrics

@mgoodness mgoodness self-assigned this May 4, 2017
@rimusz
Copy link
Contributor

rimusz commented May 10, 2017

@twk3 also readme should really include how to get runner Registration Token for selfhosted/hosted gitlab
I have intensively tested it with gitlab-ce, have not find any issues

@kwiesmueller
Copy link

Metrics would be nice to have, that's true...
We are using this chart in production for over 1 Month and got no issues. Everything is working great.

@rimusz
Copy link
Contributor

rimusz commented May 10, 2017

@kwiesmueller can you share the image you use for kubernetes executors via runners.image:?

@lsjostro
Copy link
Contributor

lsjostro commented May 10, 2017

@kwiesmueller
Copy link

@rimusz the few builds currently running are using golang:1.8
The image set as default under runners.image is ubuntu:16.04 as it is not used anyways.

@mgoodness
Copy link
Contributor

mgoodness commented May 25, 2017

At the risk of offending everyone who's worked on this so far, I have to ask: is there value in adding & maintaining this chart when GitLab has their own, supported version?

https://gitlab.com/charts/charts.gitlab.io/tree/master/charts/gitlab-runner

#justasking

@rothgar
Copy link
Contributor

rothgar commented May 25, 2017

Benefits of keeping this chart

  • Possible to have different implementations (maybe not a benefit)
  • Single repo to discover the chart from

Downsides

  • Probably not going to have as many features or be supported
  • Duplicating work
  • Need to add a separate repo

I'm in favor or getting rid of this one and using the chart provided by gitlab. Similarly I'm in favor of using containers from any project that provides their own containers (e.g. postgres) over community built/maintained containers.

It makes discovery harder but reduces duplicate work and gets features and fixes out faster. On the flip side, if someone is running kubernetes and wants to deploy gitlab they may not know about helm+charts. If gitlab documents "Here's how to deploy gitlab on kubernetes with this chart" it may let more people discover helm and the work happening here.

@kwiesmueller
Copy link

@mgoodness:
I didn't even know about the gitlab chart before I started working on my own one and then stumbled about this PR.
I would favor to keep it here, as it might help people looking for it in the official repos. Also I can not see any special features that would make a good reason to stay with the "official" gitlab one.

@kwiesmueller
Copy link

@rothgar:
I agree on the container part of your comment.
For various reasons we build all containers used in our clusters by ourselves as community managed containers tend to loose our trust by missing security updates etc.

@twk3 twk3 mentioned this pull request Jun 9, 2017
@twk3
Copy link
Contributor Author

twk3 commented Jun 10, 2017

A similar conversation regarding the gitlab repo charts is taking place in this issue: #1138

@viglesiasce
Copy link
Contributor

@twk3 I also agree that we should lean on the officially supported chart. I don't think the duplicate work is worth the maintenance burden.

We will be looking at how to delegate chart responsibility to other repositories soon and will update accordingly.

Do you mind if we close this out until then?

@mgoodness
Copy link
Contributor

Closing in favor of the upstream chart. Feel free to re-open if/when it's decided otherwise.

@mgoodness mgoodness closed this Aug 2, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
changes needed cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/large
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet