Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
4a8bd5d
fix(issue-526): add authorize to pfr mvc app
live-dev999 Feb 5, 2023
78d9589
feat(issue-536): add tests for idportal service
live-dev999 Feb 6, 2023
6f8be5b
feat(issue-538): add idportal service
live-dev999 Feb 6, 2023
4013ccd
feat(issue-538): update idportal mvc
live-dev999 Feb 6, 2023
c665642
fix(issue-538): update helm pack
live-dev999 Feb 6, 2023
e4ba0ae
Merge remote-tracking branch 'o2nextgen-bitbucket/dev' into dev
live-dev999 Feb 6, 2023
3c02cde
fix(538): add helm pack for idportal mvc
live-dev999 Feb 7, 2023
a07cdcc
fix(538): add docke for idportal mvc
live-dev999 Feb 7, 2023
52fb638
fix(538): update config for idportal mvc
live-dev999 Feb 7, 2023
060e85d
fix(538): update config for idportal mvc
live-dev999 Feb 7, 2023
8d34d5b
fix(538): update config for idportal mvc
live-dev999 Feb 7, 2023
fbc9474
fix(538): update config for idportal mvc
live-dev999 Feb 7, 2023
1ee7b81
fix(538): update config for idportal mvc
live-dev999 Feb 7, 2023
b8bfe4f
fix(538): update config for idportal mvc
live-dev999 Feb 7, 2023
43b83f3
fix(538): update views for idportal mvc
live-dev999 Feb 7, 2023
b1667b1
fix(538): update views for idportal mvc
live-dev999 Feb 7, 2023
98d0d9d
fix(538): add delete functions for idportal mvc
live-dev999 Feb 7, 2023
eec95da
fix(538): add delete functions for idportal mvc
live-dev999 Feb 7, 2023
0b2bddf
fix(538): add delete functions for idportal mvc
live-dev999 Feb 7, 2023
52d8d5c
feat(issue-540): update smart-subscriber service with cqrs
live-dev999 Feb 7, 2023
47f84a9
feat(issue-540): add helm pack of smartsub service
live-dev999 Feb 7, 2023
47d95e8
feat(issue-540): update source of smartsub service
live-dev999 Feb 7, 2023
898a287
feat(issue-540): update source of smartsub service
live-dev999 Feb 7, 2023
21e5e84
feat(issue-540): update source of smartsub service
live-dev999 Feb 7, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deploy/helm/auth-web/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ env:
- name: Urls__PfrMvcUrl
value: https://app.pfr-centr.com
- name: Urls__IdPortalMvcUrl
value: https://idportal-api.o2nextgen.com
value: https://idportal.o2nextgen.com

resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
Expand Down
23 changes: 23 additions & 0 deletions deploy/helm/idportal-mvc/.helmignore
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/
24 changes: 24 additions & 0 deletions deploy/helm/idportal-mvc/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: v2
name: idportal-mvc
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"
104 changes: 104 additions & 0 deletions deploy/helm/idportal-mvc/dev.values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# Default values for pfr-mvc.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

replicaCount: 1

image:
repository: nginx
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: ""

imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: ""

podAnnotations: {}

podSecurityContext: {}
# fsGroup: 2000

securityContext: {}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000

service:
type: ClusterIP
port: 80

ingress:
enabled: true
className: ""
annotations:
cert-manager.io/cluster-issuer: letsencrypt
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/proxy-buffer-size: "128k"
# nginx.ingress.kubernetes.io/proxy-buffering: "on"
# nginx.ingress.kubernetes.io/proxy-body-size: 16m
# nginx.ingress.kubernetes.io/proxy-buffer-size: 8k
# nginx.ingress.kubernetes.io/proxy-busy-buffers-size: 16k
# nginx.ingress.kubernetes.io/client-body-buffer-size: 16m
# nginx.ingress.kubernetes.io/large-client-header-buffers: 4 100k
# nginx.ingress.kubernetes.io/load-balance: ewma
# nginx.ingress.kubernetes.io/proxy-read-timeout: "1000"
# nginx.ingress.kubernetes.io/proxy-send-timeout: "1000"
# nginx.ingress.kubernetes.io/server-snippet: | # this is where the magic happens
# client_header_buffer_size 100k;
# large_client_header_buffers 4 100k;
# fastcgi_buffers 16 16k;
# fastcgi_buffer_size 32k;
hosts:
- host: idportal.o2nextgen.com
paths:
- path: /
pathType: ImplementationSpecific
tls:
- secretName: app-idportal-mvc-tls
hosts:
- idportal.o2nextgen.com
env:
values:
- name: Services__AuthApiUrl
value: https://auth.o2nextgen.com
- name: Services__CallBackUrl
value: https://idportal.o2nextgen.com
- name: Services__CGenApiUrl
value: https://cgen-api.o2nextgen.com
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi

autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 100
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80

nodeSelector: {}

tolerations: []

affinity: {}
22 changes: 22 additions & 0 deletions deploy/helm/idportal-mvc/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
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.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "idportal-mvc.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 by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "idportal-mvc.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "idportal-mvc.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "idportal-mvc.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 }}
62 changes: 62 additions & 0 deletions deploy/helm/idportal-mvc/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "idportal-mvc.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 "idportal-mvc.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 "idportal-mvc.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "idportal-mvc.labels" -}}
helm.sh/chart: {{ include "idportal-mvc.chart" . }}
{{ include "idportal-mvc.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "idportal-mvc.selectorLabels" -}}
app.kubernetes.io/name: {{ include "idportal-mvc.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "idportal-mvc.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "idportal-mvc.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
61 changes: 61 additions & 0 deletions deploy/helm/idportal-mvc/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "idportal-mvc.fullname" . }}
labels:
{{- include "idportal-mvc.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
selector:
matchLabels:
{{- include "idportal-mvc.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "idportal-mvc.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "idportal-mvc.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: 80
protocol: TCP
livenessProbe:
httpGet:
path: /
port: http
readinessProbe:
httpGet:
path: /
port: http
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
28 changes: 28 additions & 0 deletions deploy/helm/idportal-mvc/templates/hpa.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{{- if .Values.autoscaling.enabled }}
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "idportal-mvc.fullname" . }}
labels:
{{- include "idportal-mvc.labels" . | nindent 4 }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ include "idportal-mvc.fullname" . }}
minReplicas: {{ .Values.autoscaling.minReplicas }}
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
metrics:
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
- type: Resource
resource:
name: cpu
targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}
Loading