Skip to main content
An application publishes to your organisation’s private Ankra registry unless you say otherwise. If you already run Harbor, declare it on the application and Ankra publishes there, reads the published tags back from there, and pulls from there - including minting the robot account the build logs in with, if you let it. This guide is the operator’s side of Using your own registry: what Harbor needs to look like before you point an application at it, what Ankra creates once you do, and how to check it from the Harbor end.

The two credentials

Ankra talks to your Harbor with registry credentials of your organisation. A declaration names up to two of them, and they do different jobs.
The read credential is what makes a declaration usable rather than merely descriptive. Without one, Ankra records where the images live but cannot read their tags or pull them - so publish readiness, the demo build check and the deploy gate all keep reporting the application as never built, while it publishes healthily to a registry Ankra simply cannot see. It is also what the cluster pull secret is built from: declare a registry with no read credential and no pull secret is created at all.
Ankra does not mint robots for a registry you operate unless you hand it the keys. With no admin_credential_name, setup names the two Actions secrets the workflow reads and leaves them to you; your robots stay yours and untouched.

What Harbor needs first

1

Have the project, or let Ankra create it

Ankra publishes into the project the declaration’s oci://<host>/<project> names. With an admin_credential_name it checks the project exists when you declare it, and creates it if it does not - private, or public with --project-public - when that credential may create projects. A credential that may not is refused with the project and host named, so a declaration no build could publish to is never accepted. Without an admin credential nothing is checked: create the project yourself, and decide whether it is public or private - Ankra works with either, and a private project is why the pull secret exists.
2

Mint the project-administrator credential

The account behind admin_credential_name is what Ankra checks and creates projects with, and mints robots with. A system-level robot is the tidiest; this is the minimal set that does everything Ankra asks of it, by level:The admin credential itself never pushes an image; the repository, artifact and tag rows exist because Harbor caps a robot a robot creates at its creator’s own permissions, so the admin robot must hold everything it will grant the application’s push robot. Harbor refuses project:read on a system robot (bad request permission: project:read), and project-level read on * covers only projects that exist. Ankra therefore checks a project it cannot read by listing projects by name, which system project:list covers; a name the listing lacks is created with project:create. Store the robot as a registry credential in Ankra.
A project-scoped robot cannot administer robots: Harbor’s project-level robot permission set has no robot create/update/delete, so a declaration whose admin_credential_name points at an ordinary project robot fails to mint the application’s robot - with a permission error from Harbor, not from Ankra. A Harbor user with Project Admin works for an existing project, and can create a missing one only when Harbor’s Project creation setting is Everyone.
3

Store a read credential

Create the pull account - a system robot with pull/list/read across the projects Ankra reads is the tidiest - and store it as a second registry credential. This is the one that ends up inside every cluster’s pull secret, so scope it to pull, not push.

Declaring it on an application

Declare the registry when you create the application where you can: the setup job generates the build workflow from the declaration the application is created with, so a registry added afterwards leaves a workflow that logs in to the wrong one until the application is reconciled and its setup pull request merged.
Where your Harbor’s repository layout is not Ankra’s <project>/<app>/<component> nesting, say so rather than reorganising Harbor: --flat-repositories addresses components as <project>/<component>, and --component-repository backend=commerce-backend names one outright. Both are used by publish readiness, the deploy gate and the generated workflow, so they describe what your pipeline already pushes.

The robot Ankra mints

With a project-administrator credential in the declaration, every application gets a push robot of its own. Nothing else shares that login, so a leaked repository secret is rotated or revoked for that one application, and a deleted application takes its robot with it.
The same lives under Settings → Image registry in the portal, and on the API at /api/v1/org/applications/{application_id}/registry-robot (GET, POST with {"rotate": true|false}, DELETE).

Checking it from the Harbor end

Project robots are not returned by Harbor’s system robot listing; query them with the project id.
A healthy application robot comes back enabled, with expires_at: -1 and exactly push repository plus pull repository on its own project.

Robot accounts you create yourself

The robots above are Ankra’s: one push robot per application, and the organisation’s ankra-harbor-ci and ankra-harbor-pull logins. For anything that logs in to your project without Ankra in the loop - a CI system you run yourself, a laptop pushing an image by hand, a cluster Ankra does not manage pulling from the project - create a robot of your own. A robot is a named login bound to one project: your organisation’s own, unless you pick another. It is a project-level robot on the registry, so whatever it is allowed to do, it does it on that project and reaches nothing else on the registry. Its secret is shown exactly once, when it is created or rotated. The login is also stored as the managed registry credential ankra-harbor-robot-<name>, so clusters and applications can reference it like any other registry credential; it cannot be edited or deleted through the generic credential lanes, only revoked here.
On the API the same lives at /api/v1/org/registry-robots; creating and rotating need credentials.write, revoking credentials.delete. Names are 2 to 32 lower-case letters, digits and hyphens.

Exactly the permissions a job needs

Push-and-pull fits a build and pull fits a cluster. A cleanup job that deletes old artifacts, a release job that moves a tag, or a scanner that reads reports needs something else, and should not be handed a login that can also push. State the permissions instead of a scope:
Every permission is a right on the content of your project. None of them administers the project - its members, robots, quota or retention stay with Ankra - and none of them reaches another project. --scope and --permission are alternatives; stating both is refused. Because some of these permissions delete images, creating a robot with any permission other than pull and push needs the credentials.reveal permission as well as credentials.write. Administrators and owners hold both; a preset robot, or one that lists only pull and push, needs only credentials.write. --expires-in-days is enforced by the registry: after that many days the login stops working. Rotating a robot gives it a new secret and never more time, so an expired robot is revoked and created again rather than rotated.

Scoping a robot to one project

Everything your organisation publishes lands in one registry project, so a robot bound to it can reach all of it. To give a login less, keep some images apart: create an extra project, push those images there, and bind the robot to that project. A robot reaches the one project it is bound to and nothing else on the registry.
ankra registry projects list prints where to push for each project. An extra project named staging is org-<organisation-id>-staging on the registry, so its images are <registry host>/org-<organisation-id>-staging/<repository>. Deleting a project never deletes anything else on the way. ankra registry projects delete staging is refused while the project still holds repositories, and while robot accounts are still bound to it: delete the repositories from the registry and revoke the robots first. Your organisation’s own project cannot be deleted. Ankra’s own lanes keep using your organisation’s own project: applications build into it, and clusters pull from it with the pull robot. An extra project is for what you push yourself, and a cluster pulls from it with a robot you bind to it, referenced through its credential ankra-harbor-robot-<name>.

Robots on a Harbor you run yourself

If your organisation runs its own Harbor and has connected it to Ankra as an OCI registry, the same commands create robots there too. Name the registry entry, a credential of yours that may manage robot accounts on it, and the one project of that registry the robot is bound to. Ankra mints, rotates and revokes the robot with that credential, and never uses its own registry administrator on a registry it does not run. On the Registry robots page, pick the registry under Registry in the create dialog: the projects it offers are the ones your Harbor holds.
A robot of the same name that already exists on your registry is left alone, and the create is refused: pick another name or delete it in Harbor first. If the registry entry is deleted, or now points at another host, rotating the robot is refused and revoking it removes Ankra’s copy of the login only; delete the robot in Harbor yourself if it still exists. A registry that refuses the admin credential is reported as such, so check the credential’s rights on the project.

Seeing every robot, including Ankra’s

ankra registry robots list and the Registry robots page list every login your project honours, not only the ones you created: yours first, then the ones Ankra manages. --kind narrows the listing to one kind, or to managed, which is shorthand for everything Ankra minted: the organisation and application robots together.
Managed robots are read-only here. Ankra hands each one’s secret to the builds and clusters that use it, so rotating or revoking one from this lane would strand them; rotate and delete refuse a managed robot and say so. An application robot minted on a registry you run yourself shows that registry’s host and project.

Pull secrets in your clusters

The generated manifests reference the pull secret through imagePullSecrets, and Ankra keeps that Secret in place for you - per cluster and per namespace, without you registering anything.
  • On every deploy, the target namespace is added to that cluster’s registry pull-secret resource for the Secret the declaration names (harbor-registry above, ankra-registry-pull by default), and the resource is re-applied so the Secret exists in the new namespace.
  • A cluster carries one resource per Secret name, so an application pulling from your Harbor coexists with every other application pulling from Ankra’s own registry - registering a namespace on one never rewrites the other’s.
  • Rotation fans out: rotating the robot flips the deployed resources so the new login replaces the old one in each cluster.
  • Clusters imported before the registry existed get the resource created on the spot.
The Secret is built from the declaration’s read credential, at the declared host. A declaration with no read credential registers no namespace and creates no Secret, which surfaces in the cluster as ImagePullBackOff on a private project rather than as an error in Ankra.

Verifying the whole path

ankra application publish-readiness <application-id> answers the four questions that matter, and distinguishes “nothing published” from “cannot see”, so an unreadable registry never reads as an empty one.

Troubleshooting


Using your own registry

The declaration’s every field, and how components inherit it.

Robot accounts

The per-application robot on Ankra’s own registry.

Registry credentials

Storing the credentials this guide names.

CI/CD pipeline

The build workflow that logs in with the robot.