nexus3

by Helm

Helm chartv0.2.0App 0.2.0

Sonatype Nexus Repository Manager 3

About this chart

Helm Chart for nexus3

Introduction

This nexus3 chart installs sonatype/nexus3 in a Kubernetes cluster.

Prerequisites

  • Kubernetes cluster 1.10+
  • Helm 2.8.0+

Installation

Add chart repository

Add chart repository and cache index.

helm repo add c7n https://openchart.choerodon.com.cn/choerodon/c7n/
helm repo update

Configure the chart

The following items can be configured in values.yaml or set via --set flag during installation.

Configure the way how to expose nexus3 service:

  • Ingress: The ingress controller must be installed in the Kubernetes cluster.
  • ClusterIP: Exposes the service on a cluster-internal IP. Choosing this value makes the service only reachable from within the cluster.
  • NodePort: Exposes the service on each Node’s IP at a static port (the NodePort). You’ll be able to contact the NodePort service, from outside the cluster, by requesting NodeIP:NodePort.
  • LoadBalancer: Exposes the service externally using a cloud provider’s load balancer.

Configure the way how to persistent data:

  • Disable: The data does not survive the termination of a pod.
  • Persistent Volume Claim(default): A default StorageClass is needed in the Kubernetes cluster to dynamic provision the volumes. Specify another StorageClass in the storageClass or set existingClaim if you have already existing persistent volumes to use.

Configure the other items listed in configuration section.

Install the chart

Install the nexus3 helm chart with a release name my-nexus3:

# helm v2
helm install c7n/nexus3 \
  --name my-nexus3 \
  --set expose.ingress.host=nexus3.cluster.local

# helm v3
helm install my-nexus3 c7nw/nexus3 \
  --set expose.ingress.host=nexus3.cluster.local

Uninstallation

To uninstall/delete the my-nexus3 deployment:

# helm v2
helm delete --purge my-nexus3

# helm v3
helm uninstall my-nexus3

Configuration

The following table lists the configurable parameters of the nexus3 chart and the default values.

ParameterDescriptionDefault
nexus3
replicaCountNumber of desired pods. This is a pointer to distinguish between explicit zero and not specified.1
strategyThe deployment strategy to use to replace existing pods with new ones.RollingUpdate-maxUnavailable: 0
image.repositoryRepository for nexus3 imagedockerhub.azk8s.cn/sonatype/nexus3
image.tagTag for nexus3 image3.18.1
image.pullPolicyThe image pull policyIfNotPresent
annotationsAnnotations to add to the nexus3 deployment{}
podAnnotationsAnnotations to add to the nexus3 pod{}
resourcesThe [resources] to allocate for containerundefined
nodeSelectorNode labels for pod assignment{}
tolerationsTolerations for pod assignment[]
affinityNode/Pod affinities{}
envThe [available options] that can be used to customize your nexus3 installation.{}
Expose
expose.typeThe way how to expose the service: ingress、clusterIP、loadBalancer or nodePortingress
expose.tls.enabledEnable the tls or notfalse
expose.tls.secretNameFill the name of secret if you want to use your own TLS certificate. The secret must contain keys named:tls.crt - the certificate, tls.key - the private key, ca.crt - the certificate of CA.These files will be generated automatically if the secretName is not set
expose.tls.certExpiryAutomatically generated self-signed certificate validity period(day)3650
expose.ingress.hostThe host of nexus3 service in ingress rulenexus3.cluster.local
expose.ingress.annotationsThe annotations used in ingress
expose.clusterIP.nameThe name of ClusterIP serviceRelease.Name
expose.clusterIP.portThe service port nexus3 listens on when serving with HTTP80
expose.nodePort.nameThe name of NodePort serviceRelease.Name
expose.nodePort.portThe service port nexus3 listens on when serving with HTTP80
expose.nodePort.nodePortThe node port nexus3 listens on when serving with HTTP
expose.loadBalancer.nameThe name of LoadBalancer serviceRelease.Name
expose.loadBalancer.portThe service port nexus3Î listens on when serving with HTTP80
Persistence
persistence.enabledEnable the data persistence or notfalse
persistence.resourcePolicySetting it to keep to avoid removing PVCs during a helm delete operation. Leaving it empty will delete PVCs after the chart deletedkeep
persistence.existingClaimUse the existing PVC which must be created manually before bound, and specify the subPath if the PVC is shared with other components
persistence.storageClassSpecify the storageClass used to provision the volume. Or the default StorageClass will be used(the default). Set it to - to disable dynamic provisioning
persistence.accessMode

Deploy nexus3 with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has nexus3 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 chartnexus3 is pinned at v0.2.0 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