Skip to content

Commit

Permalink
Merge pull request #426 from reportportal/develop
Browse files Browse the repository at this point in the history
Release 24.2.0
  • Loading branch information
hlebkanonik authored Sep 27, 2024
2 parents feee09f + cb1432f commit a8fa9d7
Show file tree
Hide file tree
Showing 10 changed files with 116 additions and 65 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# [ReportPortal.io](http://ReportPortal.io)

[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/reportportal-io)](https://artifacthub.io/packages/search?repo=reportportal-io)
[![Join Slack chat!](https://img.shields.io/badge/slack-join-brightgreen.svg)](https://slack.epmrpp.reportportal.io/)
[![stackoverflow](https://img.shields.io/badge/reportportal-stackoverflow-orange.svg?style=flat)](http://stackoverflow.com/questions/tagged/reportportal)
[![GitHub contributors](https://img.shields.io/badge/contributors-102-blue.svg)](https://reportportal.io/community)
Expand Down
2 changes: 1 addition & 1 deletion docs/gke-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Set up environment variables:
```bash
export REPO_LOCATION=us-central1
export CLUSTER_LOCATION=us-central1-a
export PROJECT_ID={your_project_id}
export PROJECT_ID=$(gcloud config get-value project | tr ':' '/')
export CLUSTER_NAME={reportportal_cluster_name}
export REPO_NAME={reportportal_helm_repo_name}
export RELEASE_NAME={reportportal_release_name}
Expand Down
69 changes: 69 additions & 0 deletions docs/helm-pre-upgrade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# HELM pre upgrade hook

Starting from version 24.1.3 we added the helm pre-upgrade hook to the chart.
This hook is used to delete the old jobs to resolve a kubernetes issue with the job name.
This hook doesn't work with the additional roles and role bindings.

Before performing the helm upgrade you need to create the roles and role bindings manually:

```yaml
# role.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: HELM_RELEASE_NAME-service-manager
namespace: default
labels:
app.kubernetes.io/managed-by: Helm
annotations:
meta.helm.sh/release-name: HELM_RELEASE_NAME
meta.helm.sh/release-namespace: default
rules:
- apiGroups: ["", "batch"]
resources: ["pods", "services", "jobs"]
verbs: ["get", "list", "watch"]
- apiGroups: ["batch"]
resources: ["jobs"]
verbs: ["delete"]
```
After that, you can apply the roles:
```shell
kubectl apply -f role.yaml && \
```

```yaml
# role-binding.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: HELM_RELEASE_NAME-user-binding
namespace: default
labels:
app.kubernetes.io/managed-by: Helm
annotations:
meta.helm.sh/release-name: HELM_RELEASE_NAME
meta.helm.sh/release-namespace: default
subjects:
- kind: ServiceAccount
name: HELM_RELEASE_NAME
namespace: default
roleRef:
kind: Role
name: HELM_RELEASE_NAME-service-manager
apiGroup: rbac.authorization.k8s.io
```
Delete the old bindings and apply the new ones:
```shell
kubectl delete rolebinding HELM_RELEASE_NAME-user-binding -n default
kubectl apply -f role-binding.yaml
```

Then you can upgrade the helm release:

```shell
helm upgrade ${HELM_RELEASE_NAME}
```
6 changes: 4 additions & 2 deletions reportportal/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
apiVersion: v2
appVersion: "24.1.0"
appVersion: "24.2.0"
description: |
ReportPortal.io is a TestOps service, that provides increased capabilities
to speed up results analysis and reporting through the use of built-in analytic features.
name: reportportal
version: 24.1.7
version: 24.2.0
sources:
- https://github.com/reportportal/kubernetes/tree/master/reportportal
keywords:
Expand All @@ -26,6 +26,8 @@ annotations:
maintainers:
- name: reportportal
email: [email protected]

# If you update dependencies version, please update also *.image.tag in values.yaml
dependencies:
# If you update version, please update also postgresql.image.tag in values.yaml
- name: postgresql
Expand Down
2 changes: 1 addition & 1 deletion reportportal/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
If release name contains chart name it will be used as a full name.
*/}}
{{- define "reportportal.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- if .Values.global.fullnameOverride -}}
{{- .Values.global.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.global.nameOverride -}}
Expand Down
16 changes: 8 additions & 8 deletions reportportal/templates/service-api/api-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ spec:
{{- end }}
- name: SERVER_SERVLET_CONTEXT_PATH
value: "{{ $path }}/api"
- name: COM_TA_REPORTPORTAL_JOB_LOAD_PLUGINS_CRON
value: "{{ .Values.serviceapi.cronJobs.loadPlugins }}"
- name: RP_JOBS_BASEURL
value: {{ ternary "https" "http" .Values.k8s.networking.ssl }}://{{ include "reportportal.fullname" . }}-jobs{{ printf ".%s.svc.cluster.local" .Release.Namespace }}:8686/jobs
- name: COM_TA_REPORTPORTAL_JOB_INTERRUPT_BROKEN_LAUNCHES_CRON
Expand All @@ -83,10 +85,6 @@ spec:
{{- end }}
- name: RP_ENVIRONMENT_VARIABLE_ALLOW_DELETE_ACCOUNT
value: "{{ .Values.serviceapi.allowDeleteAccount }}"
{{- if .Values.searchengine.doubleEntry.enable }}
- name: RP_ELASTICSEARCH_HOST
value: "{{ ternary "https" "http" .Values.searchengine.ssl }}://{{ .Values.searchengine.endpoint | default (printf "opensearch-cluster-master.%s.svc.cluster.local" .Release.Namespace) }}:{{ .Values.searchengine.port }}"
{{- end }}
- name: LOGGING_LEVEL_ORG_HIBERNATE_SQL
value: "info"
- name: RP_REQUESTLOGGING
Expand All @@ -96,10 +94,12 @@ spec:
value: "{{ .Values.serviceapi.jvmArgs }}"
{{- end }}
# AMQP settings
- name: RP_AMQP_QUEUES
value: {{ .Values.serviceapi.queues.totalNumber | default "10" | quote }}
- name: RP_AMQP_QUEUESPERPOD
value: {{ .Values.serviceapi.queues.perPodNumber | default "10" | quote }}
- name: REPORTING_QUEUES_COUNT
value: "{{ .Values.serviceapi.amqp.queues }}"
- name: REPORTING_PARKINGLOT_TTL_DAYS
value: "{{ .Values.serviceapi.amqp.parkingLotTtlDays }}"
- name: REPORTING_CONSUMER_PREFETCHCOUNT
value: "{{ .Values.serviceapi.amqp.prefetchCount }}"
- name: RP_AMQP_ANALYZER-VHOST
value: "{{ .Values.msgbroker.vhost }}"
- name: RP_AMQP_PASS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
name: {{ include "reportportal.fullname" . }}-uat
labels: {{ include "labels" . | indent 4 }}
spec:
replicas: 1
replicas: {{ .Values.uat.replicaCount | default 1 }}
selector:
matchLabels:
component: {{ include "reportportal.fullname" . }}-uat
Expand Down
25 changes: 0 additions & 25 deletions reportportal/templates/service-jobs/jobs-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,27 +61,6 @@ spec:
{{- end }}
- name: SERVER_SERVLET_CONTEXT_PATH
value: "/jobs"
{{- if .Values.searchengine.doubleEntry.enable }}
- name: RP_ELASTICSEARCH_HOST
value: "{{ ternary "https" "http" .Values.searchengine.ssl }}://{{ .Values.searchengine.endpoint | default (printf "opensearch-cluster-master.%s.svc.cluster.local" .Release.Namespace) }}:{{ .Values.searchengine.port }}"
{{- if .Values.searchengine.secretName }}
- name: RP_ELASTICSEARCH_USERNAME
valueFrom:
secretKeyRef:
name: "{{ .Values.searchengine.secretName }}"
key: "username"
- name: RP_ELASTICSEARCH_PASSWORD
valueFrom:
secretKeyRef:
name: "{{ .Values.searchengine.secretName }}"
key: "password"
{{- else }}
- name: RP_ELASTICSEARCH_USERNAME
value: "{{ .Values.searchengine.user }}"
- name: RP_ELASTICSEARCH_PASSWORD
value: "{{ .Values.searchengine.password }}"
{{- end}}
{{- end}}
- name: RP_ENVIRONMENT_VARIABLE_CLEAN_ATTACHMENT_CRON
value: "{{ .Values.servicejobs.coreJobs.cleanAttachmentCron }}"
- name: RP_ENVIRONMENT_VARIABLE_CLEAN_LOG_CRON
Expand Down Expand Up @@ -184,10 +163,6 @@ spec:
- name: DATASTORE_DEFAULTBUCKETNAME
value: "{{ .Values.storage.bucket.bucketDefaultName }}"
{{- end }}
- name: RP_PROCESSING_LOG_MAXBATCHSIZE
value: "{{ .Values.servicejobs.logProcessing.maxBatchSize }}"
- name: RP_PROCESSING_LOG_MAXBATCHTIMEOUT
value: "{{ .Values.servicejobs.logProcessing.maxBatchTimeout }}"
- name: RP_AMQP_MAXLOGCONSUMER
value: "1"
{{- if .Values.servicejobs.readinessProbe.enabled }}
Expand Down
2 changes: 1 addition & 1 deletion reportportal/templates/service-ui/ui-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: {{ include "reportportal.fullname" . }}-ui
labels: {{ include "labels" . | indent 4 }}
spec:
replicas: 1
replicas: {{ .Values.serviceui.replicaCount | default 1 }}
selector:
matchLabels:
component: {{ include "reportportal.fullname" . }}-ui
Expand Down
56 changes: 30 additions & 26 deletions reportportal/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ serviceindex:
name: index
image:
repository: reportportal/service-index
tag: 5.11.2
tag: 5.12.0
pullPolicy: Always
resources:
requests:
Expand Down Expand Up @@ -54,8 +54,9 @@ serviceui:
name: ui
image:
repository: reportportal/service-ui
tag: 5.11.1-r1
tag: 5.12.0
pullPolicy: Always
replicaCount: 1
resources:
requests:
cpu: 100m
Expand Down Expand Up @@ -86,7 +87,7 @@ serviceapi:
name: api
image:
repository: reportportal/service-api
tag: 5.11.3
tag: 5.12.0
pullPolicy: Always
replicaCount: 1
readinessProbe:
Expand Down Expand Up @@ -137,7 +138,14 @@ serviceapi:
## @param serviceapi.cronJobs define the configuration for the cron jobs
##
cronJobs:
interruptBrockenLaunches: PT1H ## ISO8601 duration format
## @param serviceapi.cronJobs.interruptBrockenLaunches define the duration for the cron job to interrupt broken launches
## ISO8601 duration format
##
interruptBrockenLaunches: PT1H
## @param serviceapi.cronJobs.loadPlugins define the duration for the cron job to load plugins
## ISO8601 duration format
##
loadPlugins: PT10S

## @param serviceapi.patternAnalysis define the configuration for the pattern analysis and Immediate IA
## @paran serviceapi.patternAnalysis.batchSize define the number of logs to be processed in one batch
Expand All @@ -154,12 +162,18 @@ serviceapi:
##
jvmArgs: "-Djava.security.egd=file:/dev/./urandom -XX:+UseG1GC -XX:MinRAMPercentage=60.0 -XX:InitiatingHeapOccupancyPercent=70 -XX:MaxRAMPercentage=90.0 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp"

## @param serviceapi.queues define the number for the queues
## Where "totalNumber" is the total number of queues. Сalculation formula: perPodNumber = totalNumber / serviceapi.replicaCount
## @param serviceapi.amqp define the configuration for the AMQP
##
queues:
totalNumber: 10
perPodNumber: 10
amqp:
## @param serviceapi.amqp.queues define the number for the queues
##
queues: 10
## @param serviceapi.amqp.prefetchCount define the prefetch count per consumer
##
prefetchCount: 10
## @param serviceapi.amqp.consumersCount define time to live in parking lot queue
##
parkingLotTtlDays: 7

## @param serviceapi.extraEnvs define the extra environment variables
##
Expand Down Expand Up @@ -222,8 +236,9 @@ uat:
name: uat
image:
repository: reportportal/service-authorization
tag: 5.11.3
tag: 5.12.0
pullPolicy: Always
replicaCount: 1
readinessProbe:
enabled: true
initialDelaySeconds: 60
Expand Down Expand Up @@ -257,7 +272,7 @@ uat:
## @param serviceapi.javaArgs define the configuration for the JVM.
## For custom java keystore add parameter: -Djavax.net.ssl.trustStore=/etc/secret-volume/custom-pki.jks
##
jvmArgs: "-Djava.security.egd=file:/dev/./urandom -XX:MinRAMPercentage=60.0 -XX:MaxRAMPercentage=90.0"
jvmArgs: "-Djava.security.egd=file:/dev/./urandom -XX:MinRAMPercentage=60.0 -XX:MaxRAMPercentage=90.0 --add-opens=java.base/java.lang=ALL-UNNAMED"

## @param uat.extraEnvs define the extra environment variables
##
Expand Down Expand Up @@ -320,7 +335,7 @@ servicejobs:
name: jobs
image:
repository: reportportal/service-jobs
tag: 5.11.1
tag: 5.12.0
pullPolicy: Always
readinessProbe:
enabled: true
Expand Down Expand Up @@ -355,12 +370,6 @@ servicejobs:
storageProjectCron: 0 */5 * * * *
chunksize: 200000

## @param servicejobs.logProcessing define the configuration for the log processing (a rate of one log per millisecond)
## Use the double entry to move test logs from PostgreSQL to Elastic-type engines. Ref: https://reportportal.io/blog/double-entry-in-5.7.2
##
logProcessing:
maxBatchSize: 2000
maxBatchTimeout: 6000
resources:
requests:
cpu: 100m
Expand Down Expand Up @@ -405,7 +414,7 @@ serviceanalyzer:
name: analyzer
image:
repository: reportportal/service-auto-analyzer
tag: 5.11.0-r4
tag: 5.12.0-r1
pullPolicy: Always
uwsgiWorkers: 2
resources:
Expand Down Expand Up @@ -491,7 +500,7 @@ metricsgatherer:
name: metrics-gatherer
image:
repository: reportportal/service-metrics-gatherer
tag: 5.11.0-r4
tag: 5.12.0-r1
pullPolicy: Always
loggingLevel: debug
timeManagement:
Expand Down Expand Up @@ -537,7 +546,7 @@ metricsgatherer:
migrations:
image:
repository: reportportal/migrations
tag: 5.11.1
tag: 5.12.1
resources:
requests:
cpu: 100m
Expand Down Expand Up @@ -601,11 +610,6 @@ msgbroker:

searchengine:
secretName: ""
## @param searchengine.doubleEntry enable double entry moves test logs from PostgreSQL to Elastic-type engines
## Ref: https://reportportal.io/blog/double-entry-in-5.7.2
##
doubleEntry:
enable: false
## @param searchengine.endpoint URL without protocol and port. By default opensearch-cluster-master.{{ .Release.Namespace }}.svc.cluster.local
##
endpoint:
Expand Down

0 comments on commit a8fa9d7

Please sign in to comment.