Skip to content

Commit

Permalink
Merge dev into uat (#113)
Browse files Browse the repository at this point in the history
Co-authored-by: LuciaM1 <[email protected]>
Co-authored-by: GitHub Action <[email protected]>
Co-authored-by: Lucia Mazzocchi <[email protected]>
Co-authored-by: Simone Munao <[email protected]>
Co-authored-by: Escarsel <[email protected]>
Co-authored-by: Elis Kina <[email protected]>
Co-authored-by: GabrieleMaiocchiFilippo <[email protected]>
Co-authored-by: Gabriele Maiocchi <[email protected]>
Co-authored-by: SMANUM <[email protected]>
  • Loading branch information
10 people authored Jan 15, 2024
1 parent 8817846 commit b92da9b
Show file tree
Hide file tree
Showing 16 changed files with 14,846 additions and 14,763 deletions.
2 changes: 1 addition & 1 deletion helm-chart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ 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: v1.4.0-dev.3
version: v1.4.0-dev.4
# 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.
Expand Down
10 changes: 7 additions & 3 deletions helm-chart/environments/values-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,15 @@ resources: {}
# memory: 128Mi

autoscaling:
enabled: false
enabled: true
minReplicas: 1
maxReplicas: 100
maxReplicas: 2
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80
targetMemoryUtilizationPercentage: 80
memoryLimits: 600Mi
memoryRequests: 300Mi
cpuLimits: 600m
cpuRequest: 300m

nodeSelector: {}

Expand Down
12 changes: 8 additions & 4 deletions helm-chart/environments/values-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,15 @@ resources: {}
# memory: 128Mi

autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 100
enabled: true
minReplicas: 2
maxReplicas: 4
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80
targetMemoryUtilizationPercentage: 80
memoryLimits: 600Mi
memoryRequests: 300Mi
cpuLimits: 600m
cpuRequest: 300m

nodeSelector: {}

Expand Down
12 changes: 8 additions & 4 deletions helm-chart/environments/values-uat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,15 @@ resources: {}
# memory: 128Mi

autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 100
enabled: true
minReplicas: 2
maxReplicas: 4
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80
targetMemoryUtilizationPercentage: 80
memoryLimits: 600Mi
memoryRequests: 300Mi
cpuLimits: 600m
cpuRequest: 300m

nodeSelector: {}

Expand Down
10 changes: 8 additions & 2 deletions helm-chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ metadata:
{{- toYaml .Values.deployment.annotations | nindent 4 }}

spec:
replicas: {{ .Values.replicaCount }}
# replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
App: {{ .Values.deployment.name }}
Expand Down Expand Up @@ -69,11 +69,17 @@ spec:
secretKeyRef:
name: {{ .Values.cdn.credentialsSecretName }}
key: {{ .Values.cdn.credentialsSecretKeys.cdn_base_path }}

volumeMounts:
- name: secrets-store-inline
mountPath: "/mnt/secrets-store"
readOnly: true
resources:
limits:
cpu: {{ .Values.autoscaling.cpuLimits }}
memory: {{ .Values.autoscaling.memoryLimits }}
requests:
cpu: {{ .Values.autoscaling.cpuRequest }}
memory: {{ .Values.autoscaling.memoryRequests }}

strategy:
type: Recreate
10 changes: 7 additions & 3 deletions helm-chart/templates/hpa.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- if .Values.autoscaling.enabled }}
apiVersion: autoscaling/v2beta1
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "atm-layer-model.fullname" . }}
Expand All @@ -17,12 +17,16 @@ spec:
- type: Resource
resource:
name: cpu
targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
target:
type: Utilization
averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
target:
type: Utilization
averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}
1 change: 0 additions & 1 deletion performance_test/functions/Bpmn/BPMN_associate.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ export function associateRouteBpmn(baseUrl, token, acquirerId, tagName, version)

const response = http.put(url, generateAssociationBody(deployedBpmn.bpmnId), params);

console.error();
console.log('Response status ASSOCIATE:', response.request);
console.log('Response status ASSOCIATE:', response.status);
console.log('Response body ASSOCIATE:', response.body);
Expand Down
1 change: 0 additions & 1 deletion performance_test/functions/Bpmn/BPMN_create.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export function createBpmn(baseUrl, token, fileBpmn) {

const response = http.post(`${baseUrl}/bpmn`, fd.body(), params);

console.error();
console.log('Response request Resource CREATE:', response.request);
console.log('Response status Resource CREATE:', response.status);
console.log('Response body Resource CREATE:', response.body);
Expand Down
1 change: 0 additions & 1 deletion performance_test/functions/Bpmn/BPMN_deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export function deployBpmn(baseUrl, token, tagName, version) {

const response = http.post(url, fd.body(), params);

console.error();
console.log('Response status DEPLOY:', response.request);
console.log('Response status DEPLOY:', response.status);
console.log('Response body DEPLOY:', response.body);
Expand Down
1 change: 0 additions & 1 deletion performance_test/functions/Resources/RESOUCRES_update.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export function updateHtmlResource(baseUrl, token) {

const response = http.put(`${baseUrl}/resources/${resourceId}`, fd.body(), params);

console.error();
console.log('Response request Resource UPDATE:', response.request);
console.log('Response status Resource UPDATE:', response.status);
console.log('Response body Resource UPDATE:', response.body);
Expand Down
1 change: 0 additions & 1 deletion performance_test/functions/Resources/RESOURCES_create.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export function createHtmlResource(baseUrl, token, file) {

const response = http.post(`${baseUrl}/resources`, fd.body(), params);

console.error();
console.log('Response request Resource CREATE:', response.request);
console.log('Response status Resource CREATE:', response.status);
console.log('Response body Resource CREATE:', response.body);
Expand Down
8 changes: 4 additions & 4 deletions performance_test/options_settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const nameThresholds={

'http_req_duration{name:BPMNdeploy}': ['p(95)<10000'],
'http_req_waiting{name:BPMNdeploy}':['p(95)<10000'],
// 'http_req_failed{name:BPMNdeploy}':['rate<0.01'],
'http_req_failed{name:BPMNdeploy}':['rate<0.5'],
'http_reqs{name:BPMNdeploy}':[],

'http_req_duration{name:BPMNassociate}': ['p(95)<10000'],
Expand Down Expand Up @@ -48,9 +48,9 @@ export const nameThresholds={
export const average_load = {
executor: 'ramping-vus',
stages: [
{ duration: '2s', target: 20 },
{ duration: '5s', target: 20 },
{ duration: '5s', target: 0 },
{ duration: '1m', target: 1 },
{ duration: '10s', target: 3 },
{ duration: '30s', target: 2 },
],
};

Expand Down
6 changes: 2 additions & 4 deletions performance_test/run_performance_tests.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { nameThresholds, low_load } from "./options_settings.js";
// import { getAllBpmn } from "./functions/Bpmn/BPMN_getAll.js";
import { nameThresholds, average_load } from "./options_settings.js";
import { htmlReport } from "https://raw.githubusercontent.com/benc-uk/k6-reporter/main/dist/bundle.js";
import { associateRouteBpmn } from "./functions/Bpmn/BPMN_associate.js";
import { updateHtmlResource } from "./functions/Resources/RESOUCRES_update.js";
Expand All @@ -11,7 +10,7 @@ var token = `${__ENV.MODEL_APPLICATION_KEY}`;

export const options = {
thresholds: nameThresholds,
scenarios: { low_load },
scenarios: { average_load },
}


Expand All @@ -22,7 +21,6 @@ export function handleSummary(data) {
}

export default function () {
// getAllBpmn(appBaseUrl, token);
associateRouteBpmn(appBaseUrl.concat(appBasePath),token,'performance_acquirer','BPMNassociate',1);
updateHtmlResource(appBaseUrl.concat(appBasePath), token);
}
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>it.gov.pagopa</groupId>
<artifactId>atm-layer-model</artifactId>
<version>1.4.0-dev.3</version>
<version>1.4.0-dev.4</version>
<name>atm-layer-model</name>
<properties>
<compiler-plugin.version>3.11.0</compiler-plugin.version>
Expand Down
Loading

0 comments on commit b92da9b

Please sign in to comment.