harbor-operator

module
v1.1.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2020 License: Apache-2.0

README

Harbor Operator

A Kubernetes operator for managing Goharbor instances

GitHub license Go Doc Release

Go Report Card Go Maintainability Test Coverage

This project is still under development and not stable yet - breaking changes may happen at any time and without notice

Features

  • Easy Harbor deployment & scaling: Every Harbor instance is bound only to the deployed Custom Resource. The operator utilizes a helm client library for the management of these instances

  • Custom chart repositories: If you need to install a customized or private Harbor helm chart, the instancechartrepo resource allows you to do so. The official Harbor Helm chart can be found here

  • Harbor resource reconciliation: This operator automatically manages Harbor components by utilizing a custom harbor client.

CRDs
  • registriesv1alpha1:
    • instances.registries.mittwald.de
    • instancechartrepos.registries.mittwald.de
    • repository.registries.mittwald.de
    • users.registries.mittwald.de
    • replications.registries.mittwald.de
    • registries.registries.mittwald.de

To get an overview of the individual resources that come with this operator, take a look at the examples directory .

Installation

Helm

The helm chart of this operator can be found under ./deploy/helm-chart/harbor-operator.

Alternatively, you can use the the Mittwald Kubernetes Helm Charts repository:

helm repo add mittwald https://helm.mittwald.de
helm repo update
helm install harbor-operator mittwald/harbor-operator --namespace my-namespace

Documentation

For more specific documentation, please refer to the godoc of this repository

Web UI

For a trouble-free experience with created instances, a valid TLS certificate is required.

For automatic certificate creation, you can set the desired cluster certificate issuer via the instance spec's ingress annotations:

.spec.helmChart.valuesYaml.expose.ingress.annotations

Example annotation, using cert-manager as the cluster-issuer:

cert-manager.io/cluster-issuer: "letsencrypt-issuer"

Local Development
Installing

Create a local kind cluster containing all needed resources via:

make bootstrap-kind

To start the operator locally, use:

operator-sdk run --local --namespace harbor-operator
Deploying example resources

Note: When using the provided examples and running the operator locally, an entry to your /etc/hosts is needed:

127.0.0.1 core.harbor.domain 

Example resources can be deployed using the files provided in the examples directory. To start testing, simply apply these after starting the operator:

kubectl create -f examples/instancechartrepo.yaml
kubectl create -f examples/instance.yaml
[...]

After a successful installation, the Harbor portal may be accessed either by localhost:30002 or core.harbor.domain:30002.

Uninstalling

Uninstall all dependencies via:

make teardown

Directories

Path Synopsis
api module
apipkg module
cmd
manager command
pkg
apis/registries
Package registries contains registries API versions.
Package registries contains registries API versions.
apis/registries/v1alpha1
Package v1alpha1 contains API Schema definitions for the registries v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=registries.mittwald.de Package v1alpha1 contains API Schema definitions for the registries v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=registries.mittwald.de
Package v1alpha1 contains API Schema definitions for the registries v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=registries.mittwald.de Package v1alpha1 contains API Schema definitions for the registries v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=registries.mittwald.de

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL