feat: Add AWS CDK project and Helm charts for Beckn-Onix deployment on AWS cloud

This commit is contained in:
Mozammil Khan
2024-09-23 22:57:34 +05:30
parent 5d5e363ccd
commit c683ec3d74
114 changed files with 10018 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
apiVersion: v2
name: beckn-onix-bap
description: Beckn ONIX BAP 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.0.0"

View File

@@ -0,0 +1,24 @@
apiVersion: v2
name: bap-client
description: BAP Client 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.0.0"

View File

@@ -0,0 +1,31 @@
{{- if .Values.global.ingress.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "common.name" . }}-ingress
namespace: {{ .Values.global.namespace }}
labels:
{{- include "common.labels" . | nindent 4 }}
annotations:
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}, {"HTTPS": 443}]'
alb.ingress.kubernetes.io/ssl-policy: ELBSecurityPolicy-TLS-1-1-2017-01
alb.ingress.kubernetes.io/certificate-arn: {{ .Values.global.ingress.tls.certificateArn | quote }}
alb.ingress.kubernetes.io/ssl-redirect: '443'
alb.ingress.kubernetes.io/load-balancer-name: beckn-onix-bap-client
alb.ingress.kubernetes.io/target-group-attributes: stickiness.enabled=true,stickiness.lb_cookie.duration_seconds=300
alb.ingress.kubernetes.io/target-type: ip
alb.ingress.kubernetes.io/success-codes: 200,302
spec:
ingressClassName: alb
rules:
- http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ include "common.name" . }}-svc
port:
number: {{ .Values.service.port }}
{{- end }}

View File

@@ -0,0 +1,11 @@
{{ "\n" }}
Get the Beckn-ONIX BAP Client (Protocol Server) URL by running these commands:
{{ "\n" }}
{{- if .Values.global.ingress.enabled }}
export INGRESS_HOST=$(kubectl get ingress {{ include "common.name" . }}-ingress -n {{ .Values.namespace }} -o jsonpath="{.status.loadBalancer.ingress[0].hostname}")
{{- if .Values.global.ingress.tls.enabled }}
echo "https://$INGRESS_HOST"
{{- else }}
echo "http://$INGRESS_HOST"
{{- end }}
{{- end }}

View File

@@ -0,0 +1,93 @@
{{/*
Expand the name of the chart or use a provided override.
*/}}
{{- define "common.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Create a default fully qualified app name, with truncation to 63 characters.
*/}}
{{- define "common.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 }}
{{/*
Generate a chart name and version label.
*/}}
{{- define "common.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels to be used in all charts.
*/}}
{{- define "common.labels" -}}
helm.sh/chart: {{ include "common.chart" . }}
{{ include "common.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/release: {{ .Release.Revision | quote }}
{{- end }}
{{/*
Common selector labels.
*/}}
{{- define "common.selectorLabels" -}}
app.kubernetes.io/name: {{ include "common.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{/*
Helper for creating service account names.
*/}}
{{- define "common.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "common.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
{{/*
Helper for image names and tags.
*/}}
{{- define "common.image" -}}
{{ printf "%s:%s" .Values.image.repository .Values.image.tag }}
{{- end }}
{{/*
Helper for constructing resource names with prefixes or suffixes.
*/}}
{{- define "common.resourceName" -}}
{{- printf "%s-%s" (include "common.fullname" .) .Values.suffix | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- define "getSecretValue" -}}
{{- $secretName := .secretName -}}
{{- $namespace := .namespace -}}
{{- $key := .key -}}
{{- $secret := (lookup "v1" "Secret" $namespace $secretName) -}}
{{- if $secret -}}
{{- $data := $secret.data -}}
{{- if $data -}}
{{- $value := index $data $key | b64dec -}}
{{- $value -}}
{{- else -}}
{{- printf "Error: Secret data for %s not found" $key -}}
{{- end -}}
{{- else -}}
{{- printf "Error: Secret %s not found in namespace %s" $secretName $namespace -}}
{{- end -}}
{{- end -}}

View File

@@ -0,0 +1,144 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "common.name" . }}-config
namespace: {{ .Values.global.namespace }}
data:
default.yaml: |
# Mandatory
server:
port: {{ .Values.service.port }}
# Redis connection details
cache:
host: {{ .Values.global.redisCache.host }}
port: {{ .Values.global.redisCache.port }}
ttl: "PT10M"
# Optional. Default is 0.
db: 1
# Mongodb connection details
responseCache:
# By default password is picked from MongoDB POD if not supplied through Helm values.
mongoURL: "mongodb://{{ .Values.global.responseCacheMongo.username }}:{{ if .Values.global.responseCacheMongo.password }}{{ .Values.global.responseCacheMongo.password }}{{ else }}{{ include "getSecretValue" (dict "secretName" "mongodb" "namespace" "bap-common-services" "key" "mongodb-root-password") }}{{ end }}@{{ .Values.global.responseCacheMongo.host }}:{{ .Values.global.responseCacheMongo.port }}/{{ .Values.global.responseCacheMongo.dbname }}?authSource=admin"
ttl: "PT10M"
# Priority order will be
# 1. Synchronous
# 2. webhook
# 3. pubSub
client:
synchronous:
# By default password is picked from MongoDB POD if not supplied through Helm values.
mongoURL: "mongodb://{{ .Values.global.responseCacheMongo.username }}:{{ if .Values.global.responseCacheMongo.password }}{{ .Values.global.responseCacheMongo.password }}{{ else }}{{ include "getSecretValue" (dict "secretName" "mongodb" "namespace" "bap-common-services" "key" "mongodb-root-password") }}{{ end }}@{{ .Values.global.responseCacheMongo.host }}:{{ .Values.global.responseCacheMongo.port }}/{{ .Values.global.responseCacheMongo.dbname }}?authSource=admin"
ttl: "PT10M"
# Only required for BPP
# webhook:
# url: "https://beckn.free.beeceptor.com/clientURL"
app:
# Supported mode - bap and bpp
mode: {{ .Values.app.mode }}
# Two types of gateway mode present - client and network
gateway:
mode: {{ .Values.app.gateway.mode }}
inboxQueue: "inbox"
outboxQueue: "outbox"
# RabbitMQ connection details
# By default password is picked from RabbitMQ POD if not supplied through Helm values.
amqpURL: "amqp://{{ .Values.global.rabbitMQamqp.username }}:{{ if .Values.global.rabbitMQamqp.password }}{{ .Values.global.rabbitMQamqp.password }}{{ else }}{{ include "getSecretValue" (dict "secretName" "rabbitmq" "namespace" "bap-common-services" "key" "rabbitmq-password") }}{{ end }}@{{ .Values.global.rabbitMQamqp.host }}:{{ .Values.global.rabbitMQamqp.port }}"
# Mandatory.
actions:
requests:
search:
ttl : "PT15S"
init:
ttl : "PT10S"
select:
ttl : "PT10S"
confirm:
ttl : "PT10S"
status:
ttl : "PT10S"
track:
ttl : "PT10S"
cancel:
ttl : "PT10S"
update:
ttl : "PT10S"
rating:
ttl : "PT10S"
support:
ttl : "PT10S"
get_cancellation_reasons:
ttl : "PT10S"
get_rating_categories:
ttl : "PT10S"
cancellation:
ttl : "PT10S"
responses:
on_search:
ttl: "PT15S"
on_init:
ttl: "PT10S"
on_select:
ttl: "PT10S"
on_confirm:
ttl: "PT10S"
on_status:
ttl: "PT10S"
on_track:
ttl: "PT10S"
on_cancel:
ttl: "PT10S"
on_update:
ttl: "PT10S"
on_rating:
ttl: "PT10S"
on_support:
ttl: "PT10S"
cancellation_reasons:
ttl: "PT10S"
rating_categories:
ttl: "PT10S"
# Mandatory keys
privateKey: {{ .Values.global.bap.privateKey }}
publicKey: {{ .Values.global.bap.publicKey }}
# Subscriber details
subscriberId: "{{ .Values.global.subscriber_id | default .Values.global.externalDomain }}"
subscriberUri: "https://{{ .Values.global.externalDomain }}"
# Registry
registryUrl: "{{ .Values.global.registry_url }}/subscribers"
auth: false
# BAP client key ID
uniqueKey: "{{ .Values.global.externalDomain }}.k1"
# Mandatory
city: "std:080"
country: "IND"
# Mandatory
ttl: "PT10M"
# Mandatory
httpTimeout: "PT3S"
httpRetryCount: 2
telemetry:
enabled: false
url: ""
batchSize: 100
# In minutes
syncInterval: 30
redis_db: 3
useLayer2Config: true
mandateLayer2Config: true

View File

@@ -0,0 +1,72 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "common.name" . }}
namespace: {{ .Values.global.namespace }}
labels:
{{- include "common.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
selector:
matchLabels:
{{- include "common.selectorLabels" . | nindent 6 }}
template:
metadata:
annotations:
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "common.labels" . | nindent 8 }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "common.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
image: {{ .Values.global.image.repository }}
imagePullPolicy: {{ .Values.global.image.pullPolicy }}
ports:
- name: bap-client-port
containerPort: {{ .Values.service.port }}
protocol: TCP
{{- if .Values.livenessProbe }}
livenessProbe:
{{- toYaml .Values.livenessProbe | nindent 12 }}
{{- end }}
{{- if .Values.readinessProbe }}
readinessProbe:
{{- toYaml .Values.readinessProbe | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
- name: bap-client-config
mountPath: "/usr/src/app/config/default.yaml"
subPath: default.yaml
readOnly: true
# EFS volumes for L2 schemas
- name: bap-schemas-efs-volume
mountPath: /usr/src/app/schemas
# EBS volumes for logs
- name: bap-client-logs-ebs-volume
mountPath: /usr/src/app/logs
volumes:
- name: bap-client-config
configMap:
name: {{ include "common.name" . }}-config
- name: bap-schemas-efs-volume
persistentVolumeClaim:
claimName: beckn-onix-bap-efs-pvc
- name: bap-client-logs-ebs-volume
persistentVolumeClaim:
claimName: {{ include "common.name" . }}-logs-pvc

View File

@@ -0,0 +1,31 @@
{{- if .Values.global.ingress.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "common.name" . }}-ingress
namespace: {{ .Values.global.namespace }}
labels:
{{- include "common.labels" . | nindent 4 }}
annotations:
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}, {"HTTPS": 443}]'
alb.ingress.kubernetes.io/ssl-policy: ELBSecurityPolicy-TLS-1-1-2017-01
alb.ingress.kubernetes.io/certificate-arn: {{ .Values.global.ingress.tls.certificateArn | quote }}
alb.ingress.kubernetes.io/ssl-redirect: '443'
alb.ingress.kubernetes.io/load-balancer-name: beckn-onix-bap-client
alb.ingress.kubernetes.io/target-group-attributes: stickiness.enabled=true,stickiness.lb_cookie.duration_seconds=300
alb.ingress.kubernetes.io/target-type: ip
alb.ingress.kubernetes.io/success-codes: 200,302
spec:
ingressClassName: alb
rules:
- http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ include "common.name" . }}-svc
port:
number: {{ .Values.service.port }}
{{- end }}

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ include "common.name" . }}-logs-pvc
namespace: {{ .Values.global.namespace }}
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
storageClassName: gp2

View File

@@ -0,0 +1,16 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "common.name" . }}-svc
namespace: {{ .Values.global.namespace }}
labels:
{{- include "common.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: bap-client-port
protocol: TCP
name: http
selector:
{{- include "common.selectorLabels" . | nindent 4 }}

View File

@@ -0,0 +1,74 @@
# Default values for registry.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
service:
type: ClusterIP
port: 5002
# Supported app mode - bap or bpp. Gateway mode to be either client or network.
app:
mode: bap
gateway:
mode: client
resources:
# Adjust it as per desired POD resource demand
requests:
cpu: "0.5"
memory: "1Gi"
limits:
cpu: "0.5"
memory: "1Gi"
livenessProbe: {}
# httpGet:
# path: /
# port: http
readinessProbe: {}
# httpGet:
# path: /
# port: http
# To configure HPA
autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 2
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80
serviceAccount:
# Specifies whether a service account should be created
create: false
# Automatically mount a ServiceAccount's API credentials?
automount: 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: {}
podLabels: {}
podSecurityContext: {}
# fsGroup: 2000
securityContext: {}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000
nodeSelector: {}
tolerations: []
affinity: {}

View File

@@ -0,0 +1,24 @@
apiVersion: v2
name: bap-network
description: BAP Network 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.0.0"

View File

@@ -0,0 +1,11 @@
{{ "\n" }}
Get the Beckn-ONIX BAP Network (Protocol Server) URL by running these commands:
{{ "\n" }}
{{- if .Values.global.ingress.enabled }}
export INGRESS_HOST=$(kubectl get ingress {{ include "common.name" . }}-ingress -n {{ .Values.namespace }} -o jsonpath="{.status.loadBalancer.ingress[0].hostname}")
{{- if .Values.global.ingress.tls.enabled }}
echo "https://$INGRESS_HOST"
{{- else }}
echo "http://$INGRESS_HOST"
{{- end }}
{{- end }}

View File

@@ -0,0 +1,94 @@
{{/*
Expand the name of the chart or use a provided override.
*/}}
{{- define "common.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Create a default fully qualified app name, with truncation to 63 characters.
*/}}
{{- define "common.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 }}
{{/*
Generate a chart name and version label.
*/}}
{{- define "common.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels to be used in all charts.
*/}}
{{- define "common.labels" -}}
helm.sh/chart: {{ include "common.chart" . }}
{{ include "common.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/release: {{ .Release.Revision | quote }}
{{- end }}
{{/*
Common selector labels.
*/}}
{{- define "common.selectorLabels" -}}
app.kubernetes.io/name: {{ include "common.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{/*
Helper for creating service account names.
*/}}
{{- define "common.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "common.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
{{/*
Helper for image names and tags.
*/}}
{{- define "common.image" -}}
{{ printf "%s:%s" .Values.image.repository .Values.image.tag }}
{{- end }}
{{/*
Helper for constructing resource names with prefixes or suffixes.
*/}}
{{- define "common.resourceName" -}}
{{- printf "%s-%s" (include "common.fullname" .) .Values.suffix | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- define "getSecretValue" -}}
{{- $secretName := .secretName -}}
{{- $namespace := .namespace -}}
{{- $key := .key -}}
{{- $secret := (lookup "v1" "Secret" $namespace $secretName) -}}
{{- if $secret -}}
{{- $data := $secret.data -}}
{{- if $data -}}
{{- $value := index $data $key | b64dec -}}
{{- $value -}}
{{- else -}}
{{- printf "Error: Secret data for %s not found" $key -}}
{{- end -}}
{{- else -}}
{{- printf "Error: Secret %s not found in namespace %s" $secretName $namespace -}}
{{- end -}}
{{- end -}}

View File

@@ -0,0 +1,144 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "common.name" . }}-config
namespace: {{ .Values.global.namespace }}
data:
default.yaml: |
# Mandatory
server:
port: {{ .Values.service.port }}
# Redis connection details
cache:
host: {{ .Values.global.redisCache.host }}
port: {{ .Values.global.redisCache.port }}
ttl: "PT10M"
# Optional. Default is 0.
db: 1
# Mongodb connection details
responseCache:
# By default password is picked from MongoDB POD if not supplied through Helm values.
mongoURL: "mongodb://{{ .Values.global.responseCacheMongo.username }}:{{ if .Values.global.responseCacheMongo.password }}{{ .Values.global.responseCacheMongo.password }}{{ else }}{{ include "getSecretValue" (dict "secretName" "mongodb" "namespace" "bap-common-services" "key" "mongodb-root-password") }}{{ end }}@{{ .Values.global.responseCacheMongo.host }}:{{ .Values.global.responseCacheMongo.port }}/{{ .Values.global.responseCacheMongo.dbname }}?authSource=admin"
ttl: "PT10M"
# Priority order will be
# 1. Synchronous
# 2. webhook
# 3. pubSub
client:
synchronous:
# By default password is picked from MongoDB POD if not supplied through Helm values.
mongoURL: "mongodb://{{ .Values.global.responseCacheMongo.username }}:{{ if .Values.global.responseCacheMongo.password }}{{ .Values.global.responseCacheMongo.password }}{{ else }}{{ include "getSecretValue" (dict "secretName" "mongodb" "namespace" "bap-common-services" "key" "mongodb-root-password") }}{{ end }}@{{ .Values.global.responseCacheMongo.host }}:{{ .Values.global.responseCacheMongo.port }}/{{ .Values.global.responseCacheMongo.dbname }}?authSource=admin"
# Only required for BPP
# webhook:
# url: "https://beckn.free.beeceptor.com/clientURL"
app:
# Supported mode - bap and bpp
mode: {{ .Values.app.mode }}
# Two types of gateway mode present - client and network
gateway:
mode: {{ .Values.app.gateway.mode }}
inboxQueue: "inbox"
outboxQueue: "outbox"
# RabbitMQ connection details
# By default password is picked from RabbitMQ POD if not supplied through Helm values.
amqpURL: "amqp://{{ .Values.global.rabbitMQamqp.username }}:{{ if .Values.global.rabbitMQamqp.password }}{{ .Values.global.rabbitMQamqp.password }}{{ else }}{{ include "getSecretValue" (dict "secretName" "rabbitmq" "namespace" "bap-common-services" "key" "rabbitmq-password") }}{{ end }}@{{ .Values.global.rabbitMQamqp.host }}:{{ .Values.global.rabbitMQamqp.port }}"
# Mandatory.
actions:
requests:
search:
ttl : "PT15S"
init:
ttl : "PT10S"
select:
ttl : "PT10S"
confirm:
ttl : "PT10S"
status:
ttl : "PT10S"
track:
ttl : "PT10S"
cancel:
ttl : "PT10S"
update:
ttl : "PT10S"
rating:
ttl : "PT10S"
support:
ttl : "PT10S"
get_cancellation_reasons:
ttl : "PT10S"
get_rating_categories:
ttl : "PT10S"
cancellation:
ttl : "PT10S"
responses:
on_search:
ttl: "PT15S"
on_init:
ttl: "PT10S"
on_select:
ttl: "PT10S"
on_confirm:
ttl: "PT10S"
on_status:
ttl: "PT10S"
on_track:
ttl: "PT10S"
on_cancel:
ttl: "PT10S"
on_update:
ttl: "PT10S"
on_rating:
ttl: "PT10S"
on_support:
ttl: "PT10S"
cancellation_reasons:
ttl: "PT10S"
rating_categories:
ttl: "PT10S"
# Mandatory keys
privateKey: {{ .Values.global.bap.privateKey }}
publicKey: {{ .Values.global.bap.publicKey }}
# Subscriber details
subscriberId: "{{ .Values.global.subscriber_id | default .Values.global.externalDomain }}"
subscriberUri: "https://{{ .Values.global.externalDomain }}"
# Registry
registryUrl: "{{ .Values.global.registry_url }}/subscribers"
auth: false
# BAP client key ID
uniqueKey: "{{ .Values.global.externalDomain }}.k1"
# Mandatory
city: "std:080"
country: "IND"
# Mandatory
ttl: "PT10M"
# Mandatory
httpTimeout: "PT3S"
httpRetryCount: 2
telemetry:
enabled: false
url: ""
batchSize: 100
# In minutes
syncInterval: 30
redis_db: 3
useLayer2Config: true
mandateLayer2Config: true

View File

@@ -0,0 +1,80 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "common.name" . }}
namespace: {{ .Values.global.namespace }}
labels:
{{- include "common.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
selector:
matchLabels:
{{- include "common.selectorLabels" . | nindent 6 }}
template:
metadata:
annotations:
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "common.labels" . | nindent 8 }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "common.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
initContainers:
- name: retain-schemas-content-ebs-volume
image: {{ .Values.global.image.repository }}
imagePullPolicy: {{ .Values.global.image.pullPolicy }}
command: ['sh', '-c', 'cp -r /usr/src/app/schemas/* /mnt/schemas/']
volumeMounts:
- name: bap-schemas-efs-volume
mountPath: /mnt/schemas
containers:
- name: {{ .Chart.Name }}
image: {{ .Values.global.image.repository }}
imagePullPolicy: {{ .Values.global.image.pullPolicy }}
ports:
- name: bap-net-port
containerPort: {{ .Values.service.port }}
protocol: TCP
{{- if .Values.livenessProbe }}
livenessProbe:
{{- toYaml .Values.livenessProbe | nindent 12 }}
{{- end }}
{{- if .Values.readinessProbe }}
readinessProbe:
{{- toYaml .Values.readinessProbe | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
- name: bap-network-config
mountPath: "/usr/src/app/config/default.yaml"
subPath: default.yaml
readOnly: true
# EFS volumes for L2 schemas
- name: bap-schemas-efs-volume
mountPath: /usr/src/app/schemas
# EBS volumes for logs
- name: bap-network-logs-ebs-volume
mountPath: /usr/src/app/logs
volumes:
- name: bap-network-config
configMap:
name: {{ include "common.name" . }}-config
- name: bap-schemas-efs-volume
persistentVolumeClaim:
claimName: beckn-onix-bap-efs-pvc
- name: bap-network-logs-ebs-volume
persistentVolumeClaim:
claimName: {{ include "common.name" . }}-logs-pvc

View File

@@ -0,0 +1,31 @@
{{- if .Values.global.ingress.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "common.name" . }}-ingress
namespace: {{ .Values.global.namespace }}
labels:
{{- include "common.labels" . | nindent 4 }}
annotations:
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}, {"HTTPS": 443}]'
alb.ingress.kubernetes.io/ssl-policy: ELBSecurityPolicy-TLS-1-1-2017-01
alb.ingress.kubernetes.io/certificate-arn: {{ .Values.global.ingress.tls.certificateArn | quote }}
alb.ingress.kubernetes.io/ssl-redirect: '443'
alb.ingress.kubernetes.io/load-balancer-name: beckn-onix-bap-network
alb.ingress.kubernetes.io/target-group-attributes: stickiness.enabled=true,stickiness.lb_cookie.duration_seconds=300
alb.ingress.kubernetes.io/target-type: ip
alb.ingress.kubernetes.io/success-codes: 200,302
spec:
ingressClassName: alb
rules:
- http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ include "common.name" . }}-svc
port:
number: {{ .Values.service.port }}
{{- end }}

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ include "common.name" . }}-logs-pvc
namespace: {{ .Values.global.namespace }}
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
storageClassName: gp2

View File

@@ -0,0 +1,16 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "common.name" . }}-svc
namespace: {{ .Values.global.namespace }}
labels:
{{- include "common.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: bap-net-port
protocol: TCP
name: http
selector:
{{- include "common.selectorLabels" . | nindent 4 }}

View File

@@ -0,0 +1,64 @@
replicaCount: 1
service:
type: ClusterIP
port: 5001
# Supported app mode - bap or bpp. Gateway mode to be either client or network.
app:
mode: bap
gateway:
mode: network
resources:
# Adjust it as per desired POD resource demand
requests:
cpu: "0.5"
memory: "1Gi"
limits:
cpu: "0.5"
memory: "1Gi"
livenessProbe: {}
# httpGet:
# path: /
# port: http
readinessProbe: {}
# httpGet:
# path: /
# port: http
# To configure HPA
autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 2
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80
serviceAccount:
# Specifies whether a service account should be created
create: false
# Automatically mount a ServiceAccount's API credentials?
automount: 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: {}
podLabels: {}
podSecurityContext: {}
# fsGroup: 2000
securityContext: {}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000

View File

@@ -0,0 +1,6 @@
{
"name": "beckn-onix-bap",
"lockfileVersion": 3,
"requires": true,
"packages": {}
}

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: beckn-onix-bap-efs-pvc
namespace: {{ .Values.global.namespace }}
spec:
accessModes:
- ReadWriteMany
storageClassName: {{ include "common.name" . }}-efs-storageclass
resources:
requests:
storage: 5Gi

View File

@@ -0,0 +1,9 @@
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: {{ include "common.name" . }}-efs-storageclass
provisioner: efs.csi.aws.com
parameters:
provisioningMode: efs-ap
fileSystemId: {{ .Values.global.efs.fileSystemId }}
directoryPerms: "755"

View File

@@ -0,0 +1,6 @@
apiVersion: v1
kind: Namespace
metadata:
name: {{ .Values.global.namespace }}
labels:
{{- include "common.labels" . | nindent 4 }}

View File

@@ -0,0 +1,9 @@
apiVersion: v1
kind: Secret
metadata:
name: beckn-onix-bap-secret
namespace: {{ .Values.global.namespace }}
type: Opaque
data:
privateKey: {{ .Values.global.bap.publicKey | b64enc | quote }}
publicKey: {{ .Values.global.bap.privateKey | b64enc | quote }}

View File

@@ -0,0 +1,70 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"global": {
"type": "object",
"properties": {
"externalDomain": {
"type": "string",
"description": "The external domain for the BAP network."
},
"registry_url": {
"type": "string",
"description": "The URL for the registry."
},
"ingress": {
"type": "object",
"properties": {
"tls": {
"type": "object",
"properties": {
"certificateArn": {
"type": "string",
"description": "The ARN of the TLS certificate for ingress."
}
},
"required": ["certificateArn"],
"description": "TLS configuration for ingress."
}
},
"required": ["tls"],
"description": "Ingress-related configuration."
},
"efs": {
"type": "object",
"properties": {
"fileSystemId": {
"type": "string",
"description": "The EFS FileSystem ID."
}
},
"required": ["fileSystemId"],
"description": "EFS-related configuration."
},
"bap": {
"type": "object",
"properties": {
"privateKey": {
"type": "string",
"description": "The private key for BAP."
},
"publicKey": {
"type": "string",
"description": "The public key for BAP."
}
},
"required": ["privateKey", "publicKey"],
"description": "Keys for BAP, including both private and public keys."
}
},
"required": [
"externalDomain",
"registry_url",
"ingress",
"efs",
"bap"
]
}
}
}

View File

@@ -0,0 +1,63 @@
# Default values for registry.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
global:
namespace: beckn-onix-bap
image:
repository: fidedocker/protocol-server
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
# tag: ""
# Redis connection details
redisCache:
host: redis-master.bap-common-services.svc.cluster.local
port: 6379
# Mongodb connection details
responseCacheMongo:
host: mongodb.bap-common-services.svc.cluster.local
port: 27017
dbname: protocol_server
username: root
password:
# RabbitMQ connection details
rabbitMQamqp:
host: rabbitmq.bap-common-services.svc.cluster.local
port: 5672
username: beckn
password:
# Ingress definition for AWS Application Loadbalancer.
# This is required for each component available over the public network.
ingress:
enabled: true # If enabled, ALB will be provisioned as per ingress.yaml. Without ingress service will be scoped to K8s cluster.
tls:
# SSL certificate location from AWS Certificate Manager - https://aws.amazon.com/certificate-manager/
certificateArn:
sslRedirect: true # Set to true to enable SSL redirection, useful for UI redirection.
# Must be set while installing Helm chart
externalDomain:
registry_url:
bpp:
privateKey:
publicKey:
efs:
fileSystemId:
# BPP subscribe_id. Default to externalDomain value.
subscriber_id:
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
nodeSelector: {}
tolerations: []
affinity: {}

View File

@@ -0,0 +1,24 @@
apiVersion: v2
name: beckn-onix-bpp
description: Beckn ONIX BPP 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.0.0"

View File

@@ -0,0 +1,24 @@
apiVersion: v2
name: bpp-client
description: BPP Client 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.0.0"

View File

@@ -0,0 +1,11 @@
{{ "\n" }}
Get the Beckn-ONIX BPP Client (Protocol Server) URL by running these commands:
{{ "\n" }}
{{- if .Values.global.ingress.enabled }}
export INGRESS_HOST=$(kubectl get ingress {{ include "common.name" . }}-ingress -n {{ .Values.namespace }} -o jsonpath="{.status.loadBalancer.ingress[0].hostname}")
{{- if .Values.global.ingress.tls.enabled }}
echo "https://$INGRESS_HOST"
{{- else }}
echo "http://$INGRESS_HOST"
{{- end }}
{{- end }}

View File

@@ -0,0 +1,75 @@
{{/*
Expand the name of the chart or use a provided override.
*/}}
{{- define "common.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Create a default fully qualified app name, with truncation to 63 characters.
*/}}
{{- define "common.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 }}
{{/*
Generate a chart name and version label.
*/}}
{{- define "common.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels to be used in all charts.
*/}}
{{- define "common.labels" -}}
helm.sh/chart: {{ include "common.chart" . }}
{{ include "common.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/release: {{ .Release.Revision | quote }}
{{- end }}
{{/*
Common selector labels.
*/}}
{{- define "common.selectorLabels" -}}
app.kubernetes.io/name: {{ include "common.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{/*
Helper for creating service account names.
*/}}
{{- define "common.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "common.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
{{/*
Helper for image names and tags.
*/}}
{{- define "common.image" -}}
{{ printf "%s:%s" .Values.image.repository .Values.image.tag }}
{{- end }}
{{/*
Helper for constructing resource names with prefixes or suffixes.
*/}}
{{- define "common.resourceName" -}}
{{- printf "%s-%s" (include "common.fullname" .) .Values.suffix | trunc 63 | trimSuffix "-" }}
{{- end }}

View File

@@ -0,0 +1,135 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "common.name" . }}-config
namespace: {{ .Values.global.namespace }}
data:
default.yaml: |
# Mandatory
server:
port: {{ .Values.service.port }}
# Redis connection details
cache:
host: {{ .Values.global.redisCache.host }}
port: {{ .Values.global.redisCache.port }}
ttl: "PT10M"
# Optional. Default is 0.
db: 1
# Mongodb connection details
responseCache:
# By default password is picked from MongoDB POD if not supplied through Helm values.
mongoURL: "mongodb://{{ .Values.global.responseCacheMongo.username }}:{{ if .Values.global.responseCacheMongo.password }}{{ .Values.global.responseCacheMongo.password }}{{ else }}{{ include "getSecretValue" (dict "secretName" "mongodb" "namespace" "bpp-common-services" "key" "mongodb-root-password") }}{{ end }}@{{ .Values.global.responseCacheMongo.host }}:{{ .Values.global.responseCacheMongo.port }}/{{ .Values.global.responseCacheMongo.dbname }}?authSource=admin"
ttl: "PT10M"
# synchronous only required for BPP
client:
# Only required for BPP
webhook:
url: "http://sandbox.beckn-onix-aws-cdk.becknprotocol.io"
# Supported mode - bap and bpp
app:
mode: {{ .Values.app.mode }}
# Two types of gateway mode present - client and network
gateway:
mode: {{ .Values.app.gateway.mode }}
inboxQueue: "inbox-bpp"
outboxQueue: "outbox-bpp"
# RabbitMQ connection details
# By default password is picked from RabbitMQ POD if not supplied through Helm values.
amqpURL: "amqp://{{ .Values.global.rabbitMQamqp.username }}:{{ if .Values.global.rabbitMQamqp.password }}{{ .Values.global.rabbitMQamqp.password }}{{ else }}{{ include "getSecretValue" (dict "secretName" "rabbitmq" "namespace" "bpp-common-services" "key" "rabbitmq-password") }}{{ end }}@{{ .Values.global.rabbitMQamqp.host }}:{{ .Values.global.rabbitMQamqp.port }}"
# Mandatory.
actions:
requests:
search:
ttl : "PT15S"
init:
ttl : "PT10S"
select:
ttl : "PT10S"
confirm:
ttl : "PT10S"
status:
ttl : "PT10S"
track:
ttl : "PT10S"
cancel:
ttl : "PT10S"
update:
ttl : "PT10S"
rating:
ttl : "PT10S"
support:
ttl : "PT10S"
get_cancellation_reasons:
ttl : "PT10S"
get_rating_categories:
ttl : "PT10S"
cancellation:
ttl : "PT10S"
responses:
on_search:
ttl: "PT15S"
on_init:
ttl: "PT10S"
on_select:
ttl: "PT10S"
on_confirm:
ttl: "PT10S"
on_status:
ttl: "PT10S"
on_track:
ttl: "PT10S"
on_cancel:
ttl: "PT10S"
on_update:
ttl: "PT10S"
on_rating:
ttl: "PT10S"
on_support:
ttl: "PT10S"
cancellation_reasons:
ttl: "PT10S"
rating_categories:
ttl: "PT10S"
# Mandatory keys
privateKey: {{ .Values.global.bpp.privateKey }}
publicKey: {{ .Values.global.bpp.publicKey }}
# Subscriber details
subscriberId: "{{ .Values.global.subscriber_id | default .Values.global.externalDomain }}"
subscriberUri: "https://{{ .Values.global.externalDomain }}"
# Registry
registryUrl: "{{ .Values.global.registry_url }}/subscribers"
auth: false
# BPP client key ID
uniqueKey: "{{ .Values.global.externalDomain }}.k1"
# Mandatory
city: "std:080"
country: "IND"
# Mandatory
ttl: "PT10M"
# Mandatory
httpTimeout: "PT3S"
httpRetryCount: 2
telemetry:
enabled: false
url: ""
batchSize: 100
# In minutes
syncInterval: 30
redis_db: 3
useLayer2Config: true
mandateLayer2Config: true

View File

@@ -0,0 +1,74 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "common.name" . }}
namespace: {{ .Values.global.namespace }}
labels:
{{- include "common.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
strategy:
type: Recreate
selector:
matchLabels:
{{- include "common.selectorLabels" . | nindent 6 }}
template:
metadata:
annotations:
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "common.labels" . | nindent 8 }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "common.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
image: {{ .Values.global.image.repository }}
imagePullPolicy: {{ .Values.global.image.pullPolicy }}
ports:
- name: bpp-client-port
containerPort: {{ .Values.service.port }}
protocol: TCP
{{- if .Values.livenessProbe }}
livenessProbe:
{{- toYaml .Values.livenessProbe | nindent 12 }}
{{- end }}
{{- if .Values.readinessProbe }}
readinessProbe:
{{- toYaml .Values.readinessProbe | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
- name: bpp-client-config
mountPath: "/usr/src/app/config/default.yaml"
subPath: default.yaml
readOnly: true
# EFS volumes for L2 schemas
- name: bpp-schemas-efs-volume
mountPath: /usr/src/app/schemas
# EBS volumes for logs
- name: bpp-client-logs-ebs-volume
mountPath: /usr/src/app/logs
volumes:
- name: bpp-client-config
configMap:
name: {{ include "common.name" . }}-config
- name: bpp-schemas-efs-volume
persistentVolumeClaim:
claimName: beckn-onix-bpp-efs-pvc
- name: bpp-client-logs-ebs-volume
persistentVolumeClaim:
claimName: {{ include "common.name" . }}-logs-pvc

View File

@@ -0,0 +1,31 @@
{{- if .Values.global.ingress.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "common.name" . }}-ingress
namespace: {{ .Values.global.namespace }}
labels:
{{- include "common.labels" . | nindent 4 }}
annotations:
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}, {"HTTPS": 443}]'
alb.ingress.kubernetes.io/ssl-policy: ELBSecurityPolicy-TLS-1-1-2017-01
alb.ingress.kubernetes.io/certificate-arn: {{ .Values.global.ingress.tls.certificateArn | quote }}
alb.ingress.kubernetes.io/ssl-redirect: '443'
alb.ingress.kubernetes.io/load-balancer-name: beckn-onix-bpp-client
alb.ingress.kubernetes.io/target-group-attributes: stickiness.enabled=true,stickiness.lb_cookie.duration_seconds=300
alb.ingress.kubernetes.io/target-type: ip
alb.ingress.kubernetes.io/success-codes: 200,302
spec:
ingressClassName: alb
rules:
- http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ include "common.name" . }}-svc
port:
number: {{ .Values.service.port }}
{{- end }}

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ include "common.name" . }}-logs-pvc
namespace: {{ .Values.global.namespace }}
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
storageClassName: gp2

View File

@@ -0,0 +1,16 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "common.name" . }}-svc
namespace: {{ .Values.global.namespace }}
labels:
{{- include "common.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: bpp-client-port
protocol: TCP
name: http
selector:
{{- include "common.selectorLabels" . | nindent 4 }}

View File

@@ -0,0 +1,14 @@
{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "common.serviceAccountName" . }}
namespace: {{ .Values.global.namespace }}
labels:
{{- include "common.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
automountServiceAccountToken: {{ .Values.serviceAccount.automount }}
{{- end }}

View File

@@ -0,0 +1,72 @@
# Default values for registry.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
service:
type: ClusterIP
port: 6002
# Supported app mode - bap or bpp. Gateway mode to be either client or network.
app:
mode: bpp
gateway:
mode: client
resources:
# Adjust it as per desired POD resource demand
requests:
cpu: "0.5"
memory: "1Gi"
limits:
cpu: "0.5"
memory: "1Gi"
livenessProbe: {}
# httpGet:
# path: /
# port: http
readinessProbe: {}
# httpGet:
# path: /
# port: http
# To configure HPA
autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 2
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80
serviceAccount:
# Specifies whether a service account should be created
create: false
# Automatically mount a ServiceAccount's API credentials?
automount: 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: {}
podLabels: {}
podSecurityContext: {}
# fsGroup: 2000
securityContext: {}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000
nodeSelector: {}
tolerations: []
affinity: {}

View File

@@ -0,0 +1,24 @@
apiVersion: v2
name: bpp-network
description: BPP Network 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.0.0"

View File

@@ -0,0 +1,11 @@
{{ "\n" }}
Get the Beckn-ONIX BPP Network (Protocol Server) URL by running these commands:
{{ "\n" }}
{{- if .Values.global.ingress.enabled }}
export INGRESS_HOST=$(kubectl get ingress {{ include "common.name" . }}-ingress -n {{ .Values.namespace }} -o jsonpath="{.status.loadBalancer.ingress[0].hostname}")
{{- if .Values.global.ingress.tls.enabled }}
echo "https://$INGRESS_HOST"
{{- else }}
echo "http://$INGRESS_HOST"
{{- end }}
{{- end }}

View File

@@ -0,0 +1,95 @@
{{/*
Expand the name of the chart or use a provided override.
*/}}
{{- define "common.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Create a default fully qualified app name, with truncation to 63 characters.
*/}}
{{- define "common.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 }}
{{/*
Generate a chart name and version label.
*/}}
{{- define "common.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels to be used in all charts.
*/}}
{{- define "common.labels" -}}
helm.sh/chart: {{ include "common.chart" . }}
{{ include "common.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/release: {{ .Release.Revision | quote }}
{{- end }}
{{/*
Common selector labels.
*/}}
{{- define "common.selectorLabels" -}}
app.kubernetes.io/name: {{ include "common.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{/*
Helper for creating service account names.
*/}}
{{- define "common.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "common.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
{{/*
Helper for image names and tags.
*/}}
{{- define "common.image" -}}
{{ printf "%s:%s" .Values.image.repository .Values.image.tag }}
{{- end }}
{{/*
Helper for constructing resource names with prefixes or suffixes.
*/}}
{{- define "common.resourceName" -}}
{{- printf "%s-%s" (include "common.fullname" .) .Values.suffix | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- define "getSecretValue" -}}
{{- $secretName := .secretName -}}
{{- $namespace := .namespace -}}
{{- $key := .key -}}
{{- $secret := (lookup "v1" "Secret" $namespace $secretName) -}}
{{- if $secret -}}
{{- $data := $secret.data -}}
{{- if $data -}}
{{- $value := index $data $key | b64dec -}}
{{- $value -}}
{{- else -}}
{{- printf "Error: Secret data for %s not found" $key -}}
{{- end -}}
{{- else -}}
{{- printf "Error: Secret %s not found in namespace %s" $secretName $namespace -}}
{{- end -}}
{{- end -}}

View File

@@ -0,0 +1,135 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "common.name" . }}-config
namespace: {{ .Values.global.namespace }}
data:
default.yaml: |
# Mandatory
server:
port: {{ .Values.service.port }}
# Redis connection details
cache:
host: {{ .Values.global.redisCache.host }}
port: {{ .Values.global.redisCache.port }}
ttl: "PT10M"
# Optional. Default is 0.
db: 1
# Mongodb connection details
responseCache:
# By default password is picked from MongoDB POD if not supplied through Helm values.
mongoURL: "mongodb://{{ .Values.global.responseCacheMongo.username }}:{{ if .Values.global.responseCacheMongo.password }}{{ .Values.global.responseCacheMongo.password }}{{ else }}{{ include "getSecretValue" (dict "secretName" "mongodb" "namespace" "bpp-common-services" "key" "mongodb-root-password") }}{{ end }}@{{ .Values.global.responseCacheMongo.host }}:{{ .Values.global.responseCacheMongo.port }}/{{ .Values.global.responseCacheMongo.dbname }}?authSource=admin"
ttl: "PT10M"
client:
# Only required for BPP
webhook:
url: "http://sandbox.beckn-onix-aws-cdk.becknprotocol.io"
# Supported mode - bap and bpp
app:
mode: {{ .Values.app.mode }}
# Two types of gateway mode present - client and network
gateway:
mode: {{ .Values.app.gateway.mode }}
inboxQueue: "inbox-bpp"
outboxQueue: "outbox-bpp"
# RabbitMQ connection details
# By default password is picked from RabbitMQ POD if not supplied through Helm values.
amqpURL: "amqp://{{ .Values.global.rabbitMQamqp.username }}:{{ if .Values.global.rabbitMQamqp.password }}{{ .Values.global.rabbitMQamqp.password }}{{ else }}{{ include "getSecretValue" (dict "secretName" "rabbitmq" "namespace" "bpp-common-services" "key" "rabbitmq-password") }}{{ end }}@{{ .Values.global.rabbitMQamqp.host }}:{{ .Values.global.rabbitMQamqp.port }}"
# Mandatory.
actions:
requests:
search:
ttl : "PT15S"
init:
ttl : "PT10S"
select:
ttl : "PT10S"
confirm:
ttl : "PT10S"
status:
ttl : "PT10S"
track:
ttl : "PT10S"
cancel:
ttl : "PT10S"
update:
ttl : "PT10S"
rating:
ttl : "PT10S"
support:
ttl : "PT10S"
get_cancellation_reasons:
ttl : "PT10S"
get_rating_categories:
ttl : "PT10S"
cancellation:
ttl : "PT10S"
responses:
on_search:
ttl: "PT15S"
on_init:
ttl: "PT10S"
on_select:
ttl: "PT10S"
on_confirm:
ttl: "PT10S"
on_status:
ttl: "PT10S"
on_track:
ttl: "PT10S"
on_cancel:
ttl: "PT10S"
on_update:
ttl: "PT10S"
on_rating:
ttl: "PT10S"
on_support:
ttl: "PT10S"
cancellation_reasons:
ttl: "PT10S"
rating_categories:
ttl: "PT10S"
# Mandatory keys
privateKey: {{ .Values.global.bpp.privateKey }}
publicKey: {{ .Values.global.bpp.publicKey }}
# Subscriber details
subscriberId: "{{ .Values.global.subscriber_id | default .Values.global.externalDomain }}"
subscriberUri: "https://{{ .Values.global.externalDomain }}"
# Registry
registryUrl: "{{ .Values.global.registry_url }}/subscribers"
auth: false
# BPP client key ID
uniqueKey: "{{ .Values.global.externalDomain }}.k1"
# Mandatory
city: "std:080"
country: "IND"
# Mandatory
ttl: "PT10M"
# Mandatory
httpTimeout: "PT3S"
httpRetryCount: 2
telemetry:
enabled: false
url: ""
batchSize: 100
# In minutes
syncInterval: 30
redis_db: 3
useLayer2Config: true
mandateLayer2Config: true

View File

@@ -0,0 +1,82 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "common.name" . }}
namespace: {{ .Values.global.namespace }}
labels:
{{- include "common.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
strategy:
type: Recreate
{{- end }}
selector:
matchLabels:
{{- include "common.selectorLabels" . | nindent 6 }}
template:
metadata:
annotations:
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "common.labels" . | nindent 8 }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "common.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
initContainers:
- name: retain-schemas-content-ebs-volume
image: {{ .Values.global.image.repository }}
imagePullPolicy: {{ .Values.global.image.pullPolicy }}
command: ['sh', '-c', 'cp -r /usr/src/app/schemas/* /mnt/schemas/']
volumeMounts:
- name: bpp-schemas-efs-volume
mountPath: /mnt/schemas
containers:
- name: {{ .Chart.Name }}
image: {{ .Values.global.image.repository }}
imagePullPolicy: {{ .Values.global.image.pullPolicy }}
ports:
- name: bpp-net-port
containerPort: {{ .Values.service.port }}
protocol: TCP
{{- if .Values.livenessProbe }}
livenessProbe:
{{- toYaml .Values.livenessProbe | nindent 12 }}
{{- end }}
{{- if .Values.readinessProbe }}
readinessProbe:
{{- toYaml .Values.readinessProbe | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
- name: bpp-network-config
mountPath: "/usr/src/app/config/default.yaml"
subPath: default.yaml
readOnly: true
# EFS volumes for L2 schemas
- name: bpp-schemas-efs-volume
mountPath: /usr/src/app/schemas
# EBS volumes for logs
- name: bpp-network-logs-ebs-volume
mountPath: /usr/src/app/logs
volumes:
- name: bpp-network-config
configMap:
name: {{ include "common.name" . }}-config
- name: bpp-schemas-efs-volume
persistentVolumeClaim:
claimName: beckn-onix-bpp-efs-pvc
- name: bpp-network-logs-ebs-volume
persistentVolumeClaim:
claimName: {{ include "common.name" . }}-logs-pvc

View File

@@ -0,0 +1,31 @@
{{- if .Values.global.ingress.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "common.name" . }}-ingress
namespace: {{ .Values.global.namespace }}
labels:
{{- include "common.labels" . | nindent 4 }}
annotations:
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}, {"HTTPS": 443}]'
alb.ingress.kubernetes.io/ssl-policy: ELBSecurityPolicy-TLS-1-1-2017-01
alb.ingress.kubernetes.io/certificate-arn: {{ .Values.global.ingress.tls.certificateArn | quote }}
alb.ingress.kubernetes.io/ssl-redirect: '443'
alb.ingress.kubernetes.io/load-balancer-name: beckn-onix-bpp-network
alb.ingress.kubernetes.io/target-group-attributes: stickiness.enabled=true,stickiness.lb_cookie.duration_seconds=300
alb.ingress.kubernetes.io/target-type: ip
alb.ingress.kubernetes.io/success-codes: 200,302
spec:
ingressClassName: alb
rules:
- http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ include "common.name" . }}-svc
port:
number: {{ .Values.service.port }}
{{- end }}

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ include "common.name" . }}-logs-pvc
namespace: {{ .Values.global.namespace }}
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
storageClassName: gp2

View File

@@ -0,0 +1,16 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "common.name" . }}-svc
namespace: {{ .Values.global.namespace }}
labels:
{{- include "common.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: bpp-net-port
protocol: TCP
name: http
selector:
{{- include "common.selectorLabels" . | nindent 4 }}

View File

@@ -0,0 +1,14 @@
{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "common.serviceAccountName" . }}
namespace: {{ .Values.global.namespace }}
labels:
{{- include "common.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
automountServiceAccountToken: {{ .Values.serviceAccount.automount }}
{{- end }}

View File

@@ -0,0 +1,65 @@
replicaCount: 1
service:
type: ClusterIP
port: 6001
# Supported app mode - bap or bpp. Gateway mode to be either client or network.
app:
mode: bpp
gateway:
mode: network
resources:
# Adjust it as per desired POD resource demand
requests:
cpu: "0.5"
memory: "1Gi"
limits:
cpu: "0.5"
memory: "1Gi"
livenessProbe: {}
# httpGet:
# path: /
# port: http
readinessProbe: {}
# httpGet:
# path: /
# port: http
# To configure HPA
autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 2
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80
serviceAccount:
# Specifies whether a service account should be created
create: false
# Automatically mount a ServiceAccount's API credentials?
automount: 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: {}
podLabels: {}
podSecurityContext: {}
# fsGroup: 2000
securityContext: {}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000
# Default to externalDomain value
subscriber_id:

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: beckn-onix-bpp-efs-pvc
namespace: {{ .Values.global.namespace }}
spec:
accessModes:
- ReadWriteMany
storageClassName: {{ include "common.name" . }}-efs-storageclass
resources:
requests:
storage: 5Gi

View File

@@ -0,0 +1,9 @@
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: {{ include "common.name" . }}-efs-storageclass
provisioner: efs.csi.aws.com
parameters:
provisioningMode: efs-ap
fileSystemId: {{ .Values.global.efs.fileSystemId }}
directoryPerms: "755"

View File

@@ -0,0 +1,6 @@
apiVersion: v1
kind: Namespace
metadata:
name: {{ .Values.global.namespace }}
labels:
{{- include "common.labels" . | nindent 4 }}

View File

@@ -0,0 +1,9 @@
apiVersion: v1
kind: Secret
metadata:
name: beckn-onix-bpp-secret
namespace: {{ .Values.global.namespace }}
type: Opaque
data:
privateKey: {{ .Values.global.bpp.publicKey | b64enc | quote }}
publicKey: {{ .Values.global.bpp.privateKey | b64enc | quote }}

View File

@@ -0,0 +1,70 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"global": {
"type": "object",
"properties": {
"externalDomain": {
"type": "string",
"description": "The external domain for the BPP network."
},
"registry_url": {
"type": "string",
"description": "The URL for the registry."
},
"ingress": {
"type": "object",
"properties": {
"tls": {
"type": "object",
"properties": {
"certificateArn": {
"type": "string",
"description": "The ARN of the TLS certificate for ingress."
}
},
"required": ["certificateArn"],
"description": "TLS configuration for ingress."
}
},
"required": ["tls"],
"description": "Ingress-related configuration."
},
"efs": {
"type": "object",
"properties": {
"fileSystemId": {
"type": "string",
"description": "The EFS FileSystem ID."
}
},
"required": ["fileSystemId"],
"description": "EFS-related configuration."
},
"bpp": {
"type": "object",
"properties": {
"privateKey": {
"type": "string",
"description": "The private key for BPP."
},
"publicKey": {
"type": "string",
"description": "The public key for BPP."
}
},
"required": ["privateKey", "publicKey"],
"description": "Keys for BPP, including both private and public keys."
}
},
"required": [
"externalDomain",
"registry_url",
"ingress",
"efs",
"bpp"
]
}
}
}

View File

@@ -0,0 +1,63 @@
# Default values for registry.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
global:
namespace: beckn-onix-bpp
image:
repository: fidedocker/protocol-server
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
# tag: ""
# Redis connection details
redisCache:
host: redis-master.bpp-common-services.svc.cluster.local
port: 6379
# Mongodb connection details
responseCacheMongo:
host: mongodb.bpp-common-services.svc.cluster.local
port: 27017
dbname: protocol_server
username: root
password:
# RabbitMQ connection details
rabbitMQamqp:
host: rabbitmq.bpp-common-services.svc.cluster.local
port: 5672
username: beckn
password:
# Ingress definition for AWS Application Loadbalancer.
# This is required for each component available over the public network.
ingress:
enabled: true # If enabled, ALB will be provisioned as per ingress.yaml. Without ingress service will be scoped to K8s cluster.
tls:
# Must be set while installing Helm chart. SSL certificate ARN (e.g. arn:aws:acm:region:account-id:certificate/certificate-id) from AWS Certificate Manager - https://aws.amazon.com/certificate-manager/
certificateArn:
sslRedirect: true # Set to true to enable SSL redirection, useful for UI redirection.
# Must be set while installing Helm chart
externalDomain:
registry_url:
bpp:
privateKey:
publicKey:
efs:
fileSystemId:
# BPP subscribe_id. Default to externalDomain value.
subscriber_id:
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
nodeSelector: {}
tolerations: []
affinity: {}

View File

@@ -0,0 +1,24 @@
apiVersion: v2
name: beckn-onix-gateway
description: Beckn ONIX Gateway 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.0.0"

View File

@@ -0,0 +1,9 @@
Get the Beckn-ONIX Gateway URL by running these commands:
{{- if .Values.ingress.enabled }}
export INGRESS_HOST=$(kubectl get ingress {{ include "common.name" . }}-ingress -n {{ .Values.namespace }} -o jsonpath="{.status.loadBalancer.ingress[0].hostname}"){{ "\n" }}
{{- if .Values.ingress.tls.enabled }}
echo "https://$INGRESS_HOST"{{ "\n" }}
{{- else }}
echo "http://$INGRESS_HOST"{{ "\n" }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,75 @@
{{/*
Expand the name of the chart or use a provided override.
*/}}
{{- define "common.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Create a default fully qualified app name, with truncation to 63 characters.
*/}}
{{- define "common.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 }}
{{/*
Generate a chart name and version label.
*/}}
{{- define "common.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels to be used in all charts.
*/}}
{{- define "common.labels" -}}
helm.sh/chart: {{ include "common.chart" . }}
{{ include "common.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/release: {{ .Release.Revision | quote }}
{{- end }}
{{/*
Common selector labels.
*/}}
{{- define "common.selectorLabels" -}}
app.kubernetes.io/name: {{ include "common.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{/*
Helper for creating service account names.
*/}}
{{- define "common.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "common.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
{{/*
Helper for image names and tags.
*/}}
{{- define "common.image" -}}
{{ printf "%s:%s" .Values.image.repository .Values.image.tag }}
{{- end }}
{{/*
Helper for constructing resource names with prefixes or suffixes.
*/}}
{{- define "common.resourceName" -}}
{{- printf "%s-%s" (include "common.fullname" .) .Values.suffix | trunc 63 | trimSuffix "-" }}
{{- end }}

View File

@@ -0,0 +1,18 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "common.name" . }}-onixjson-config
namespace: {{ .Values.namespace }}
data:
onix.json: |
{
"core_version": "1.1.0",
"registry_id": "{{ .Values.registry_url | default "localhost" | replace "http://" "" | replace "https://" "" }}..LREG",
"search_provider_id": "{{ .Values.externalDomain }}",
"self_registration_supported": true,
"subscription_needed_post_registration": true,
"base_url": "{{ .Values.registry_url | default "localhost" }}",
"registry_url": "{{ .Values.registry_url | default "localhost" }}/subscribers",
"extension_package": "in.succinct.beckn.boc",
"wild_card": ""
}

View File

@@ -0,0 +1,34 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "common.name" . }}-config
namespace: {{ .Values.namespace }}
data:
swf.properties: |
swf.load.complete.config.tables.if.count.less.than=500
swf.user.password.encrypted=false
swf.plugins.background.core.workers.numThreads=3
swf.application.authentication.required=false
swf.application.requires.registration=true
swf.host={{ .Values.externalDomain }}
swf.external.port=443
swf.external.scheme=https
swf.jdbc.dbschema=public
swf.jdbc.dbschema.setonconnection=true
swf.jdbc.set.dbschema.command=set search_path to 'public'
swf.jdbc.url=jdbc:postgresql://{{ .Values.database.host }}/{{ .Values.database.dbname }}
swf.jdbc.driver=org.postgresql.Driver
swf.jdbc.userid={{ .Values.database.username }}
swf.jdbc.password={{ .Values.database.password }}
swf.jdbc.readOnly=false
swf.api.keys.case=SNAKE
swf.api.root.required=false
swf.encryption.support=false
swf.ftl.dir=src/main/resources/templates
beckn.auth.enabled=true
in.succinct.beckn.gateway.subscriber_id={{ .Values.externalDomain }}
in.succinct.beckn.gateway.public_key_id={{ .Values.externalDomain }}.k1
in.succinct.onet.country.iso.3=IND
in.succinct.onet.country.iso.2=IN
in.succinct.onet.name=onix

View File

@@ -0,0 +1,70 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "common.name" . }}
namespace: {{ .Values.namespace }}
labels:
{{- include "common.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
selector:
matchLabels:
{{- include "common.selectorLabels" . | nindent 6 }}
template:
metadata:
annotations:
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "common.labels" . | nindent 8 }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "common.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
image: {{ .Values.image.repository }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: gateway-port
containerPort: {{ .Values.service.port }}
protocol: TCP
- name: sec-gtw-port
containerPort: {{ .Values.service.secondaryPort }}
protocol: TCP
{{- if .Values.livenessProbe }}
livenessProbe:
{{- toYaml .Values.livenessProbe | nindent 12 }}
{{- end }}
{{- if .Values.readinessProbe }}
readinessProbe:
{{- toYaml .Values.readinessProbe | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
- name: gateway-config
mountPath: "/gateway/overrideProperties/config/swf.properties"
subPath: swf.properties
readOnly: true
- name: onixjson-config
mountPath: "/gateway/overrideProperties/config/networks/onix.json"
subPath: onix.json
readOnly: true
volumes:
- name: gateway-config
configMap:
name: {{ include "common.name" . }}-config
- name: onixjson-config
configMap:
name: {{ include "common.name" . }}-onixjson-config

View File

@@ -0,0 +1,32 @@
{{- if .Values.ingress.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "common.name" . }}-ingress
namespace: {{ .Values.namespace }}
labels:
{{- include "common.labels" . | nindent 4 }}
annotations:
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}, {"HTTPS": 443}]'
alb.ingress.kubernetes.io/ssl-policy: ELBSecurityPolicy-TLS-1-1-2017-01
alb.ingress.kubernetes.io/certificate-arn: {{ .Values.ingress.tls.certificateArn | quote }}
alb.ingress.kubernetes.io/ssl-redirect: '443'
alb.ingress.kubernetes.io/group.name: beckn-onix-gateway
alb.ingress.kubernetes.io/load-balancer-name: beckn-onix-gateway
alb.ingress.kubernetes.io/target-group-attributes: stickiness.enabled=true,stickiness.lb_cookie.duration_seconds=300
alb.ingress.kubernetes.io/target-type: ip
alb.ingress.kubernetes.io/success-codes: 200,302
spec:
ingressClassName: alb
rules:
- http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ include "common.name" . }}-svc
port:
number: {{ .Values.service.port }}
{{- end }}

View File

@@ -0,0 +1,6 @@
apiVersion: v1
kind: Namespace
metadata:
name: {{ .Values.namespace }}
labels:
{{- include "common.labels" . | nindent 4 }}

View File

@@ -0,0 +1,16 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "common.name" . }}-svc
namespace: {{ .Values.namespace }}
labels:
{{- include "common.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: gateway-port
protocol: TCP
name: http
selector:
{{- include "common.selectorLabels" . | nindent 4 }}

View File

@@ -0,0 +1,14 @@
{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "registry.serviceAccountName" . }}
namespace: {{- toYaml .Values.namespace | nindent 2 }}
labels:
{{- include "registry.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
automountServiceAccountToken: {{ .Values.serviceAccount.automount }}
{{- end }}

View File

@@ -0,0 +1,53 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"externalDomain": {
"type": "string",
"description": "The external domain for the gateway."
},
"registry_url": {
"type": "string",
"description": "The URL of the registry."
},
"database": {
"type": "object",
"properties": {
"host": {
"type": "string",
"description": "The hostname of the RDS PostgreSQL database."
},
"password": {
"type": "string",
"description": "The password for the RDS PostgreSQL database."
}
},
"required": ["host", "password"],
"description": "Database configuration for the gateway."
},
"ingress": {
"type": "object",
"properties": {
"tls": {
"type": "object",
"properties": {
"certificateArn": {
"type": "string",
"description": "The ARN of the TLS certificate for ingress."
}
},
"required": ["certificateArn"],
"description": "TLS configuration for ingress."
}
},
"required": ["tls"],
"description": "Ingress-related configuration."
}
},
"required": [
"externalDomain",
"registry_url",
"database",
"ingress"
]
}

View File

@@ -0,0 +1,101 @@
# Default values for registry.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
namespace: beckn-onix-gateway
image:
repository: fidedocker/gateway
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: false
# Automatically mount a ServiceAccount's API credentials?
automount: 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: {}
podLabels: {}
podSecurityContext: {}
# fsGroup: 2000
securityContext: {}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000
service:
type: ClusterIP
port: 4030
secondaryPort: 4000
# Ingress definition for AWS Application Loadbalancer
ingress:
enabled: true # If enabled, HTTP port 80 listener is open on AWS ALB. Set to false to disable Ingress. Without ingress service will be scoped to K8s cluster.
tls:
enabled: false # Set to true to enable TLS with Aamzon Certificate Manager (ACM)
certificateArn: arn:aws:acm:ap-south-1:365975017663:certificate/04d1ef71-8407-495b-82f0-4eded8694189 # SSL certificate location if tls is enabled
sslRedirect: true # Set to true to enable SSL redirection
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:'.
requests:
cpu: "0.5"
memory: "1Gi"
limits:
cpu: "1"
memory: "2Gi"
livenessProbe: {}
# httpGet:
# path: /
# port: http
readinessProbe: {}
# httpGet:
# path: /
# port: http
autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 2
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80
# Gateway AWS RDS Postgres connection details
database:
host:
dbname: gateway
username: postgres
password:
registry_url:
nodeSelector: {}
tolerations: []
affinity: {}
# Gateway external domain/sub-domain value. Supply the actual value during Helm install "--set externalDomain=<domain-name>"
externalDomain:

3
aws-cdk/helm/index.yaml Normal file
View File

@@ -0,0 +1,3 @@
apiVersion: v1
entries: {}
generated: "2024-09-19T18:47:38.402391+05:30"

View File

@@ -0,0 +1,24 @@
apiVersion: v2
name: beckn-onix-registry
description: Beckn ONIX Registry 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.0.0"

View File

@@ -0,0 +1,11 @@
{{ "\n" }}
Get the Beckn-ONIX Registry URL by running these commands:
{{ "\n" }}
{{- if .Values.ingress.enabled }}
export INGRESS_HOST=$(kubectl get ingress {{ include "common.name" . }}-ingress -n {{ .Values.namespace }} -o jsonpath="{.status.loadBalancer.ingress[0].hostname}")
{{- if .Values.ingress.tls.enabled }}
echo "https://$INGRESS_HOST"
{{- else }}
echo "http://$INGRESS_HOST"
{{- end }}
{{- end }}

View File

@@ -0,0 +1,75 @@
{{/*
Expand the name of the chart or use a provided override.
*/}}
{{- define "common.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Create a default fully qualified app name, with truncation to 63 characters.
*/}}
{{- define "common.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 }}
{{/*
Generate a chart name and version label.
*/}}
{{- define "common.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels to be used in all charts.
*/}}
{{- define "common.labels" -}}
helm.sh/chart: {{ include "common.chart" . }}
{{ include "common.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/release: {{ .Release.Revision | quote }}
{{- end }}
{{/*
Common selector labels.
*/}}
{{- define "common.selectorLabels" -}}
app.kubernetes.io/name: {{ include "common.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{/*
Helper for creating service account names.
*/}}
{{- define "common.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "common.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
{{/*
Helper for image names and tags.
*/}}
{{- define "common.image" -}}
{{ printf "%s:%s" .Values.image.repository .Values.image.tag }}
{{- end }}
{{/*
Helper for constructing resource names with prefixes or suffixes.
*/}}
{{- define "common.resourceName" -}}
{{- printf "%s-%s" (include "common.fullname" .) .Values.suffix | trunc 63 | trimSuffix "-" }}
{{- end }}

View File

@@ -0,0 +1,27 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "common.name" . }}-config
namespace: {{ .Values.namespace }}
data:
swf.properties: |
swf.load.complete.config.tables.if.count.less.than=500
swf.user.password.encrypted=false
swf.plugins.background.core.workers.numThreads=3
swf.application.authentication.required=false
swf.application.requires.registration=true
swf.host={{ .Values.externalDomain }}
swf.external.port=443
swf.external.scheme=https
swf.jdbc.dbschema=public
swf.jdbc.dbschema.setonconnection=true
swf.jdbc.set.dbschema.command=set search_path to 'public'
swf.jdbc.url=jdbc:postgresql://{{ .Values.database.host }}/{{ .Values.database.dbname }}
swf.jdbc.driver=org.postgresql.Driver
swf.jdbc.userid={{ .Values.database.username }}
swf.jdbc.password={{ .Values.database.password }}
swf.jdbc.readOnly=false
swf.api.keys.case=SNAKE
swf.api.root.required=false
swf.encryption.support=false
swf.ftl.dir=src/main/resources/templates

View File

@@ -0,0 +1,63 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "common.name" . }}
namespace: {{ .Values.namespace }}
labels:
{{- include "common.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
selector:
matchLabels:
{{- include "common.selectorLabels" . | nindent 6 }}
template:
metadata:
annotations:
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "common.labels" . | nindent 8 }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "common.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
image: {{ .Values.image.repository }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: registry-port
containerPort: {{ .Values.service.port }}
protocol: TCP
- name: sec-reg-port
containerPort: {{ .Values.service.secondaryPort }}
protocol: TCP
{{- if .Values.livenessProbe }}
livenessProbe:
{{- toYaml .Values.livenessProbe | nindent 12 }}
{{- end }}
{{- if .Values.readinessProbe }}
readinessProbe:
{{- toYaml .Values.readinessProbe | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
- name: registry-config
mountPath: "/registry/overrideProperties/config/swf.properties"
subPath: swf.properties
readOnly: true
volumes:
- name: registry-config
configMap:
name: {{ include "common.name" . }}-config

View File

@@ -0,0 +1,32 @@
{{- if .Values.ingress.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "common.name" . }}-ingress
namespace: {{ .Values.namespace }}
labels:
{{- include "common.labels" . | nindent 4 }}
annotations:
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}, {"HTTPS": 443}]'
alb.ingress.kubernetes.io/ssl-policy: ELBSecurityPolicy-TLS-1-1-2017-01
alb.ingress.kubernetes.io/certificate-arn: {{ .Values.ingress.tls.certificateArn | quote }}
alb.ingress.kubernetes.io/ssl-redirect: '443'
alb.ingress.kubernetes.io/group.name: beckn-onix-registry
alb.ingress.kubernetes.io/load-balancer-name: beckn-onix-registry
alb.ingress.kubernetes.io/target-group-attributes: stickiness.enabled=true,stickiness.lb_cookie.duration_seconds=300
alb.ingress.kubernetes.io/target-type: ip
alb.ingress.kubernetes.io/success-codes: 200,302
spec:
ingressClassName: alb
rules:
- http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ include "common.name" . }}-svc
port:
number: {{ .Values.service.port }}
{{- end }}

View File

@@ -0,0 +1,6 @@
apiVersion: v1
kind: Namespace
metadata:
name: {{ .Values.namespace }}
labels:
{{- include "common.labels" . | nindent 4 }}

View File

@@ -0,0 +1,16 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "common.name" . }}-svc
namespace: {{ .Values.namespace }}
labels:
{{- include "common.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: registry-port
protocol: TCP
name: http
selector:
{{- include "common.selectorLabels" . | nindent 4 }}

View File

@@ -0,0 +1,14 @@
{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "common.serviceAccountName" . }}
namespace: {{ .Values.namespace }}
labels:
{{- include "common.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
automountServiceAccountToken: {{ .Values.serviceAccount.automount }}
{{- end }}

View File

@@ -0,0 +1,48 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"externalDomain": {
"type": "string",
"description": "The external domain for the registry."
},
"database": {
"type": "object",
"properties": {
"host": {
"type": "string",
"description": "The hostname of the RDS PostgreSQL database."
},
"password": {
"type": "string",
"description": "The password for the RDS PostgreSQL database."
}
},
"required": ["host", "password"],
"description": "Database configuration for the registry."
},
"ingress": {
"type": "object",
"properties": {
"tls": {
"type": "object",
"properties": {
"certificateArn": {
"type": "string",
"description": "The ARN of the TLS certificate for ingress."
}
},
"required": ["certificateArn"],
"description": "TLS configuration for ingress."
}
},
"required": ["tls"],
"description": "Ingress-related configuration."
}
},
"required": [
"externalDomain",
"database",
"ingress"
]
}

View File

@@ -0,0 +1,99 @@
# Default values for registry.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
namespace: beckn-onix-registry
image:
repository: fidedocker/registry
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: false
# Automatically mount a ServiceAccount's API credentials?
automount: 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: {}
podLabels: {}
podSecurityContext: {}
# fsGroup: 2000
securityContext: {}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000
service:
type: ClusterIP
port: 3030
secondaryPort: 3000
# Ingress definition for AWS Application Loadbalancer
ingress:
enabled: true # If enabled, HTTP port 80 listener is open on AWS ALB. Set to false to disable Ingress. Without ingress service will be scoped to K8s cluster.
tls:
enabled: true # Set to true to enable TLS with Aamzon Certificate Manager (ACM)
# SSL certificate location if tls is enabled
certificateArn:
sslRedirect: true # Set to true to enable SSL redirection
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:'.
requests:
cpu: "0.5"
memory: "1Gi"
limits:
cpu: "1"
memory: "2Gi"
livenessProbe: {}
# httpGet:
# path: /
# port: http
readinessProbe: {}
# httpGet:
# path: /
# port: http
autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 2
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80
# Registry AWS RDS Postgres connection details
database:
host:
dbname: registry
username: postgres
password:
nodeSelector: {}
tolerations: []
affinity: {}
# Registry external domain/sub-domain value. Supply the actual value during Helm install "--set externalDomain=<domain-name>"
externalDomain: