git clone https://github.com/goharbor/harbor-operator.git
cd harbor-operator
You developed a new cool feature? Fixed an annoying bug? We would be happy to hear from you!
Have a look in CONTRIBUTING.md
Install dev tools with:
make dev-tools
-
Kubernetes cluster. You can order a Kubernetes cluster on ovh.com. Then configure your environment to have the right
Kubeconfig
. -
Jaeger server.
docker-compose up -d
make install-dependencies # This will install Helm charts in your current cluster
make install # Install Custom Resource Definition
Generate resources using make generate
export CONFIGURATION_FROM="file:$(pwd)/config-dev.yml"
make run
export LBAAS_DOMAIN=$(kubectl get svc nginx-nginx-ingress-controller -o jsonpath={.status.loadBalancer.ingress[0].hostname})
export CORE_DATABASE_SECRET=$(kubectl get secret core-database-postgresql -o jsonpath={.data.postgresql-password} | base64 --decode)
export CLAIR_DATABASE_SECRET=$(kubectl get secret clair-database-postgresql -o jsonpath={.data.postgresql-password} | base64 --decode)
export NOTARY_SERVER_DATABASE_SECRET=$(kubectl get secret notary-server-database-postgresql -o jsonpath={.data.postgresql-password} | base64 --decode)
export NOTARY_SIGNER_DATABASE_SECRET=$(kubectl get secret notary-signer-database-postgresql -o jsonpath={.data.postgresql-password} | base64 --decode)
kubectl kustomize config/samples | gomplate | kubectl apply -f -
cat <<EOF
Admin password: $(kubectl get secret admin-password-secret -o jsonpath={.data.password} | base64 --decode)
EOF
make lint
Warning: Some resource may not be deleted if a test fails
-
Export
KUBECONFIG
variable:export KUBECONFIG=/path/to/kubeconfig export USE_EXISTING_CLUSTER=true
-
make test