Code Monkey home page Code Monkey logo

kubernetes-gitlab-runner's Introduction

kubernetes-gitlab-runner

Gitlab runners configuration yamls to run in Kubernetes

General

Configuration deployed using provided yamls in k8s-templates will create runners in gitlab namespace. It has configuration for S3 bucket caching (make sure to update bucket name in deployment.yaml).

Kubernetes addons used for deployments

In my configuration I am making use of the following addons:

  • External Secrets - This is used to pull gitlab token from AWS SSM parameter store and populate it as a secret
  • Reloader - this is extremely useful as it watches changes in ConfigMap and Secret and performs rolling upgrades on Pods

In the external-secret.yaml you can modify which SSM paremeter should be used by editing key.

Gitlab global cache

S3 bucket caching setup can all be configured to your needs in deployment.yaml. See the following block:

- name: CACHE_TYPE
  value: s3
- name: CACHE_PATH
  value: gitlab-caches
- name: CACHE_SHARED
  value: "true"
- name: CACHE_S3_SERVER_ADDRESS
  value: s3.amazonaws.com
- name: CACHE_S3_BUCKET_NAME
  value: kubernetes-gitlab-cache
- name: CACHE_S3_BUCKET_LOCATION
  value: eu-west-1
- name: RUNNER_CACHE_DIR
  value: /opt/gitlab-runner/cache/
- name: RUNNER_BUILDS_DIR
  value: /opt/gitlab-runner/builds/

Gitlab registration token

As previously stated, token is stored in AWS SSM parameter store. Following is the configuration which points at the generated secret from external-secrets:

- name: init-runner-secrets
  projected:
    defaultMode: 420
    sources:
    - secret:
        items:
        - key: runner-registration-token
          path: runner-registration-token
        name: gitlab-runner-token

kubernetes-gitlab-runner's People

Contributors

marcincuber avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.