Skip to content
This repository has been archived by the owner on Jan 26, 2023. It is now read-only.

Adds Istio Support and Refactor AED-878 #25

Open
wants to merge 4 commits 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
2 changes: 1 addition & 1 deletion charts/allure-ee/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1

name: allure-ee
version: 1.9.7
version: 1.9.8

appVersion: 3.188.3

Expand Down
19 changes: 12 additions & 7 deletions charts/allure-ee/requirements.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
---
dependencies:
- name: rabbitmq
version: ~6.18.0
repository: https://charts.helm.sh/stable
version: ~8.26.0
repository: https://charts.bitnami.com/bitnami
condition: rabbitmq.enabled
- name: postgresql
version: ~8.4.0
repository: https://charts.helm.sh/stable
version: ~10.3.18
repository: https://charts.bitnami.com/bitnami
condition: postgresql.enabled
- name: redis
version: ~10.5.6
repository: https://charts.helm.sh/stable
condition: redis.enabled
version: ~10.0.0
repository: https://charts.bitnami.com/bitnami
condition: redis.enabled
- name: minio
version: 10.0.1
repository: https://charts.bitnami.com/bitnami
condition: minio.enabled
8 changes: 8 additions & 0 deletions charts/allure-ee/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
{{- printf "%s-%s" .Release.Name "rabbitmq" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Create a default fully qualified minio name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "allure-ee.minio.fullname" -}}
{{- printf "%s-%s" .Release.Name "minio" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Create a default fully qualified postgresql name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,30 +1,41 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "allure-ee.gateway.fullname" . }}
labels:
app: {{ template "allure-ee.gateway.fullname" . }}
version: v1
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
spec:
replicas: {{ .Values.gateway.replicaCount }}
strategy:
{{ toYaml .Values.gateway.strategy | indent 4 }}
{{ toYaml .Values.strategy | indent 4 }}
selector:
matchLabels:
app: {{ template "allure-ee.gateway.fullname" . }}
version: v1
template:
metadata:
labels:
app: {{ template "allure-ee.gateway.fullname" . }}
version: v1
annotations:
prometheus.io/path: /management/prometheus
prometheus.io/port: "{{ .Values.gateway.service.port }}"
prometheus.io/scrape: "true"
co.elastic.logs/multiline.pattern: "^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:"
co.elastic.logs/multiline.match: after
co.elastic.logs/multiline.negate: "true"
spec:
{{- if .Values.rbac.enabled }}
serviceAccountName: {{ template "allure-ee.name" . }}
{{- end }}
{{- if .Values.imagePullSecret }}
{{- if .Values.registry.enabled }}
imagePullSecrets:
- name: {{ .Values.imagePullSecret }}
- name: {{ .Values.registry.imagePullSecret }}
{{- end }}
tolerations:
{{ toYaml .Values.gateway.tolerations | indent 8 }}
Expand All @@ -38,12 +49,16 @@ spec:
{{- end }}
containers:
- name: {{ template "allure-ee.gateway.fullname" . }}
image: {{ .Values.gateway.image.repository }}:{{ .Values.version }}
imagePullPolicy: {{ .Values.gateway.image.pullPolicy }}
image: {{ .Values.registry.name }}{{ .Values.gateway.image }}:{{ .Values.version | default .Chart.AppVersion }}
imagePullPolicy: {{ .Values.registry.pullPolicy }}
securityContext:
runAsUser: {{ .Values.runAsUser }}
ports:
- name: http
containerPort: 8080
containerPort: {{ .Values.gateway.service.port }}
env:
- name: SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_JWKSETURI
value: http://{{ template "allure-ee.uaa.fullname" . }}:{{ .Values.uaa.service.port }}{{ .Values.uaa.env.open.SERVER_SERVLET_CONTEXTPATH }}.well-known/jwks.json
{{- range $name, $value := .Values.gateway.env.open }}
- name: {{ $name | quote }}
value: {{ $value | quote }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ metadata:
name: {{ template "allure-ee.gateway.fullname" . }}
labels:
app: {{ template "allure-ee.gateway.fullname" . }}
version: v1
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
Expand All @@ -15,14 +16,9 @@ metadata:
spec:
selector:
app: {{ template "allure-ee.gateway.fullname" . }}
version: v1
ports:
- name: http
targetPort: 8080
targetPort: {{ .Values.gateway.service.port }}
port: {{ .Values.gateway.service.port }}
type: {{ .Values.gateway.service.type }}
{{- if .Values.gateway.service.loadBalancerIp -}}
loadBalancerIP: {{ .Values.gateway.service.loadBalancerIp }}
{{- end -}}
{{- if .Values.gateway.service.externalTrafficPolicy -}}
externalTrafficPolicy: {{ .Values.gateway.service.externalTrafficPolicy }}
{{- end -}}
type: ClusterIP
Original file line number Diff line number Diff line change
@@ -1,30 +1,41 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "allure-ee.report.fullname" . }}
labels:
app: {{ template "allure-ee.report.fullname" . }}
version: v1
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
spec:
replicas: {{ .Values.report.replicaCount }}
strategy:
{{ toYaml .Values.report.strategy | indent 4 }}
{{ toYaml .Values.strategy | indent 4 }}
selector:
matchLabels:
app: {{ template "allure-ee.report.fullname" . }}
version: v1
template:
metadata:
labels:
app: {{ template "allure-ee.report.fullname" . }}
version: v1
annotations:
prometheus.io/path: /rs/management/prometheus
prometheus.io/port: "{{ .Values.report.service.port }}"
prometheus.io/scrape: "true"
co.elastic.logs/multiline.pattern: "^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:"
co.elastic.logs/multiline.match: after
co.elastic.logs/multiline.negate: "true"
spec:
{{- if .Values.rbac.enabled }}
serviceAccountName: {{ template "allure-ee.name" . }}
{{- end }}
{{- if .Values.imagePullSecret }}
{{- if .Values.registry.enabled }}
imagePullSecrets:
- name: {{ .Values.imagePullSecret }}
- name: {{ .Values.registry.imagePullSecret }}
{{- end }}
tolerations:
{{ toYaml .Values.report.tolerations | indent 8 }}
Expand All @@ -38,19 +49,29 @@ spec:
{{- end }}
containers:
- name: {{ template "allure-ee.report.fullname" . }}
image: {{ .Values.report.image.repository }}:{{ .Values.version }}
imagePullPolicy: {{ .Values.report.image.pullPolicy }}
image: {{ .Values.registry.name }}{{ .Values.report.image }}:{{ .Values.version | default .Chart.AppVersion }}
imagePullPolicy: {{ .Values.registry.pullPolicy }}
securityContext:
runAsUser: {{ .Values.runAsUser }}
ports:
- name: http
containerPort: 8081
env:
- name: ALLURE_ENDPOINT
{{- if .Values.network.tls.enabled }}
value: https://{{ .Values.host }}
{{- else }}
value: http://{{ .Values.host }}
- name: SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_JWKSETURI
value: http://{{ template "allure-ee.uaa.fullname" . }}:{{ .Values.uaa.service.port }}{{ .Values.uaa.env.open.SERVER_SERVLET_CONTEXTPATH }}.well-known/jwks.json
{{- end }}
{{- if .Values.rabbitmq.enabled }}
- name: SPRING_RABBITMQ_HOST
value: {{ template "allure-ee.rabbitmq.fullname" . }}
- name: SPRING_RABBITMQ_USERNAME
value: {{ .Values.rabbitmq.rabbitmq.username }}
value: {{ .Values.rabbitmq.auth.username }}
- name: SPRING_RABBITMQ_PASSWORD
value: {{ .Values.rabbitmq.rabbitmq.password }}
value: {{ .Values.rabbitmq.auth.password }}
{{- end }}
{{- if .Values.postgresql.enabled }}
- name: SPRING_DATASOURCE_URL
Expand All @@ -59,12 +80,27 @@ spec:
value: {{ .Values.postgresql.postgresqlUsername }}
- name: SPRING_DATASOURCE_PASSWORD
value: {{ .Values.postgresql.postgresqlPassword }}
- name: SPRING_DATASOURCE_DRIVER_CLASS_NAME
value: org.postgresql.Driver
- name: SPRING_JPA_DATABASE_PLATFORM
value: org.hibernate.dialect.PostgreSQL9Dialect
- name: SPRING_JPA_PROPERTIES_HIBERNATE_GLOBALLY_QUOTED_IDENTIFIERS
value: 'true'
{{- end }}
{{- if .Values.minio.enabled }}
- name: ALLURE_BLOBSTORAGE_TYPE
value: S3
- name: ALLURE_BLOBSTORAGE_S3_ENDPOINT
value: "http://{{ template "allure-ee.minio.fullname" . }}:{{ .Values.minio.service.ports.api }}"
- name: ALLURE_BLOBSTORAGE_S3_BUCKET
value: {{ .Values.minio.defaultBuckets }}
- name: ALLURE_BLOBSTORAGE_S3_REGION
value: {{ .Values.minio.defaultRegion }}
- name: ALLURE_BLOBSTORAGE_S3_ACCESSKEY
value: {{ .Values.minio.auth.rootUser }}
- name: ALLURE_BLOBSTORAGE_S3_SECRETKEY
value: {{ .Values.minio.auth.rootPassword }}
- name: ALLURE_BLOBSTORAGE_S3_PATHSTYLEACCESS
value: "{{ .Values.file_system.pathstyle }}"
{{- else }}
- name: ALLURE_BLOBSTORAGE_TYPE
value: FILE_SYSTEM
- name: ALLURE_BLOBSTORAGE_FILESYSTEM_DIRECTORY
value: /data
{{- end }}
{{- range $name, $value := .Values.report.env.open }}
- name: {{ $name | quote }}
Expand All @@ -88,18 +124,18 @@ spec:
{{- if .Values.report.probes.enabled }}
livenessProbe:
httpGet:
path: /rs/management/health
path: {{ .Values.report.env.open.SERVER_SERVLET_CONTEXTPATH }}management/health
port: http
{{ toYaml .Values.report.probes.liveness.probe | indent 10 }}
readinessProbe:
httpGet:
path: /rs/management/health
path: {{ .Values.report.env.open.SERVER_SERVLET_CONTEXTPATH }}management/health
port: http
{{ toYaml .Values.report.probes.readiness.probe | indent 10 }}
{{- end }}
{{- if eq .Values.report.env.open.ALLURE_BLOBSTORAGE_TYPE "FILE_SYSTEM" }}
{{- if .Values.file_system.has_legacy_volume }}
volumeMounts:
- mountPath: "{{ .Values.report.env.open.ALLURE_BLOBSTORAGE_FILESYSTEM_DIRECTORY }}"
- mountPath: "{{ .Values.file_system.legacy_directory }}"
name: storage-volume
{{- end }}
{{- with .Values.report.resources }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ metadata:
name: {{ template "allure-ee.report.fullname" . }}
labels:
app: {{ template "allure-ee.report.fullname" . }}
version: v1
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
Expand All @@ -15,14 +16,9 @@ metadata:
spec:
selector:
app: {{ template "allure-ee.report.fullname" . }}
version: v1
ports:
- name: http
targetPort: 8081
targetPort: {{ .Values.report.service.port }}
port: {{ .Values.report.service.port }}
type: {{ .Values.report.service.type }}
{{- if .Values.report.service.loadBalancerIp -}}
loadBalancerIP: {{ .Values.report.service.loadBalancerIp }}
{{- end -}}
{{- if .Values.report.service.externalTrafficPolicy -}}
externalTrafficPolicy: {{ .Values.report.service.externalTrafficPolicy }}
{{- end -}}
type: ClusterIP
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,37 @@ metadata:
name: {{ template "allure-ee.uaa.fullname" . }}
labels:
app: {{ template "allure-ee.uaa.fullname" . }}
version: v1
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
spec:
replicas: {{ .Values.uaa.replicaCount }}
strategy:
{{ toYaml .Values.uaa.strategy | indent 4 }}
{{ toYaml .Values.strategy | indent 4 }}
selector:
matchLabels:
app: {{ template "allure-ee.uaa.fullname" . }}
version: v1
template:
metadata:
labels:
app: {{ template "allure-ee.uaa.fullname" . }}
version: v1
annotations:
prometheus.io/path: /uaa/management/prometheus
prometheus.io/port: "{{ .Values.uaa.service.port }}"
prometheus.io/scrape: "true"
co.elastic.logs/multiline.pattern: "^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:"
co.elastic.logs/multiline.match: after
co.elastic.logs/multiline.negate: "true"
spec:
{{- if .Values.rbac.enabled }}
serviceAccountName: {{ template "allure-ee.name" . }}
{{- end }}
{{- if .Values.imagePullSecret }}
{{- if .Values.registry.enabled }}
imagePullSecrets:
- name: {{ .Values.imagePullSecret }}
- name: {{ .Values.registry.imagePullSecret }}
{{- end }}
tolerations:
{{ toYaml .Values.uaa.tolerations | indent 8 }}
Expand All @@ -38,25 +48,29 @@ spec:
{{- end }}
containers:
- name: {{ template "allure-ee.uaa.fullname" . }}
image: {{ .Values.uaa.image.repository }}:{{ .Values.version }}
imagePullPolicy: {{ .Values.uaa.image.pullPolicy }}
image: {{ .Values.registry.name }}{{ .Values.uaa.image }}:{{ .Values.version | default .Chart.AppVersion }}
imagePullPolicy: {{ .Values.registry.pullPolicy }}
securityContext:
runAsUser: {{ .Values.runAsUser }}
ports:
- name: http
containerPort: 8082
env:
- name: ALLURE_ENDPOINT
{{- if .Values.network.tls.enabled }}
value: https://{{ .Values.host }}
{{- else }}
value: http://{{ .Values.host }}
- name: SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_JWKSETURI
value: http://{{ template "allure-ee.uaa.fullname" . }}:{{ .Values.uaa.service.port }}{{ .Values.uaa.env.open.SERVER_SERVLET_CONTEXTPATH }}.well-known/jwks.json
{{- end }}
{{- if .Values.postgresql.enabled }}
- name: SPRING_DATASOURCE_URL
value: jdbc:postgresql://{{ template "allure-ee.postgresql.fullname" . }}/uaa
- name: SPRING_DATASOURCE_USERNAME
value: {{ .Values.postgresql.postgresqlUsername }}
- name: SPRING_DATASOURCE_PASSWORD
value: {{ .Values.postgresql.postgresqlPassword }}
- name: SPRING_DATASOURCE_DRIVER_CLASS_NAME
value: org.postgresql.Driver
- name: SPRING_JPA_DATABASE_PLATFORM
value: org.hibernate.dialect.PostgreSQL9Dialect
- name: SPRING_JPA_PROPERTIES_HIBERNATE_GLOBALLY_QUOTED_IDENTIFIERS
value: 'true'
{{- end }}
{{- range $name, $value := .Values.uaa.env.open }}
- name: {{ $name | quote }}
Expand Down Expand Up @@ -95,12 +109,12 @@ spec:
{{- if .Values.uaa.probes.enabled }}
livenessProbe:
httpGet:
path: /uaa/management/health
path: {{ .Values.uaa.env.open.SERVER_SERVLET_CONTEXTPATH }}management/health
port: http
{{ toYaml .Values.uaa.probes.liveness.probe | indent 10 }}
readinessProbe:
httpGet:
path: /uaa/management/health
path: {{ .Values.uaa.env.open.SERVER_SERVLET_CONTEXTPATH }}management/health
port: http
{{ toYaml .Values.uaa.probes.readiness.probe | indent 10 }}
{{- end }}
Expand Down
Loading