harbor

by [riftbit]

Helm chartv11.0.2App 2.3.2Verified publisher

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

NameDescriptionValue
global.imageRegistryGlobal Docker image registry""
global.imagePullSecretsGlobal Docker registry secret names as an array[]
global.storageClassGlobal storage class for dynamic provisioning""

Common Parameters

NameDescriptionValue
nameOverrideString to partially override common.names.fullname template (will maintain the release name)""
fullnameOverrideString to fully override common.names.fullname template with a string""
kubeVersionForce target Kubernetes version (using Helm capabilities if not set)""
commonAnnotationsAnnotations to add to all deployed objects{}
commonLabelsLabels to add to all deployed objects{}
extraDeployArray of extra objects to deploy with the release (evaluated as a template).[]

Harbor parameters

NameDescriptionValue
volumePermissions.enabledEnable 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.registryInit container volume-permissions image registrydocker.io
volumePermissions.image.repositoryInit container volume-permissions image namebitnami/bitnami-shell
volumePermissions.image.tagInit container volume-permissions image tag10-debian-10-r202
volumePermissions.image.pullPolicyInit container volume-permissions image pull policyAlways
volumePermissions.image.pullSecretsSpecify docker-registry secret names as an array[]
volumePermissions.resources.limitsThe resources limits for the container{}
volumePermissions.resources.requestsThe requested resources for the container{}
internalTLS.enabledUse TLS in all the supported containers: chartmuseum, clair, core, jobservice, portal, registry and trivyfalse
ipFamily.ipv6.enabledEnable listening on IPv6 ([::]) for nginx-based components (nginx,portal)true
ipFamily.ipv4.enabledEnable listening on IPv4 for nginx-based components (nginx,portal)true
caBundleSecretNameThe 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.""
externalURLThe external URL for Harbor core servicehttps://core.harbor.domain
containerSecurityContext.runAsUserSet container's Security Context runAsUser1001
containerSecurityContext.runAsNonRootSet container's Security Context runAsNonRoottrue
podSecurityContext.fsGroupSet pod's Security Context fsGroup1001
logLevelThe log level used for Harbor services. Allowed values are [ fatalerror
forcePasswordOption to force users to specify passwords (core.secret, harborAdminPassword, and secretKey). That is required for 'helm upgrade' to work properly.false
harborAdminPasswordThe initial password of Harbor admin. Change it from portal after launching Harbor""
proxy.httpProxyThe URL of the HTTP proxy server""
proxy.httpsProxyThe URL of the HTTPS proxy server""
proxy.noProxyThe URLs that the proxy settings not apply to127.0.0.1,localhost,.local,.internal
proxy.componentsThe component list that the proxy settings apply to["core","jobservice","clair","trivy"]

Traffic Exposure Parameters

NameDescriptionValue
service.typeThe way how to expose the service: Ingress, ClusterIP, NodePort or LoadBalancerLoadBalancer
service.tls.enabledEnable the tls or not (for external access)true
service.tls.existingSecretExisting 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.notaryExistingSecretBy 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.commonNameThe common name used to generate the certificate, it's necessary when the service.type is ClusterIP or NodePort and service.tls.existingSecret is nullcore.harbor.domain
service.ports.httpThe service port Harbor listens on when serving with HTTP80
service.ports.httpsThe service port Harbor listens on when serving with HTTPS443
service.ports.notaryThe service port Notary listens on. Only needed when notary.enabled is set to true4443
service.nodePortsService parameters when type is "nodePort"{}
service.loadBalancerIPLoad 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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartharbor is pinned at v11.0.2 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. 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