...
Please setup a Kubernetes cluster (please see the following guide: Kubernetes Cluster API Setup ).
Once you have got your cluster up and running you can start deploying Harbor HA.
...
*Note this configuration reflects the current state of development.Please configure each section and put these all in a harbor-values.yaml
file.
Info |
---|
For a full list of configurable variables please see: https://github.com/goharbor/harbor-helm#configuration A full example Harbor values file can be seen here: https://github.com/goharbor/harbor-helm/blob/main/values.yaml |
Exposing Harbor HA service
We want to expose Harbor HA service through our own load balancer so we set the configuration as follows.
You will need to set the TLS as required, at the moment I have set this as disabled.
You also need to assign a floating IP address to loadBalancer.IP
to be able to access the service.
...
language | yaml |
---|
...
Our Harbor HA configuration
Please download and configure each section of the harbor-values.yaml
file from cloud-deployed-apps https://github.com/
...
Setting Harbor HA to use a external database
Please fill out the database connection info for the database you created earlier. And set ssl settings are required.
And set the jobservice.jobLoggers
to - database
Code Block | ||
---|---|---|
| ||
database:
type: external
external:
host: ""
port: "5432"
username: ""
password: ""
coreDatabase: "registry"
# if using existing secret, the key must be "password"
#existingSecret: ""
# "disable" - No SSL
# "require" - Always SSL (skip verification)
# "verify-ca" - Always SSL (verify that the certificate presented by the
# server was signed by a trusted CA)
# "verify-full" - Always SSL (verify that the certification presented by the
# server was signed by a trusted CA and the server host name matches the one
# in the certificate)
sslmode: "disable"
# The maximum number of connections in the idle connection pool per pod (core+exporter).
# If it <=0, no idle connections are retained.
maxIdleConns: 100
# The maximum number of open connections to the database per pod (core+exporter).
# If it <= 0, then there is no limit on the number of open connections.
# Note: the default number of connections is 1024 for postgre of harbor.
maxOpenConns: 900
## Additional deployment annotations
podAnnotations: {}
## Additional deployment labels
podLabels: {}
jobservice:
jobLoggers:
- database |
Disabling persistence and using Swift for image and chart storage
For development you can leave persistence.enabled as false.
But if setting up to use Swift please change persistence.type
from filesystem
to swift
...
stfc/cloud-deployed-apps/blob/main/prod-values/harbor-values.yaml
S3 configuration
You will need to create EC2 credentials on OpenStack in order to configure S3 in Harbor HA, please see the following guide: https://openmetal.io/docs/manuals/openstack-admin/access-swift-s3-api
Installing Harbor HA
Once you have saved all the above configuration into a harbor-values.yaml
file we can install Harbor HA onto the cluster.
...
You should now be able to run kubectl delete storageclass --all
and the deployment will be unaffected.
Harbor replication
“Due to API changes, replication between different versions of Harbor API is not supported.”
Creating replication endpoints are quite straight forward, you will need to configure an account or credentials, then configure an endpoint and replication rules. Which you can define to do either push or pull based replication with various filters, either auto or manual. See:
https://goharbor.io/docs/2.1.0/administration/configuring-replication/create-replication-endpoints/
https://goharbor.io/docs/2.1.0/administration/configuring-replication/create-replication-rules/
https://goharbor.io/docs/2.1.0/administration/configuring-replication/manage-replications/
Note |
---|
This does NOT replicate user account, rules, config etc. We may need to do backups and migration separately, some of these guides could be useful. https://goharbor.io/docs/2.9.0/administration/upgrade/helm-upgrade/ |
References
https://goharbor.io/docs/2.9.0/install-config/harbor-ha-helm/