GithubHelp home page GithubHelp logo

isabella232 / corp-gh-org-controller Goto Github PK

View Code? Open in Web Editor NEW

This project forked from weaveworks/corp-gh-org-controller

0.0 0.0 0.0 72 KB

A Kubernetes controller to create and manage GitHub Enterprise Organisations.

Go 68.96% Makefile 11.82% Smarty 4.68% HCL 9.42% Dockerfile 1.87% Starlark 3.24%

corp-gh-org-controller's Introduction

GitHub Enterprise Org Controller

A Kubernetes controller for managing Weaveworks GitHub Enterprise Organisations.

Maintainers:

Features:

  • Create Enterprise Organisations under the Weaveworks Enterprise
  • Create repositories in the new organisation
  • Create teams in the organization with access to repositories

Installation

A Helm chart has been provided to deploy the controller. You must configure the billingEmail and enterpriseName via the Chart when deploying the controller. See e2e/terraform/main.tf for a sample Terraform configuration that uses the Helm chart to deploy the controller and a Terraform module to create an GitHubOrg Kubernetes resource.

Usage

Please note that this controller will not delete or remove any resources from GitHub.

A PAT token with sufficient privileges to create organisations, repositories and teams must exist in the same namespace as the GitHubOrg resource. It is recommended to rotate this token frequently.

Organisations

To create an organisations provide the spec.orgId, spec.orgName and GitHub usernames of organisation administrators (spec.adminLogins).

The controller will not update organisation details once the organisation has been created. So if you wish to modify adminLogins or delete the organisation you must do this via the Web UI.

apiVersion: corp.weave.works/v1alpha1
kind: GitHubOrg
metadata:
  name: my-github-org
  namespace: organisations
spec:
  orgId: my-org
  orgName: My Organisation
  adminLogins:
  - orgAdmin01
  - orgAdmin02
  tokenSecretName: gh-secret
  debug: true
  repositories:
  - name: my-repo
    visibility: private
    autoInit: true
  teams:
  - name: red-team
    description: |-
      A truly awesome team of GitHubers.
    maintainers:
    - alice
    - bob
  - name: blue-team
    maintainers:
    - jerry
    - mary

Repositories

Repositories can be added to the organisation using the spec.repositories. Repositories can be added to the organisation at any time however they must be removed manually using the Web UI. The repositories field takes the following parameters:

name: string # the name of the repository
description: string # a description of the repository
visibility: string # whether the repository is public, private or internal (default: private)
autoInit: bool #  create aninitial commit in the repository (default: true)
hasIssues: bool # enable issues for the repository (default: true)
hasProjects: bool # enable projects for repository (default: false)

Teams

Teams can be created using the spec.teams field. Teams are added to all organisation repositories with admin privileges. Teams can be added at any time however the must be removed manually using the Web UI. The teams field takes the following parameters:

name: string # the name of the team
description: string # a description of the team
maintainers: []string # a list of GitHub usernames who will be added to the team as maintainers

corp-gh-org-controller's People

Contributors

phoban01 avatar weaveworks-admin-bot 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.