Skip to content

Registry

Harbor is used as the K8SaaS registry. Harbor now supports Helm charts in addition to Docker images, making you able to save both of them at the same place.

Harbor is organized by Project. This kind of category will let you separate content on your Registry. Create Projects as following:

apiVersion: project.harbor.crossplane.io/v1alpha1
kind: Project
metadata:
name: sampleapp-project
spec:
forProvider:
name: sampleapp-project
providerConfigRef:
name: harbor-provider-config

Creating a RobotAccount will help to perform maintenance or repeated task across all or a subset of projects in your Harbor instance. Before creating a RobotAccount, make sure to create its related secret :

apiVersion: v1
kind: Secret
metadata:
name: sampleapp-secret
namespace: sampleapp
stringData:
password: secret
apiVersion: robotaccount.harbor.crossplane.io/v1alpha1
kind: RobotAccount
metadata:
name: sampleapp-robot
spec:
forProvider:
description: Robot account for sampleapp-project to manage repository access
level: project
name: sampleapp-robot
permissions:
- access:
- action: push
resource: repository
- action: pull
resource: repository
kind: project
namespace: sampleapp-project
# Secret must be created before this RobotAccount is applied
secretSecretRef:
key: password
name: sampleapp-secret
namespace: sampleapp
providerConfigRef:
name: harbor-provider-config