Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

fix awsSTS and #19 #20

Merged
merged 2 commits into from
Jul 29, 2024
Merged
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
6 changes: 3 additions & 3 deletions charts/testops/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
{{- end -}}

{{- define "allure-testops.redis.fullname" -}}
{{- if .Values.redis.deployByChart }}
{{- if .Values.redis.enabled }}
{{- printf "%s-%s" .Release.Name "redis-master" | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- print .Values.redis.host }}
Expand Down Expand Up @@ -52,7 +52,7 @@
{{- end }}

{{- define "rabbitHost" }}
{{- if .Values.rabbitmq.deployByChart }}
{{- if .Values.rabbitmq.enabled }}
{{- printf "amqp://%s-%s:%.f" .Release.Name "rabbitmq" .Values.rabbitmq.service.ports.amqp | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- print .Values.rabbitmq.hosts }}
Expand Down Expand Up @@ -546,7 +546,7 @@

{{- define "renderWidgetsCache" }}
- name: ALLURE_CACHE-TTL_ENABLED
value: {{ .Values.widgetsCache.enabled }}
value: {{ .Values.widgetsCache.enabled | quote }}
- name: ALLURE_CACHE-TTL_BY-DEFAULT
value: {{ .Values.widgetsCache.byDefault }}
- name: ALLURE_CACHE-TTL_WIDGETS_AUTOMATION-TREND
Expand Down
39 changes: 28 additions & 11 deletions charts/testops/templates/infra/role.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,31 @@
{{- if .Values.rbac.enabled -}}
# create rbac role with permission for discovery
{{- if .Values.rbac.enabled }}
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
metadata:
name: {{ template "allure-testops.name" . }}-namespace-reader
labels:
app: {{ template "allure-testops.name" . }}
chart: {{ template "allure-testops.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
name: {{ include "common.names.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
# yamllint disable rule:indentation
rules:
{{ toYaml .Values.rbac.rules | indent 2}}
{{- end -}}
{{- $pspAvailable := (semverCompare "<1.25-0" (include "common.capabilities.kubeVersion" .)) -}}
{{- if and $pspAvailable .Values.psp.create }}
- apiGroups:
- 'policy'
resources:
- 'podsecuritypolicies'
verbs:
- 'use'
resourceNames:
- {{ include "common.names.fullname" . }}
{{- end }}
{{- if .Values.rbac.rules }}
{{- include "common.tplvalues.render" ( dict "value" .Values.rbac.rules "context" $ ) | nindent 2 }}
{{- end }}
# yamllint enable rule:indentation
{{- end }}
7 changes: 4 additions & 3 deletions charts/testops/templates/infra/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{{- if .Values.rbac.enabled -}}
{{- if and .Values.rbac.enabled .Values.rbac.serviceAccountCreate }}
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ template "allure-testops.name" . }}-sa
name: {{ .Values.rbac.serviceAccountName }}
labels:
app: {{ template "allure-testops.name" . }}
app: {{ template "allure-testops.fullname" . }}
chart: {{ template "allure-testops.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
Expand Down
6 changes: 4 additions & 2 deletions charts/testops/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,8 @@ auth:
############################################################################################################
rbac:
enabled: true
serviceAccountName: allure-testops-sa
serviceAccountCreate: true
rules:
- apiGroups:
- ''
Expand Down Expand Up @@ -655,7 +657,7 @@ rabbitmq:
# If deployed using this chart, RabbitMQ is managed by the original Helm chart provided by Bitnami
# for the reference, please visit: https://github.com/bitnami/charts/tree/main/bitnami/rabbitmq
#########################################################################################################
deployByChart: true
enabled: true
hosts: amqps://mq.example.com:5672
vhost: "/"
# username and password to connect to RabbitMQ server as per the deployed config
Expand All @@ -672,7 +674,7 @@ rabbitmq:

redis:
# Set to 'false' if you have Redis deployed in your infrastructure, and you are allowed to use it with Allure TestOps
deployByChart: true
enabled: true
# if deployByChart is false, then the settings below are required
host: redis.example.com
port: 6379
Expand Down
Loading