/repo-operator

A kubernetes operator to manage repositories

Primary LanguageGoApache License 2.0Apache-2.0

repo-operator

repo-operator provides easy life cycle management of a package repository and it's associated objects.

repo-operator is an attempt to automate creation of package repository of particular type and manage through the namespace using it.

The operator watches for an object of particular type "Repository" in the namespaces and as soon as it finds it or observes changes to existing, it will reconcile to create required repositories based on specified field values.

🐸 NOTE : This Operator does not manage/Upgrade any artifact repository manager (like Artifactory..) but instead it manages/upgrades repository resources like package repositories, user permission etc.

📢 Currently, repo-operator supports - Jfrog Artifactory which is widely used with-in industry as universal artifact repository manager.

What is an Operator?

Operators are software extensions to Kubernetes that make use of custom resources to manage applications and their components. Operators follow Kubernetes principles, notably the control loop. Read more about it here

Motivation

Almost all projects now-a-days uses an artifact repository manager to resolve application dependencies or store release artifacts/images. If also building and deploying their images on a managed kubernetes cluster then it is a good idea to keep those repositories somehow connected to the namespaces to keep track and manage everything at one place.

With this approach user can treat their repository as a kubernetes object in their namespace and make changes. This automation also removes man in the middle and helps to standardize. It also provides required wiring when images need to be pushed to external registry.

How it is built?

  • The boiler-plate code for this operator is generated through the kubebuilder framework.
  • It uses go modules.
  • It relies on artifactory rest api to create required objects.
  • The idea is to keep it generic so that it can support other repository managers like nexus, pulp etc going forward.

CustomResourceDefinitions

The Operator acts on the Repository custom resource definitions (CRDs): The Operator ensures all the time that repository of particular type exists in the Artifactory, it also allow you modify Permission object by add/remove user.

Getting started

👉 Get started with repo-operator

Contributing

Please read more about "How to contribute"