-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Include the Helm Chart and Kubernetes YAMLs - Includes the Helm chart required for the NeoDash deployment for the Kubernetes clusters - Includes the example YAML files for the Kubernetes manifests - Appropriate document changes to include the new Kubernetes deployments. Signed-off-by: Lolla, Venkata <venkata.lolla@fMR.COM> * Fix the chart notes Signed-off-by: Lolla, Venkata <venkata.lolla@fMR.COM> * Patch a typo in the build-and-run.adoc file Signed-off-by: Lolla, Venkata <venkata.lolla@fMR.COM> * Resolves SonarCloud warning Signed-off-by: Lolla, Venkata <venkata.lolla@fMR.COM> * Review + small fixes, LGTM --------- Signed-off-by: Lolla, Venkata <venkata.lolla@fMR.COM> Co-authored-by: Lolla, Venkata <venkata.lolla@fMR.COM>
- Loading branch information
1 parent
416b8f8
commit d822773
Showing
15 changed files
with
741 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
apiVersion: v2 | ||
name: neodash | ||
description: A NeoDash Helm chart for Kubernetes | ||
|
||
# A chart can be either an 'application' or a 'library' chart. | ||
# | ||
# Application charts are a collection of templates that can be packaged into versioned archives | ||
# to be deployed. | ||
# | ||
# Library charts provide useful utilities or functions for the chart developer. They're included as | ||
# a dependency of application charts to inject those utilities and functions into the rendering | ||
# pipeline. Library charts do not define any templates and therefore cannot be deployed. | ||
type: application | ||
|
||
# This is the chart version. This version number should be incremented each time you make changes | ||
# to the chart and its templates, including the app version. | ||
# Versions are expected to follow Semantic Versioning (https://semver.org/) | ||
version: 1.0.0 | ||
|
||
# This is the version number of the application being deployed. This version number should be | ||
# incremented each time you make changes to the application. Versions are not expected to | ||
# follow Semantic Versioning. They should reflect the version the application is using. | ||
# It is recommended to use it with quotes. | ||
appVersion: "2.4.9" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# NeoDash | ||
|
||
![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square) | ||
|
||
A NeoDash Helm chart for Kubernetes | ||
|
||
## Resources | ||
|
||
Following are the Kubernetes resources utilized for the NeoDash. | ||
|
||
- Deployment | ||
- Service | ||
- Ingress | ||
- Service Account | ||
- Horizontal Pod Autoscalar (HPA) | ||
|
||
## Values Configuration | ||
|
||
| Key | Type | Default | Description | | ||
|-----|------|---------|-------------| | ||
| autoscaling.enabled | bool | `false` | Enable/disable Autoscaling | | ||
| enable_reader_mode | bool | `true` | Enable/disable Reader mode | | ||
| envFromSecrets | list | `[]` | Environment variables from secrets | | ||
| fullnameOverride | string | `"neodash-test"` | Name override applies to all resources | | ||
| image.pullPolicy | string | `"IfNotPresent"` | Image pull policy | | ||
| image.repository | string | `"neo4jlabs/neodash"` | Image repository and Image name | | ||
| image.tag | string | `"latest"` | Image version | | ||
| imagePullSecrets | list | `[]` | Image pull secrets if any | | ||
| podAnnotations | object | `{}` | Pod annotations | | ||
| podLabels | object | `{}` | Additional labels | | ||
| podSecurityContext | object | `{}` | Security Context if any | | ||
| ingress.annotations | object | `{}` | Ingress Annotations for load balancers | | ||
| ingress.className | string | `"alb"` | Ingress Class | | ||
| ingress.enabled | bool | `false` | Enable/disable Ingress | | ||
| ingress.hosts | list | `[]` | Host Details | | ||
| ingress.tls | list | `[]` | TLS details | | ||
| livenessProbe.httpGet.path | string | `"/*"` | LivenessProbe path | | ||
| livenessProbe.httpGet.port | int | `5005` | LivenessProbe port | | ||
| readinessProbe.httpGet.path | string | `"/*"` | Readiness path | | ||
| readinessProbe.httpGet.port | int | `5005` | Readiness port | | ||
| replicaCount | int | `1` | Replica count | | ||
| resources.limits.cpu | string | `"500m"` | CPU limit | | ||
| resources.limits.memory | string | `"128Mi"` | Memory limit | | ||
| resources.requests.cpu | string | `"250m"` | CPU request | | ||
| resources.requests.memory | string | `"64Mi"` | Memory request | | ||
| service.annotations | object | `{}` | Service annotations | | ||
| service.port | int | `5005` | Service port | | ||
| service.targetPort | int | `5005` | Service target port | | ||
| service.type | string | `"LoadBalancer"` | Type of service, other options are `ClusterIP` or `NodePort` | | ||
| serviceAccount.automount | bool | `true` | Enable/disable service account auto mount to pod | | ||
| serviceAccount.create | bool | `true` | Enable/disable service account | | ||
| volumeMounts | list | `[]` | Volume mounts on pod | | ||
| volumes | list | `[]` | Volumes for pod | | ||
| env | list |<br><pre lang="YAML">- name: "ssoEnabled" value: "false" - name: "standalone" value: "true" - name: "standaloneProtocol" value: "neo4j+s" - name: "standaloneHost" value: "localhost" - name: "standalonePort" value: "7687" - name: "standaloneDatabase" value: "neo4j" - name: "standaloneDashboardName" value: "test" - name: "standaloneDashboardDatabase" value: "neo4j" - name: "standaloneAllowLoad" value: "false" - name: "standaloneLoadFromOtherDatabases" value: "false" - name: "standaloneMultiDatabase" value: "false" </pre> | Env variables for reader mode | | ||
|
||
## Usage | ||
|
||
- To install this helm chart run the following command, | ||
|
||
```bash | ||
helm install <release-name> ./neodash -n <namespace-name> | ||
``` | ||
|
||
- To upgrade the release run the following command, | ||
|
||
```bash | ||
helm upgrade <release-name> ./neodash -n <namespace-name> | ||
``` | ||
|
||
- To uninstall the release run the following command, | ||
|
||
```bash | ||
helm uninstall <release-name> -n <namespace-name> | ||
``` | ||
|
||
> **Note:** To use custom values files, pass `-f <path-to-values-file>.yaml` for the above command. | ||
> **Note:** To use custom values, pass `--set param=value` for the above command. | ||
For example, to install neodash and set the service type to NodePort, run: `helm install <release-name> ./neodash -n <namespace-name> --set service.type=NodePort` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
The NeoDash application has been successfully deployed, here is the application URL: | ||
{{- if .Values.ingress.enabled }} | ||
{{- range $host := .Values.ingress.hosts }} | ||
{{- range .paths }} | ||
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }} | ||
{{- end }} | ||
{{- end }} | ||
{{- else if contains "NodePort" .Values.service.type }} | ||
Run the following command to retrieve the IP address: | ||
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "neodash.fullname" . }}) | ||
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") | ||
echo http://$NODE_IP:$NODE_PORT | ||
{{- else if contains "LoadBalancer" .Values.service.type }} | ||
NOTE: It may take a few minutes for the LoadBalancer IP to be available. | ||
You can watch the status of the LoadBalancer by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "neodash.fullname" . }}' | ||
|
||
Once available, run the following command to retrieve the IP address: | ||
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "neodash.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") | ||
echo http://$SERVICE_IP:{{ .Values.service.port }} | ||
{{- else if contains "ClusterIP" .Values.service.type }} | ||
Run the following command to retrieve the IP address: | ||
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "neodash.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") | ||
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") | ||
echo "Visit http://127.0.0.1:8080 to use your application" | ||
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "neodash.name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create a default fully qualified app name. | ||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). | ||
If release name contains chart name it will be used as a full name. | ||
*/}} | ||
{{- define "neodash.fullname" -}} | ||
{{- if .Values.fullnameOverride }} | ||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- $name := default .Chart.Name .Values.nameOverride }} | ||
{{- if contains $name .Release.Name }} | ||
{{- .Release.Name | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create chart name and version as used by the chart label. | ||
*/}} | ||
{{- define "neodash.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Common labels | ||
*/}} | ||
{{- define "neodash.labels" -}} | ||
helm.sh/chart: {{ include "neodash.chart" . }} | ||
{{ include "neodash.selectorLabels" . }} | ||
{{- if .Chart.AppVersion }} | ||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
{{- end }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- end }} | ||
|
||
{{/* | ||
Selector labels | ||
*/}} | ||
{{- define "neodash.selectorLabels" -}} | ||
app.kubernetes.io/name: {{ include "neodash.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create the name of the service account to use | ||
*/}} | ||
{{- define "neodash.serviceAccountName" -}} | ||
{{- if .Values.serviceAccount.create }} | ||
{{- default (include "neodash.fullname" .) .Values.serviceAccount.name }} | ||
{{- else }} | ||
{{- default "default" .Values.serviceAccount.name }} | ||
{{- end }} | ||
{{- end }} |
Oops, something went wrong.