Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

giantswarm/harbor-config-operator

Repository files navigation

harbor-config-operator

Currently a PoC for an operator that will administer harbor registeries, projects and replication rules with execution.

Development

Build

Makefile targets exists which build the controller and generate the kubernetes manifests. To build and generate run the following:

make build

Deploy

To run the controller locally against a local kind cluster, it's recommnded to port-forward to the harbor-core pod and set the HARBOR_CORE_URL. For instance:

  • kubectl -n harbor-cluster port-forward $(kubectl -n harbor-cluster get pods -l goharbor.io/operator-controller=core -ojson | jq -r '.items[].metadata.name') 8080:8080
  • export HARBOR_CORE_URL="http://127.0.0.1:8080/api/v2.0"
  • make install
  • make run

Test

To execute the controller tests:

make test