harbor
by [riftbit]
Harbor is an an open source trusted cloud native registry project that stores, signs, and scans content
About this chart
Harbor
This Helm chart has been developed based on goharbor/harbor-helm chart but including some features common to the Bitnami chart library. For example, the following changes have been introduced:
- Possibility to pull all the required images from a private registry through the Global Docker image parameters.
- Redis™ and PostgreSQL are managed as chart dependencies.
- Liveness and Readiness probes for all deployments are exposed to the values.yaml.
- Uses new Helm chart labels formatting.
- Uses Bitnami container images:
- non-root by default
- published for debian-10 and ol-7
- This chart support the Harbor optional components Chartmuseum, Clair and Notary integrations.
TL;DR
$ helm repo add bitnami https://charts.bitnami.com/bitnami
$ helm install my-release bitnami/harbor
Introduction
This Helm chart installs Harbor in a Kubernetes cluster. Welcome to contribute to Helm Chart for Harbor.
Prerequisites
- Kubernetes 1.12+
- Helm 3.1.0
- PV provisioner support in the underlying infrastructure
- ReadWriteMany volumes for deployment scaling
Installing the Chart
Install the Harbor helm chart with a release name my-release:
$ helm repo add bitnami https://charts.bitnami.com/bitnami
$ helm install my-release bitnami/harbor
Uninstalling the Chart
To uninstall/delete the my-release deployment:
$ helm delete --purge my-release
Additionally, if persistence.resourcePolicy is set to keep, you should manually delete the PVCs.
Parameters
Global parameters
| Name | Description | Value |
|---|---|---|
global.imageRegistry | Global Docker image registry | "" |
global.imagePullSecrets | Global Docker registry secret names as an array | [] |
global.storageClass | Global storage class for dynamic provisioning | "" |
Common Parameters
| Name | Description | Value |
|---|---|---|
nameOverride | String to partially override common.names.fullname template (will maintain the release name) | "" |
fullnameOverride | String to fully override common.names.fullname template with a string | "" |
kubeVersion | Force target Kubernetes version (using Helm capabilities if not set) | "" |
commonAnnotations | Annotations to add to all deployed objects | {} |
commonLabels | Labels to add to all deployed objects | {} |
extraDeploy | Array of extra objects to deploy with the release (evaluated as a template). | [] |
Harbor parameters
| Name | Description | Value |
|---|---|---|
volumePermissions.enabled | Enable init container that changes volume permissions in the data directory (for cases where the default k8s runAsUser and fsUser values do not work) | false |
volumePermissions.image.registry | Init container volume-permissions image registry | docker.io |
volumePermissions.image.repository | Init container volume-permissions image name | bitnami/bitnami-shell |
volumePermissions.image.tag | Init container volume-permissions image tag | 10-debian-10-r202 |
volumePermissions.image.pullPolicy | Init container volume-permissions image pull policy | Always |
volumePermissions.image.pullSecrets | Specify docker-registry secret names as an array | [] |
volumePermissions.resources.limits | The resources limits for the container | {} |
volumePermissions.resources.requests | The requested resources for the container | {} |
internalTLS.enabled | Use TLS in all the supported containers: chartmuseum, clair, core, jobservice, portal, registry and trivy | false |
ipFamily.ipv6.enabled | Enable listening on IPv6 ([::]) for nginx-based components (nginx,portal) | true |
ipFamily.ipv4.enabled | Enable listening on IPv4 for nginx-based components (nginx,portal) | true |
caBundleSecretName | The custom ca bundle secret name, the secret must contain key named "ca.crt" which will be injected into the trust store for chartmuseum, clair, core, jobservice, registry, trivy components. | "" |
externalURL | The external URL for Harbor core service | https://core.harbor.domain |
containerSecurityContext.runAsUser | Set container's Security Context runAsUser | 1001 |
containerSecurityContext.runAsNonRoot | Set container's Security Context runAsNonRoot | true |
podSecurityContext.fsGroup | Set pod's Security Context fsGroup | 1001 |
logLevel | The log level used for Harbor services. Allowed values are [ fatal | error |
forcePassword | Option to force users to specify passwords (core.secret, harborAdminPassword, and secretKey). That is required for 'helm upgrade' to work properly. | false |
harborAdminPassword | The initial password of Harbor admin. Change it from portal after launching Harbor | "" |
proxy.httpProxy | The URL of the HTTP proxy server | "" |
proxy.httpsProxy | The URL of the HTTPS proxy server | "" |
proxy.noProxy | The URLs that the proxy settings not apply to | 127.0.0.1,localhost,.local,.internal |
proxy.components | The component list that the proxy settings apply to | ["core","jobservice","clair","trivy"] |
Traffic Exposure Parameters
| Name | Description | Value |
|---|---|---|
service.type | The way how to expose the service: Ingress, ClusterIP, NodePort or LoadBalancer | LoadBalancer |
service.tls.enabled | Enable the tls or not (for external access) | true |
service.tls.existingSecret | Existing secret name containing your own TLS certificates. The secret must contain the keys: tls.crt - the certificate (required), tls.key - the private key (required), ca.crt - the certificate of CA (optional). Self-signed TLS certificates will be used otherwise. | "" |
service.tls.notaryExistingSecret | By default, the Notary service will use the same cert and key as described above. Fill the name of secret if you want to use a separated one. Only needed when the service.type is ingress. | "" |
service.tls.commonName | The common name used to generate the certificate, it's necessary when the service.type is ClusterIP or NodePort and service.tls.existingSecret is null | core.harbor.domain |
service.ports.http | The service port Harbor listens on when serving with HTTP | 80 |
service.ports.https | The service port Harbor listens on when serving with HTTPS | 443 |
service.ports.notary | The service port Notary listens on. Only needed when notary.enabled is set to true | 4443 |
service.nodePorts | Service parameters when type is "nodePort" | {} |
service.loadBalancerIP | Load Balancer |
Deploy harbor with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has harbor on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartharbor is pinned at v11.0.2 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply