GithubHelp home page GithubHelp logo

blackieops / rollingpin Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 65 KB

๐Ÿ‘ฉโ€๐Ÿณ Rolls out your containers.

License: BSD 3-Clause "New" or "Revised" License

Dockerfile 1.74% Go 98.26%
docker containers kubernetes microservice webhook harbor golang

rollingpin's Introduction

๐Ÿง‘โ€๐Ÿณ rollingpin

rollingpin is a small Go infrastructure service that receives webhooks from a container regsitry and updates corresponding Kubernetes deployments to facilitate minimal continuous delivery without complex CI/CD pipelines.

Currently, the only supported webhook source is from a Harbor Registry.

Usage

rollingpin is first and foremost a Kubernetes service, so the only supported usage is as a container in a Kubernetes pod.

Authorization

As rollingpin modifies Kubernetes resources, it needs to be authorized to take certain actions against the Kubernetes API. You'll need to set up a Service Account and a couple RBAC policies to allow this.

First, a service account:

---
apiVersion: v1
kind: ServiceAccount
metadata:
  name: rollingpin

Then, for each namespace you want rollingpin to access, you'll need to create a Role and RoleBinding. It is highly recommended to be as strict as possible, and to avoid using a ClusterRole if at all possible.

The only permissions needed are to get and update deployments.

---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: rollingpin-deploy
rules:
- apiGroups: ["apps/v1"]
  resources: ["deployments"]
  verbs: ["get", "update"]

# Create a RoleBinding in every namespace that rollingpin needs to have access
# to deployments.
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: rollingpin
  namespace: default
subjects:
- kind: ServiceAccount
  name: rollingpin
  apiGroup: ""
roleRef:
  kind: ClusterRole
  name: rollingpin-deploy
  apiGroup: rbac.authorization.k8s.io

Deployment

rollingpin is a stateless service; deploy it as you would any other container on Kubernetes. Just ensure you set the serviceAccountName in your pod spec to match the Service Account you created for rollingpin.

Containers can either by built yourself, or pulled from GitHub Packages:

ghcr.io/blackieops/rollingpin:v1.3.0

rollingpin's People

Contributors

alexblackie avatar

Stargazers

Mike avatar

Watchers

 avatar James Cloos avatar

rollingpin's Issues

Support GitHub Packages

It would be advantageous to diversify the container registry support by adding support for GitHub webhooks, so containers pushed to GitHub Packages notify rollingpin.

Support Gitea

Gitea has a package repo that can host Docker containers. We should investigate what it would take to integrate with Gitea Packages/webhooks.

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.