Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updating devops file of project-factory #256

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
apiVersion: v2
name: project-factory
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.
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.
appVersion: 1.16.0

dependencies:
- name: common
version: 0.0.5
repository: file://../../common
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a newline at the end of the file.

Ensure the file ends with a newline character to comply with POSIX standards.

+ 
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
repository: file://../../common
repository: file://../../common
Tools
yamllint

[error] 26-26: no new line character at the end of file

(new-line-at-end-of-file)

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# deployment.yaml
{{- template "common.deployment" . -}}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix the syntax error in the template directive.

The - character after the template directive might be causing a syntax error. Consider removing it if not needed.

-{{- template "common.deployment" . -}}
+{{ template "common.deployment" . }}
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{{- template "common.deployment" . -}}
{{ template "common.deployment" . }}
Tools
yamllint

[error] 2-2: syntax error: expected the node content, but found '-'

(syntax)

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# ingress.yaml
{{- template "common.ingress" . -}}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix the syntax error in the template directive.

The - character after the template directive might be causing a syntax error. Consider removing it if not needed.

-{{- template "common.ingress" . -}}
+{{ template "common.ingress" . }}
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{{- template "common.ingress" . -}}
{{ template "common.ingress" . }}
Tools
yamllint

[error] 2-2: syntax error: expected the node content, but found '-'

(syntax)

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# service.yaml
{{- template "common.service" . -}}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix the syntax error in the template directive.

The - character after the template directive might be causing a syntax error. Consider removing it if not needed.

-{{- template "common.service" . -}}
+{{ template "common.service" . }}
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{{- template "common.service" . -}}
{{ template "common.service" . }}
Tools
yamllint

[error] 2-2: syntax error: expected the node content, but found '-'

(syntax)

274 changes: 274 additions & 0 deletions deploy-as-code/helm/charts/health-services/project-factory/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,274 @@
# Common Labels
labels:
app: "project-factory"
group: "rainmaker"

namespace: health

# Ingress Configs
ingress:
namespace: egov
enabled: true
zuul: true
context: "project-factory"

# Init Containers Configs
initContainers:
dbMigration:
enabled: true
schemaTable: "project_factory_health_schema"
image:
repository: "project-factory-db"

# Container Configs
image:
repository: "project-factory"
replicas: "1"

# Additional Container Envs
env: |
- name: KAFKA_BROKER_HOST
valueFrom:
configMapKeyRef:
name: egov-config
key: kafka-brokers
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove trailing spaces.

Trailing spaces are present in multiple lines. Removing them improves code cleanliness and prevents potential issues with version control systems.

-        key: kafka-brokers 
+        key: kafka-brokers
-        key: egov-mdms-service   
+        key: egov-mdms-service
-        key: mdms-service-v2      
+        key: mdms-service-v2
-      secretKeyRef: 
+      secretKeyRef:
-    valueFrom: 
+    valueFrom:
-        key: password   
+        key: password
-    value: {{ .Values.splitBoundariesOn | default "Distrito" }} 
+    value: {{ .Values.splitBoundariesOn | default "Distrito" }}
-    value: {{ .Values.defaultLocale | default "en_IN" }} 
+    value: {{ .Values.defaultLocale | default "en_IN" }}
-    value: "userSchema" 
+    value: "userSchema"
-    value: {{ .Values.logLevel | default "info" }} 
+    value: {{ .Values.logLevel | default "info" }}
-    value: "Read Me"  
+    value: "Read Me"
-    value: "true"  
+    value: "true"
-    value: "eGov@123"  
+    value: "eGov@123"
-    
+
-    value: "true"  
+    value: "true"
-    value: "true"  
+    value: "true"

Also applies to: 43-43, 48-48, 170-170, 174-175, 197-197, 205-206, 215-215, 223-223, 225-225, 229-229, 231-231, 233-233, 238-238, 251-251, 254-254

Tools
yamllint

[error] 34-34: trailing spaces

(trailing-spaces)

- name: KAFKA_SAVE_CAMPAIGN_DETAILS_TOPIC
value: save-campaign-details
- name: KAFKA_UPDATE_CAMPAIGN_DETAILS_TOPIC
value: update-campaign-details
- name: EGOV_MDMS_HOST
valueFrom:
configMapKeyRef:
name: egov-service-host
key: egov-mdms-service
- name: EGOV_MDMS_V2_HOST
valueFrom:
configMapKeyRef:
name: egov-service-host
key: mdms-service-v2
- name: EGOV_FILESTORE_SERVICE_HOST
valueFrom:
configMapKeyRef:
name: egov-service-host
key: egov-filestore
- name: EGOV_IDGEN_HOST
valueFrom:
configMapKeyRef:
name: egov-service-host
key: egov-idgen
- name: EGOV_FACILITY_HOST
valueFrom:
configMapKeyRef:
name: egov-service-host
key: facility
- name: EGOV_BOUNDARY_HOST
valueFrom:
configMapKeyRef:
name: egov-service-host
key: boundary-service
- name: EGOV_PROJECT_HOST
valueFrom:
configMapKeyRef:
name: egov-service-host
key: health-project
- name: EGOV_USER_HOST
valueFrom:
configMapKeyRef:
name: egov-service-host
key: egov-user
- name: EGOV_PRODUCT_HOST
valueFrom:
configMapKeyRef:
name: egov-service-host
key: product
- name: EGOV_HRMS_HOST
valueFrom:
configMapKeyRef:
name: egov-service-host
key: health-hrms
- name: EGOV_LOCALIZATION_HOST
valueFrom:
configMapKeyRef:
name: egov-service-host
key: egov-localization
- name: EGOV_HEALTH_INDIVIDUAL_HOST
valueFrom:
configMapKeyRef:
name: egov-service-host
key: health-individual
- name: EGOV_AUDIT_HOST
valueFrom:
configMapKeyRef:
name: egov-service-host
key: audit-service
- name: CONTEXT_PATH
value: "/project-factory"
- name: FILE_STORE_SERVICE_END_POINT
value: filestore/v1/files
- name: EGOV_MDMS_SEARCH_ENDPOINT
value: egov-mdms-service/v2/_search
- name: EGOV_IDGEN_PATH
value: egov-idgen/id/_generate
- name: EGOV_MDMS_SCHEMA_PATH
value: egov-mdms-service/schema/v1/_search
- name: EGOV_BOUNDARY_RELATIONSHIP_SEARCHPATH
value: boundary-service/boundary-relationships/_search
- name: EGOV_BOUNDARY_SERVICE_SEARCHPATH
value: boundary-service/boundary/_search
- name: EGOV_BOUNDARY_HIERARCHY_SEARCHPATH
value: boundary-service/boundary-hierarchy-definition/_search
- name: HEALTH_PROJECT_CREATE_PATH
value: health-project/v1/_create
- name: EGOV_PROJECT_STAFF_CREATE_PATH
value: health-project/staff/v1/_create
- name: EGOV_PROJECT_RESOURCE_CREATE_PATH
value: health-project/resource/v1/_create
- name: EGOV_PROJECT_RESOURCE_FACILITY_PATH
value: health-project/facility/v1/_create
- name: EGOV_USER_SEARCH_PATH
value: user/_search
- name: EGOV_FACILITY_SEARCH_PATH
value: facility/v1/_search
- name: EGOV_PRODUCT_VARIANT_SEARCH_PATH
value: product/variant/v1/_search
- name: EGOV_BOUNDARY_ENTITY_SEARCHPATH
value: boundary-service/boundary/_search
- name: EGOV_FACILITY_BULK_CREATE
value: facility/v1/bulk/_create
- name: EGOV_HEALTH_INDIVIDUAL_SEARCH
value: health-individual/v1/_search
- name: CMP_IDGEN_FORMAT
value: CMP-[cy:yyyy-MM-dd]-[SEQ_EG_CMP_ID]
- name: CMP_IDGEN_IDNAME
value: campaign.number
- name: EGOV_HOST
valueFrom:
configMapKeyRef:
name: egov-config
key: egov-services-fqdn-name
- name: "DB_URL"
{{- if eq .Values.namespace "health" }}
valueFrom:
configMapKeyRef:
name: egov-config
key: health-db-url
{{- else }}
valueFrom:
configMapKeyRef:
name: egov-config
key: db-url
{{- end }}
- name: "SCHEMA_TABLE"
value: {{ .Values.initContainers.dbMigration.schemaTable | quote }}
- name: "FLYWAY_USER"
valueFrom:
secretKeyRef:
name: db
key: flyway-username
- name: "FLYWAY_PASSWORD"
valueFrom:
secretKeyRef:
name: db
key: flyway-password
- name: "FLYWAY_LOCATIONS"
valueFrom:
configMapKeyRef:
name: egov-config
key: flyway-locations
- name: DB_HOST
valueFrom:
configMapKeyRef:
name: egov-config
key: db-host
- name: DB_NAME
valueFrom:
configMapKeyRef:
name: egov-config
key: db-name
- name: DB_USER
valueFrom:
secretKeyRef:
name: db
key: username
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: db
key: password
- name: DB_PORT
value: "5432"
- name: DB_SCHEMA
value: {{ .Values.namespace | default "public" }}
- name: BOUNDARY_MAIN_SHEET_NAME
value: "Boundary Data"
- name: SPLIT_BOUNDARIES_ON
value: {{ .Values.splitBoundariesOn | default "Distrito" }}
- name: SPLIT_BOUNDARIES_ON_LENGTH
value: "2"
- name: FACILITY_TAB_NAME
value: "HCM_ADMIN_CONSOLE_FACILITIES"
- name: BOUNDARY_TAB_NAME
value: "HCM_ADMIN_CONSOLE_BOUNDARY_DATA"
- name: USER_TAB_NAME
value: "HCM_ADMIN_CONSOLE_USER_LIST"
- name: LOCALE
value: {{ .Values.defaultLocale | default "en_IN" }}
- name: LOCALIZATION_MODULE
value: "rainmaker-hcm-admin-schemas"
- name: MODULE_NAME
value: "HCM-ADMIN-CONSOLE"
- name: FACILITY_SCHEMA_MASTER
value: "facilitySchema"
- name: USER_SCHEMA_MASTER
value: "userSchema"
- name: APP_LOG_LEVEL
value: {{ .Values.logLevel | default "info" }}
- name: APP_MAX_DEBUG_CHAR
value: "{{ .Values.maxDebugChar | default "500" }}"
- name: READ_ME_TAB
value: "Read Me"
- name: USER_PASSWORD_AUTO_GENERATE
value: "true"
- name: USER_DEFAULT_PASSWORD
value: "eGov@123"
- name: NOT_CREATE_USER_IF_ALREADY_THERE
value: "true"
- name: MAP_USER_VIA_COMMON_PARENT
value: "true"

- name: CACHE_ENABLED
value: "true"
- name: RESET_CACHE
value: "true"
- name: REDIS_PORT
value: "6379"
- name: REDIS_HOST
value: "redis.backbone"
- name: ENABLE_DYNAMIC_TEMPLATE_FOR
value: "MR-DN"
- name: IS_CALL_GENERATE_WHEN_DELIVERY_CONDITIONS_DIFFER
value: "true"
- name: EXCLUDE_HIERARCHY_TYPE_FROM_BOUNDARY_CODES
value: "true"
- name: EXCLUDE_BOUNDARY_NAME_AT_LAST_FROM_BOUNDARY_CODES
value: "true"

apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
name: project-factory-hpa
namespace: "health"
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: project-factory
minReplicas: 1
maxReplicas: 5
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 80
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a newline at the end of the file.

Ensure the file ends with a newline character to comply with POSIX standards.

+ 
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
averageUtilization: 80
averageUtilization: 80
Tools
yamllint

[error] 274-274: no new line character at the end of file

(new-line-at-end-of-file)