nexus-operator
by sergk
A Helm chart for KubeRocketCI Nexus Operator
About this chart
nexus-operator
A Helm chart for KubeRocketCI Nexus Operator
Homepage: https://docs.kuberocketci.io/
Overview
Nexus Operator is a KubeRocketCI operator that is responsible for configuring Nexus.
NOTE: Operator is platform-independent, that is why there is a unified instruction for deploying.
Prerequisites
- Linux machine or Windows Subsystem for Linux instance with Helm 3 installed;
- Cluster admin access to the cluster;
Installation
In order to install the Nexus operator, follow the steps below:
-
To add the Helm EPAMEDP Charts for local client, run "helm repo add":
helm repo add epamedp https://epam.github.io/edp-helm-charts/stable -
Choose available Helm chart version:
helm search repo epamedp/nexus-operator -l NAME CHART VERSION APP VERSION DESCRIPTION epamedp/nexus-operator 3.5.0 3.5.0 A Helm chart for KRCI Nexus OperatorNOTE: It is highly recommended to use the latest released version.
-
Full chart parameters available in deploy-templates/README.md.
-
Install operator in the
nexus-operatornamespace with the helm command; find below the installation command example:helm install nexus-operator epamedp/nexus-operator --version <chart_version> --namespace nexus -
Check the
nexus-operatornamespace that should contain operator deployment with your operator in a running status.
Quick Start
-
Login into Nexus and create user. Attach permissions to user such as scripts, rules, blobs etc. Insert user credentials into Kubernetes secret.
apiVersion: v1 kind: Secret metadata: name: nexus-admin-password data: password: cGFzcw== # base64-encoded value of "pass" user: dXNlcg== # base64-encoded value of "user" -
Create Custom Resource
kind: Nexuswith Nexus instance URL and secret created on the previous step:apiVersion: edp.epam.com/v1alpha1 kind: Nexus metadata: name: nexus spec: secret: nexus-admin-password url: http://nexus.example.comWait for the
.statusfield withstatus.connected: true -
Create Role using Custom Resources NexusRole:
apiVersion: edp.epam.com/v1alpha1 kind: NexusRole metadata: name: edp-admin spec: description: Read and write access to all repos and scripts id: edp-admin name: edp-admin nexusRef: kind: Nexus name: nexus privileges: - nx-apikey-all - nx-repository-view-*-*-add - nx-repository-view-*-*-browse - nx-repository-view-*-*-edit - nx-repository-view-*-*-read - nx-script-*-add - nx-script-*-delete - nx-script-*-run - nx-search-readInspect CR templates folder for more examples
Local Development
In order to develop the operator, first set up a local environment. For details, please refer to the Local Development page.
Development versions are also available, please refer to the snapshot Helm Chart repository page.
Related Articles
Maintainers
| Name | Url | |
|---|---|---|
| epmd-edp | [email protected] | https://solutionshub.epam.com/solution/kuberocketci |
| sergk | https://github.com/SergK |
Source Code
Values
| Key | Type | Default | Description |
|---|---|---|---|
| affinity | object | {} | |
| annotations | object | {} | |
| image.repository | string | "epamedp/nexus-operator" | KubeRocketCI nexus-operator Docker image name. The released image can be found on Dockerhub |
| image.tag | string | nil | KubeRocketCI nexus-operator Docker image tag. The released image can be found on Dockerhub |
| imagePullPolicy | string | "IfNotPresent" | |
| imagePullSecrets | list | [] | Optional array of imagePullSecrets containing private registry credentials # Ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry |
| name | string | "nexus-operator" | component name |
| nodeSelector | object | {} | |
| podSecurityContext | object | {"runAsNonRoot":true} | Pod Security Context Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ |
| resources.limits.memory | string | "192Mi" | |
| resources.requests.cpu | string | "50m" | |
| resources.requests.memory | string | "64Mi" | |
| securityContext | object | {"allowPrivilegeEscalation":false} | Container Security Context Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ |
| tolerations | list | [] |
Deploy nexus-operator with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has nexus-operator 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 chartnexus-operator is pinned at v3.7.0 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