{"id":13823073,"url":"https://github.com/mittwald/harbor-operator","last_synced_at":"2025-07-08T16:30:50.813Z","repository":{"id":40393662,"uuid":"261153366","full_name":"mittwald/harbor-operator","owner":"mittwald","description":"A Kubernetes operator for managing goharbor instances","archived":true,"fork":false,"pushed_at":"2025-02-24T09:27:54.000Z","size":1136,"stargazers_count":22,"open_issues_count":13,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-07-01T13:12:52.224Z","etag":null,"topics":["golang","hacktoberfest","kubernetes","kubernetes-controller","kubernetes-operator"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mittwald.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-04T11:16:25.000Z","updated_at":"2025-02-24T09:31:38.000Z","dependencies_parsed_at":"2024-04-29T07:57:57.201Z","dependency_job_id":null,"html_url":"https://github.com/mittwald/harbor-operator","commit_stats":null,"previous_names":[],"tags_count":74,"template":false,"template_full_name":null,"purl":"pkg:github/mittwald/harbor-operator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mittwald%2Fharbor-operator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mittwald%2Fharbor-operator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mittwald%2Fharbor-operator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mittwald%2Fharbor-operator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mittwald","download_url":"https://codeload.github.com/mittwald/harbor-operator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mittwald%2Fharbor-operator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264304514,"owners_count":23587978,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["golang","hacktoberfest","kubernetes","kubernetes-controller","kubernetes-operator"],"created_at":"2024-08-04T09:00:20.215Z","updated_at":"2025-07-08T16:30:50.439Z","avatar_url":"https://github.com/mittwald.png","language":"Go","funding_links":[],"categories":["Archive"],"sub_categories":["SDKs For Harbor"],"readme":"# Harbor Operator\n\nA Kubernetes operator for automated management of [Goharbor](https://github.com/goharbor/harbor) instances\n\n[![GitHub license](https://img.shields.io/github/license/mittwald/harbor-operator.svg?style=flat-square)](https://github.com/mittwald/harbor-operator/blob/master/LICENSE)\n[![Go Doc](https://img.shields.io/badge/godoc-reference-blue.svg?style=flat-square)](https://pkg.go.dev/github.com/mittwald/harbor-operator)\n[![Release](https://img.shields.io/github/release/mittwald/harbor-operator.svg?style=flat-square)](https://github.com/mittwald/harbor-operator/releases/latest)\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/mittwald/harbor-operator?style=flat-square)](https://goreportcard.com/badge/github.com/mittwald/harbor-operator)\n![Go](https://github.com/mittwald/harbor-operator/workflows/Go/badge.svg?branch=master)\n\n## Table of contents\n- [Installation](#Installation)\n- [Architecture](#Architecture)\n- [CRDs](#CRDs)\n- [Documentation](#Documentation)\n  - [Local Development](#Local-Development)\n  - [Testing](#Testing)\n- [Example Deployment](#Example-Deployment)\n\n### Installation\n\nThe helm chart of this operator can be found in this repository under [./deploy/chart](./deploy/chart)\nAlternatively, you can use the [helm.mittwald.de](https://helm.mittwald.de) chart repository:\n\n```shell script\nhelm repo add mittwald https://helm.mittwald.de\nhelm repo update\nhelm install harbor-operator mittwald/harbor-operator --namespace my-namespace\n```\n\n### Architecture\n\n- The operator manages the deployment of [goharbor/harbor](https://github.com/goharbor/harbor) instances\n  \n- Many components / features of Harbor can be accessed by creating _Custom Resource Definitons_.\n  Resource changes are reconciled in the main controller loop.\n    \u003e For a full list of Harbor's features, please refer to [goharbor/harbor#features](https://github.com/goharbor/harbor#features)\n  \n- The operator manages Harbor components by utilizing the [mittwald/goharbor-client](https:/github.com/mittwald/goharbor-client) API client\n\n- Customized or private Harbor helm charts are supported via the `InstanceChartRepository` resource\n  \u003e The official Harbor Helm chart can be found [here](https://github.com/goharbor/harbor-helm)\n\n```\n 0\n/|\\ User\n/ \\\n\n |\n |      creates         ┌───────────────────────────────┐\n ├────────────────────▶ |    InstanceChartRepository    |\n |                      |       (Custom Resource)       |\n |                      └───────────────────────────────┘\n |                                             ▲\n |      creates         ┌───────────────────┐  |\n ├────────────────────▶ |      Instance     |  |\n |                      | (Custom Resource) |  |\n |                      └───────────────────┘  | watches\n |                                    ▲        |\n |                                    |        |\n |                            watches |        |\n |                                    |        |           creates \u0026 updates\n |                                  ┌─┴────────┴──────┐      (via Instance)      \n |                                  │ Harbor Operator ├──────────────────────────┐\n |                                  └─────────┬─────┬─┘                          |\n |                                            ╎     |                            |\n |                                    watches ╎     |                            |\n |                                            ╎     |                            |\n |      creates         ┌─────────────────┐   ╎     |         ┌─────────┐  ┌─────┴──────┐\n ├────────────────────▶ |     Project     ├ - ┼ - - └─────── ▶| Harbor  ├──┤   Harbor   |\n |                      |(Custom Resource)|   ╎      perform  |   API   |  |Helm Release|\n |                      └─────────────────┘   ╎      CRUD     └─────────┘  └────────────┘\n |                              ▲             ╎      via the CRs on the left\n |                              |             ╎\n |           has access through |             ╎\n |               membership     |             ╎\n |                              |             ╎\n |      creates         ┌───────┴─────────┐   ╎\n ├────────────────────▶ |      User       ├ - ┤\n |                      |(Custom Resource)|   ╎\n |                      └─────────────────┘   ╎\n |      creates         ┌─────────────────┐   ╎\n ├────────────────────▶ |    Registry     ├ - ┤\n |                      |(Custom Resource)|   ╎\n |                      └─────────────────┘   ╎\n |                              ▲             ╎\n |                              |             ╎\n |                  is owned by |             ╎\n |                              |             ╎\n |      creates         ┌───────┴─────────┐   ╎\n └────────────────────▶ |    Replication  ├ - ┘\n                        |(Custom Resource)|\n                        └─────────────────┘\n```\n\n### CRDs\n\nThe following _Custom Resource Definitions_ can be used to create / configure Harbor components:\n\n- [InstanceChartRepositories](./config/samples/README.md#InstanceChartRepositories)\n- [Instances](./config/samples/README.md#Instances)\n- [Projects](./config/samples/README.md#Projects)\n- [Registries](./config/samples/README.md#Registries)\n- [Replications](./config/samples/README.md#Replications)\n- [Users](./config/samples/README.md#Users)\n\nTo get an overview of the individual resources that come with this operator,\ntake a look at the [samples directory](./config/samples).\n\n## Documentation\nFor more specific documentation, please refer to the [godoc](https://pkg.go.dev/github.com/mittwald/harbor-operator) of this repository.\n\n### Local Development\nTo start the operator locally, run:\n```shell script\nmake run\n```\n\nTo start a debug session using [delve](https://github.com/go-delve/delve), run:\n```shell script\nmake debug\n```\nThis will start a debugging server with the listen address `localhost:2345`.\n\nLocal installations can be accessed via `http://`\n\nWhen making changes to API definitions (located in [./apis/registries/v1alpha2](/apis/registries/v1alpha2)),\nmake sure to re-generate manifests via:\n```shell script\nmake manifests\n```\n\n### Testing\nTo test the operator, simply run:\n```shell script\nmake test\n```\n\nThis will spin up a local [envtest](https://sdk.operatorframework.io/docs/building-operators/golang/references/envtest-setup)\nenvironment and execute the provided tests.\n\nAlternatively, you can run tests by [ginkgo](http://onsi.github.io/ginkgo/#getting-ginkgo) via:\n``` shell script\nginkgo test ./...\n```\nOr via the go test suite:\n``` shell script\ngo test -v ./...\n```\n\n_Some_ unit tests require a [mocked controller-runtime client](controllers/registries/internal/mocks/runtime_client_mock.go).\nThis mock is generated using: `make mock-runtime-client`.\n\n### Example Deployment\n\u003e Note: If you want to test a local setup using an URL, you will need to append it to your `/etc/hosts`:\n\u003e ```shell script\n\u003e 127.0.0.1 core.harbor.domain\n\u003e ```\n\nExample resources can be deployed using the files provided in the [samples directory](./config/samples).\n\nTo start testing, simply apply these after the operator has started:\n\n```\nkubectl create -f config/samples/\n```\n\nAfter a successful installation, the Harbor portal may be accessed either by `localhost:30002` or `core.harbor.domain:30002`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmittwald%2Fharbor-operator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmittwald%2Fharbor-operator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmittwald%2Fharbor-operator/lists"}