https://github.com/soerenschneider/gollum
Kuberntes Operator for GitHub release assets
https://github.com/soerenschneider/gollum
cicd crd-controller github-release github-release-assets kubernetes operator tekton tekton-pipeline
Last synced: 28 days ago
JSON representation
Kuberntes Operator for GitHub release assets
- Host: GitHub
- URL: https://github.com/soerenschneider/gollum
- Owner: soerenschneider
- Created: 2025-01-09T20:31:29.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-18T20:45:57.000Z (over 1 year ago)
- Last Synced: 2025-02-18T21:29:59.297Z (over 1 year ago)
- Topics: cicd, crd-controller, github-release, github-release-assets, kubernetes, operator, tekton, tekton-pipeline
- Language: Go
- Homepage:
- Size: 382 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# gollum
## Overview
Gollum is a Kubernetes operator designed to monitor GitHub release assets. If the required assets for a specified version are missing, Gollum triggers a Tekton `PipelineRun` to generate them.
## Features
- Monitors GitHub releases for specified repositories.
- Detects missing release assets for a given version.
- Triggers a Tekton `PipelineRun` to build and publish the missing assets.
- Configurable through Kubernetes Custom Resources.
## Installation
### Prerequisites
- Kubernetes cluster (v1.20+ recommended)
- Tekton installed in the cluster
- GitHub API access token (if monitoring private repositories)
### Deploying Gollum
1. Clone the repository:
```sh
git clone https://github.com/your-org/gollum.git
cd gollum
```
2. Apply the CRDs and Operator:
```sh
kubectl apply -f deploy/crds/
kubectl apply -f deploy/operator.yaml
```
3. Verify installation:
```sh
kubectl get pods -n gollum
```
Ensure the operator is running properly.
## Usage
### Defining a Custom Resource
To monitor a repository, create a `GollumReleaseMonitor` Custom Resource:
```yaml
apiVersion: gollum.soeren.cloud/v1alpha1
kind: Repository
metadata:
labels:
app.kubernetes.io/name: gollum
app.kubernetes.io/managed-by: kustomize
name: soerenschneider-tunnelguard
spec:
owner: "soerenschneider"
repo: "tunnelguard"
cloneUsingSsh: false
pipelineRunName: "gollum"
pipelineNames:
assets: "build-gh-release"
versionFilter:
impl: "semver"
arg: ">= v1.0.0"
workspaces:
signify:
type: "secret"
secretName: "signify"
shared-data:
type: "volume"
storageClassName: "openebs-hostpath"
github-token:
type: "secret"
secretName: "github"
```
Apply it using:
```sh
kubectl apply -f example-repo-monitor.yaml
```
### How It Works
1. Gollum continuously monitors the specified GitHub repository for new releases.
2. If a release is missing any required assets, Gollum triggers the specified Tekton `PipelineRun`.
3. Tekton builds and uploads the missing assets to the release.
4. Gollum updates the status of the `GollumReleaseMonitor` resource.
## Configuration
- **GitHub Authentication**: Use a Kubernetes secret to store a GitHub personal access token (PAT) for private repositories.
- **Tekton Integration**: Specify an existing Tekton pipeline reference in the CR.
- **Polling Interval**: Configure how frequently Gollum checks GitHub releases.
## Development
### Running Locally
```sh
go run main.go
```
### Building the Docker Image
```sh
docker build -t your-org/gollum:latest .
```
### Deploying the Operator
```sh
kubectl apply -f deploy/
```