harbor

by Helm

Helm chartv16.4.10App 2.7.1

Harbor is an open source trusted cloud-native registry to store, sign, and scan content. It adds functionalities like security, identity, and management to the open source Docker distribution.

About this chart

Harbor packaged by Bitnami

Harbor is an open source trusted cloud-native registry to store, sign, and scan content. It adds functionalities like security, identity, and management to the open source Docker distribution.

Overview of Harbor

TL;DR

helm repo add my-repo https://charts.bitnami.com/bitnami
helm install my-release my-repo/harbor

Introduction

This Helm chart installs Harbor in a Kubernetes cluster. Welcome to contribute to Helm Chart for 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 and Notary integrations.

Bitnami charts can be used with Kubeapps for deployment and management of Helm Charts in clusters.

Prerequisites

  • Kubernetes 1.19+
  • Helm 3.2.0+
  • PV provisioner support in the underlying infrastructure
  • ReadWriteMany volumes for deployment scaling

Installing the Chart

To install the chart with the release name my-release:

helm repo add my-repo https://charts.bitnami.com/bitnami
helm install my-release my-repo/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 StorageClass for Persistent Volume(s)""

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)""
clusterDomainKubernetes Cluster Domaincluster.local
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).[]
diagnosticMode.enabledEnable diagnostic mode (all probes will be disabled and the command will be overridden)false
diagnosticMode.commandCommand to override all containers in the the deployment(s)/statefulset(s)["sleep"]
diagnosticMode.argsArgs to override all containers in the the deployment(s)/statefulset(s)["infinity"]

Harbor common parameters

NameDescriptionValue
adminPasswordThe initial password of Harbor admin. Change it from portal after launching Harbor""
externalURLThe external URL for Harbor Core servicehttps://core.harbor.domain
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","trivy"]
logLevelThe log level used for Harbor services. Allowed values are [ fatal | error | warn | info | debug | trace ]debug
internalTLS.enabledUse TLS in all the supported containers: chartmuseum, core, jobservice, portal, registry and trivyfalse
internalTLS.caBundleSecretName of an existing secret with a custom CA that will be injected into the trust store for chartmuseum, core, jobservice, registry, trivy components""
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

Traffic Exposure Parameters

NameDescriptionValue
exposureTypeThe way to expose Harbor. Allowed values are [ ingress | proxy ]proxy
service.typeNGINX proxy service typeLoadBalancer
service.ports.httpNGINX proxy service HTTP port80
service.ports.httpsNGINX proxy service HTTPS port443
service.ports.notaryNotary service port4443
service.nodePorts.httpNode port for HTTP""
service.nodePorts.httpsNode port for HTTPS""
service.nodePorts.notaryNode port for Notary""
service.sessionAffinityControl where client requests go, to the same pod or round-robinNone
service.sessionAffinityConfigAdditional settings for the sessionAffinity{}
service.clusterIPNGINX proxy service Cluster IP""
service.loadBalancerIPNGINX proxy service Load Balancer IP""
service.loadBalancerSourceRangesNGINX proxy service Load Balancer sources[]
service.externalTrafficPolicyNGINX proxy service external traffic policyCluster
service.annotationsAdditional custom annotations for NGINX proxy service{}
service.extraPortsExtra port to expose on NGINX proxy service[]
ingress.core.ingressClassNameIngressClass that will be be used to implement the Ingress (Kubernetes 1.18+)""
ingress.core.pathTypeIngress path typeImplementationSpecific
ingress.core.apiVersionForce Ingress API version (automatically detected if not set)""
ingress.core.controllerThe ingress controller type. Currently supports default, gce and ncpdefault
ingress.core.hostnameDefault host for the ingress recordcore.harbor.domain
ingress.core.annotationsAdditional annotations for the Ingress resource. To enable certificate autogeneration, place here your cert-manager annotations.{}
ingress.core.tlsEnable TLS configuration for the host defined at ingress.core.hostname parameterfalse
ingress.core.selfSignedCreate a TLS secret for this ingress record using self-signed certificates generated by Helmfalse
ingress.core.extraHostsAn array with additional hostname(s) to be covered with the ingress record[]
ingress.core.extraPathsAn array with additional arbitrary paths that may need to be added to the ingress under the main host[]
ingress.core.extraTlsTLS configuration for additional hostname(s) to be covered with this ingress record[]
ingress.core.secretsCustom TLS certificates as secrets[]
ingress.core.extraRulesAdditional rules to be covered with this ingress record[]
ingress.notary.ingressClassNameIngressClass that will be be used to implement the Ingress (Kubernetes 1.18+)""
ingress.notary.pathTypeIngress path typeImplementationSpecific
ingress.notary.apiVersionForce Ingress API version (automatically detected if not set)""

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 v16.4.10 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