Skip to content

gojekfarm/darkroom-operator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Darkroom Operator

A Kubernetes Operator to put Darkroom on Autopilot

Build Status Test Status Coverage Status Go Report Card GitHub Release

Introduction

Darkroom is a great image proxy to serve your images from your desired source and perform image manipulations on the fly.

This operator aims to make to it easy to deploy Darkroom in a Kubernetes Cluster and make it easy to manage the cluster with an intuitive GUI.

Installation

TBD

Dev Environment Setup

Install Operator SDK v1.5.0

brew install operator-sdk

Note: We recommend going through operator-sdk getting started guide if you are new to operator development

Install KubeBuilder

Operator SDK uses etcd bundled with KubeBuilder, install it with bin/install-kubebuilder.

[Optional] Add /usr/local/kubebuilder/bin to your $PATH

Creating New API Objects

The structure of this project is different than other operator codebases you might be familiar with. Since this project also includes an API Server with GUI and makes use of same API definitions, we have kept it this way.

To generate a new API object, run the command

operator-sdk create api --group deployments --version v1alpha1 --kind Darkroom --resource=true --controller=true

This will generate the required resource definition and controller under ./api/ and ./controllers/, move these to ./pkg/api/ and ./internal/controllers/ respectively. But the command will fail as there is no root level main.go file.

The changes required in main.go are hence skipped and you must add the generated resource scheme to runtime scheme in cmd/operator/cmd/root.go and setup the Reconciler with the Controller Manager manually.

You can run make operator/generate to generate necessary code by the controller-gen. And run make operator/manifests to generate the required YAML definitions.

Deploying Webhooks for development

It is recommended to use a Kind cluster for faster iteration.

Install cert-manager with

kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.2.0/cert-manager.yaml

Note: You may use the latest version

Contributing Guide

Read our contributing guide to learn about our development process, how to propose bugfixes and improvements, and how to build and test your changes to Darkroom Operator.

License

Darkroom Operator is MIT licensed.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages