https://github.com/dippynark/scm-controller
Manage SCM resources with Kubernetes
https://github.com/dippynark/scm-controller
Last synced: over 1 year ago
JSON representation
Manage SCM resources with Kubernetes
- Host: GitHub
- URL: https://github.com/dippynark/scm-controller
- Owner: dippynark
- Created: 2021-07-25T21:35:20.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-09-04T01:10:49.000Z (almost 5 years ago)
- Last Synced: 2025-01-23T12:11:35.218Z (over 1 year ago)
- Language: Go
- Size: 151 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SCM Controller
SCM Controller allows management of Source Control Management resources using Kubernetes. Currently only GitHubWebhooks
are supported.
[Kubebuilder](https://github.com/kubernetes-sigs/kubebuilder) was used to scaffold this project:
```sh
kubebuilder init --domain dippynark.co.uk
kubebuilder create api --group scm --version v1alpha1 --kind GitHubWebhook
kubebuilder create webhook --group scm --version v1alpha1 --kind GitHubWebhook --defaulting --programmatic-validation
```
## Create GitHubWebhook
1. Create a GitHub personal access token with `admin:repo_hook` scope:
[https://github.com/settings/tokens/new?scopes=write:repo_hook](https://github.com/settings/tokens/new?scopes=admin:repo_hook).
Admin is needed for webhook deletion.
1. Create a Kubernetes Secret containing the personal access token:
```sh
kubectl create namespace scm-controller-system \
-o yaml \
--dry-run=client \
| kubectl apply -f -
kubectl apply -f - <