jonathankingfc / quay-operatorOld

Opinionated deployment of Quay on Kubernetes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Quay Operator

CI

Opinionated deployment of Quay container registry on Kubernetes.

Principles

  • Kubernetes is a powerful platform with an abundance of existing and future features. Always prefer to leverage something Kubernetes does better than try to implement it again.
  • Favor declarative application management to improve everyone's sanity and understanding of the state.
  • Make things simple by default, but always allow diving deeper to discover the details of what is going on.

Getting Started

This Operator can be installed on any Kubernetes cluster running the Operator Lifecycle Manager. Simply create the provided CatalogSource to make the package available on the cluster, then create the Subscription to install it.

If running on OpenShift:

$ oc adm policy add-scc-to-user anyuid system:serviceaccount:<your-namespace>:default

Create the CatalogSource:

$ kubectl create -n openshift-marketplace -f ./deploy/quay-operator.catalogsource.yaml

Wait a few seconds for the package to become available:

$ kubectl get packagemanifest --all-namespaces | grep quay

Create the OperatorGroup:

NOTE: By default, the targetNamespaces field is specified to target the quay-enterprise namespace. Update this value if the namespace the operator is deployed within differs.

$ kubectl create -n <your-namespace> -f ./deploy/quay-operator.operatorgroup.yaml

Create the Subscription to install the Operator:

$ kubectl create -n <your-namespace> -f ./deploy/quay-operator.subscription.yaml

Using the Operator

Batteries-included, zero-config

Install RHOCS Operator using OperatorHub:

Create NooBaa object in openshift-storage namespace:

$ kubectl create -n openshift-storage -f ./kustomize/components/objectstorage/quay-datastore.noobaa.yaml

Wait a few minutes for Noobaa to be phase: Ready:

$ kubectl get -n openshift-storage noobaas noobaa -w
NAME     MGMT-ENDPOINTS              S3-ENDPOINTS                IMAGE                                                                                                            PHASE   AGE
noobaa   [https://10.0.32.3:30318]   [https://10.0.32.3:31958]   registry.redhat.io/ocs4/mcg-core-rhel8@sha256:56624aa7dd4ca178c1887343c7445a9425a841600b1309f6deace37ce6b8678d   Ready   3d18h

Create QuayRegistry instance:

$ kubectl create -n <your-namespace> -f ./config/samples/managed.quayregistry.yaml

Community

Contributing

Pull requests and bug reports are always welcome!

Local Development

Prerequisites

  • KUBECONFIG environment variable set in shell to valid k8s cluster
  • go
  • kubectl
  • kubebuilder
  • docker

Create the QuayRegistry CRD:

$ kubectl create -f ./config/crd/bases/

Run the controller:

$ go run main.go

Tests:

$ go test -v ./...

About

Opinionated deployment of Quay on Kubernetes


Languages

Language:Go 96.5%Language:Makefile 2.5%Language:Dockerfile 1.0%