diff --git a/README.md b/README.md index a4b2de4..ebda0ca 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/docs/gke-install.md b/docs/gke-install.md index bbf2c10..0328166 100644 --- a/docs/gke-install.md +++ b/docs/gke-install.md @@ -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} diff --git a/docs/helm-pre-upgrade.md b/docs/helm-pre-upgrade.md new file mode 100644 index 0000000..fe47c1c --- /dev/null +++ b/docs/helm-pre-upgrade.md @@ -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} +``` diff --git a/reportportal/Chart.yaml b/reportportal/Chart.yaml index 2c387c6..8e02ca3 100644 --- a/reportportal/Chart.yaml +++ b/reportportal/Chart.yaml @@ -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: @@ -26,6 +26,8 @@ annotations: maintainers: - name: reportportal email: support@reportportal.io + +# 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 diff --git a/reportportal/templates/_helpers.tpl b/reportportal/templates/_helpers.tpl index 8b6d82f..d878a56 100644 --- a/reportportal/templates/_helpers.tpl +++ b/reportportal/templates/_helpers.tpl @@ -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 -}} diff --git a/reportportal/templates/service-api/api-deployment.yaml b/reportportal/templates/service-api/api-deployment.yaml index 1158468..1a04e67 100644 --- a/reportportal/templates/service-api/api-deployment.yaml +++ b/reportportal/templates/service-api/api-deployment.yaml @@ -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 @@ -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 @@ -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 diff --git a/reportportal/templates/service-authorization/uat-deployment.yaml b/reportportal/templates/service-authorization/uat-deployment.yaml index e943c5a..9bed2d5 100644 --- a/reportportal/templates/service-authorization/uat-deployment.yaml +++ b/reportportal/templates/service-authorization/uat-deployment.yaml @@ -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 diff --git a/reportportal/templates/service-jobs/jobs-deployment.yaml b/reportportal/templates/service-jobs/jobs-deployment.yaml index 43857dc..d121cad 100644 --- a/reportportal/templates/service-jobs/jobs-deployment.yaml +++ b/reportportal/templates/service-jobs/jobs-deployment.yaml @@ -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 @@ -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 }} diff --git a/reportportal/templates/service-ui/ui-deployment.yaml b/reportportal/templates/service-ui/ui-deployment.yaml index b215d89..99f254c 100644 --- a/reportportal/templates/service-ui/ui-deployment.yaml +++ b/reportportal/templates/service-ui/ui-deployment.yaml @@ -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 diff --git a/reportportal/values.yaml b/reportportal/values.yaml index 17ebac3..afaf214 100644 --- a/reportportal/values.yaml +++ b/reportportal/values.yaml @@ -21,7 +21,7 @@ serviceindex: name: index image: repository: reportportal/service-index - tag: 5.11.2 + tag: 5.12.0 pullPolicy: Always resources: requests: @@ -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 @@ -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: @@ -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 @@ -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 ## @@ -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 @@ -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 ## @@ -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 @@ -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 @@ -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: @@ -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: @@ -537,7 +546,7 @@ metricsgatherer: migrations: image: repository: reportportal/migrations - tag: 5.11.1 + tag: 5.12.1 resources: requests: cpu: 100m @@ -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: