Commit ae520bc6 authored by guillecxb's avatar guillecxb
Browse files

update helm

parent 0ef0cd92
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@ NEXT_PUBLIC_JWT_EXPIRATION=5m
NEXT_PUBLIC_JWT_SECRET=dd5f3089-40c3-403d-af14-d0c228b05cb4
NEXT_PUBLIC_JWT_REFRESH_TOKEN_SECRET=7c4c1c50-3230-45bf-9eae-c9b2e401c767
# NEXT_PUBLIC_API_BASE_URL="https://backoffice-api.mobilesandbox.cloud:38443"
NEXT_PUBLIC_API_BASE_URL="http://localhost:8085/api"
# NEXT_PUBLIC_API_BASE_URL="http://localhost:8085/api"
NEXT_PUBLIC_API_BASE_URL="https//backoffice-api.mobilesandbox.cloud:38443"
NEXT_PUBLIC_GRAFANA_BASE_URL="https://grafana.5gnacar.int"
NODE_ENV=development
+23 −0
Original line number Diff line number Diff line
# 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/
+24 −0
Original line number Diff line number Diff line
apiVersion: v2
name: backoffice
description: A 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: 0.1.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: "1.16.0"
+126 −0
Original line number Diff line number Diff line
# Helm of Backoffice
      
![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=for-the-badge)
![Type: application](https://img.shields.io/badge/Type-application-informational?style=for-the-badge) 
![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=for-the-badge) 
      
## Deploy

```
$ helm upgrade --install -n mon backoffice helm/backoffice/ --create-namespace
```

## Description
      
A Helm chart for Kubernetes
      
## Usage
      
## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| backend.affinity | object | `{}` |  |
| backend.autoscaling.enabled | bool | `false` |  |
| backend.autoscaling.maxReplicas | int | `100` |  |
| backend.autoscaling.minReplicas | int | `1` |  |
| backend.autoscaling.targetCPUUtilizationPercentage | int | `80` |  |
| backend.enable | bool | `true` |  |
| backend.env.capifHostname | string | `"nginx.mon.svc.cluster.local"` |  |
| backend.env.mongoHostname | string | `"mongo.mon.svc.cluster.local"` |  |
| backend.env.mongoPort | string | `"27017"` |  |
| backend.env.mongoRegister | string | `"mongo-register.mon.svc.cluster.local"` |  |
| backend.env.mongoRegisterPort | string | `"27017"` |  |
| backend.env.registerHostname | string | `"register.mon.svc.cluster.local"` |  |
| backend.env.registerPassword | string | `"example"` |  |
| backend.env.registerPort | string | `"8080"` |  |
| backend.env.vaultHostname | string | `"vault.mon.svc.cluster.local"` |  |
| backend.env.vaultPort | int | `8200` |  |
| backend.fullnameOverride | string | `""` |  |
| backend.image.pullPolicy | string | `"Always"` |  |
| backend.image.repository | string | `"public.ecr.aws/o2v4a8t6/opencapif/backoffice-backend"` |  |
| backend.image.tag | string | `"v3.1.24"` |  |
| backend.imagePullSecrets | list | `[]` |  |
| backend.ingress.annotations."nginx.ingress.kubernetes.io/cors-allow-credentials" | string | `"true"` |  |
| backend.ingress.annotations."nginx.ingress.kubernetes.io/cors-allow-headers" | string | `"access-control-allow-origin,DNT,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization, X-Forwarded-For, X-app123-XPTO"` |  |
| backend.ingress.annotations."nginx.ingress.kubernetes.io/cors-allow-methods" | string | `"PATCH, PUT, GET, POST, OPTIONS, DELETE"` |  |
| backend.ingress.annotations."nginx.ingress.kubernetes.io/cors-allow-origin" | string | `"*"` |  |
| backend.ingress.annotations."nginx.ingress.kubernetes.io/cors-expose-headers" | string | `"*"` |  |
| backend.ingress.annotations."nginx.ingress.kubernetes.io/cors-max-age" | string | `"1728000"` |  |
| backend.ingress.annotations."nginx.ingress.kubernetes.io/enable-cors" | string | `"true"` |  |
| backend.ingress.className | string | `"nginx"` |  |
| backend.ingress.enabled | bool | `true` |  |
| backend.ingress.hosts[0].host | string | `"backoffice-api.mobilesandbox.cloud"` |  |
| backend.ingress.hosts[0].paths[0].path | string | `"/"` |  |
| backend.ingress.hosts[0].paths[0].pathType | string | `"Prefix"` |  |
| backend.ingress.tls[0].hosts[0] | string | `"backoffice-api.mobilesandbox.cloud"` |  |
| backend.ingress.tls[0].secretName | string | `"letsencrypt-secret"` |  |
| backend.nameOverride | string | `""` |  |
| backend.nodeSelector | object | `{}` |  |
| backend.podAnnotations | object | `{}` |  |
| backend.podLabels | object | `{}` |  |
| backend.podSecurityContext | object | `{}` |  |
| backend.replicaCount | int | `1` |  |
| backend.resources | string | `nil` |  |
| backend.securityContext | object | `{}` |  |
| backend.service.port | int | `8080` |  |
| backend.service.targetPort | int | `8080` |  |
| backend.service.type | string | `"ClusterIP"` |  |
| backend.serviceAccount.annotations | object | `{}` |  |
| backend.serviceAccount.automount | bool | `false` |  |
| backend.serviceAccount.create | bool | `false` |  |
| backend.serviceAccount.name | string | `""` |  |
| backend.tolerations | list | `[]` |  |
| backend.volumeMounts | list | `[]` |  |
| backend.volumes | list | `[]` |  |
| frontend.affinity | object | `{}` |  |
| frontend.autoscaling.enabled | bool | `false` |  |
| frontend.autoscaling.maxReplicas | int | `100` |  |
| frontend.autoscaling.minReplicas | int | `1` |  |
| frontend.autoscaling.targetCPUUtilizationPercentage | int | `80` |  |
| frontend.enable | bool | `true` |  |
| frontend.env.nextPublicApiBaseUrl | string | `"https://backoffice-api.mobilesandbox.cloud"` |  |
| frontend.env.nextPublicGrafanaBaseUrl | string | `"http://grafana.5gnacar.int"` |  |
| frontend.fullnameOverride | string | `""` |  |
| frontend.image.pullPolicy | string | `"Always"` |  |
| frontend.image.repository | string | `"public.ecr.aws/o2v4a8t6/opencapif/backoffice-frontend"` |  |
| frontend.image.tag | string | `"v3.1.20"` |  |
| frontend.imagePullSecrets | list | `[]` |  |
| frontend.ingress.annotations."nginx.ingress.kubernetes.io/cors-allow-credentials" | string | `"true"` |  |
| frontend.ingress.annotations."nginx.ingress.kubernetes.io/cors-allow-headers" | string | `"access-control-allow-origin,DNT,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization, X-Forwarded-For, X-app123-XPTO"` |  |
| frontend.ingress.annotations."nginx.ingress.kubernetes.io/cors-allow-methods" | string | `"PATCH, PUT, GET, POST, OPTIONS, DELETE"` |  |
| frontend.ingress.annotations."nginx.ingress.kubernetes.io/cors-allow-origin" | string | `"*"` |  |
| frontend.ingress.annotations."nginx.ingress.kubernetes.io/cors-expose-headers" | string | `"*"` |  |
| frontend.ingress.annotations."nginx.ingress.kubernetes.io/cors-max-age" | string | `"1728000"` |  |
| frontend.ingress.annotations."nginx.ingress.kubernetes.io/enable-cors" | string | `"true"` |  |
| frontend.ingress.className | string | `"nginx"` |  |
| frontend.ingress.enabled | bool | `true` |  |
| frontend.ingress.hosts[0].host | string | `"backoffice.mobilesandbox.cloud"` |  |
| frontend.ingress.hosts[0].paths[0].path | string | `"/"` |  |
| frontend.ingress.hosts[0].paths[0].pathType | string | `"Prefix"` |  |
| frontend.ingress.tls[0].hosts[0] | string | `"backoffice.mobilesandbox.cloud"` |  |
| frontend.ingress.tls[0].secretName | string | `"letsencrypt-secret"` |  |
| frontend.nameOverride | string | `""` |  |
| frontend.nodeSelector | object | `{}` |  |
| frontend.podAnnotations | object | `{}` |  |
| frontend.podLabels | object | `{}` |  |
| frontend.podSecurityContext | object | `{}` |  |
| frontend.replicaCount | int | `1` |  |
| frontend.resources | string | `nil` |  |
| frontend.securityContext | object | `{}` |  |
| frontend.service.port | int | `3000` |  |
| frontend.service.targetPort | int | `3000` |  |
| frontend.service.type | string | `"ClusterIP"` |  |
| frontend.serviceAccount.annotations | object | `{}` |  |
| frontend.serviceAccount.automount | bool | `false` |  |
| frontend.serviceAccount.create | bool | `false` |  |
| frontend.serviceAccount.name | string | `""` |  |
| frontend.tolerations | list | `[]` |  |
| frontend.volumeMounts | list | `[]` |  |
| frontend.volumes | list | `[]` |  |
      

      

      
+22 −0
Original line number Diff line number Diff line
1. Get the application URL by running these commands:
{{- 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.frontend.service.type }}
  export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services frontend-{{ include "backoffice.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.frontend.service.type }}
     NOTE: It may take a few minutes for the LoadBalancer IP to be available.
           You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w frontend-{{ include "backoffice.fullname" . }}'
  export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} frontend-{{ include "backoffice.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
  echo http://$SERVICE_IP:{{ .Values.frontend.service.port }}
{{- else if contains "ClusterIP" .Values.frontend.service.type }}
  export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "backoffice.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 3000:$CONTAINER_PORT
{{- end }}
Loading