diff options
Diffstat (limited to 'kubernetes/common')
4 files changed, 14 insertions, 4 deletions
diff --git a/kubernetes/common/common/templates/_labels.tpl b/kubernetes/common/common/templates/_labels.tpl index 993fb7dfac..f2bd1a1141 100644 --- a/kubernetes/common/common/templates/_labels.tpl +++ b/kubernetes/common/common/templates/_labels.tpl @@ -26,6 +26,7 @@ The function takes several arguments (inside a dictionary): {{- define "common.labels" -}} {{- $dot := default . .dot -}} app.kubernetes.io/name: {{ include "common.name" $dot }} +app: {{ include "common.name" $dot }} {{ if not .ignoreHelmChart }} helm.sh/chart: {{ include "common.chart" $dot }} {{- end }} diff --git a/kubernetes/common/common/templates/_serviceMesh.tpl b/kubernetes/common/common/templates/_serviceMesh.tpl index fe2424cc85..3ba945ee8b 100644 --- a/kubernetes/common/common/templates/_serviceMesh.tpl +++ b/kubernetes/common/common/templates/_serviceMesh.tpl @@ -98,7 +98,7 @@ true app.kubernetes.io/name: <app-to-match> ("app.kubernetes.io/name" corresponds to key defined in "common.labels", which is included in "common.service") If common.useAuthorizationPolicies returns false: - Will create an authorization policy without rules, i.e., an allow-all policy + Will not create an authorization policy */}} {{- define "common.authorizationPolicy" -}} {{- $dot := default . .dot -}} @@ -106,6 +106,7 @@ true {{- $authorizedPrincipals := default list $dot.Values.serviceMesh.authorizationPolicy.authorizedPrincipals -}} {{- $defaultOperationMethods := list "GET" "POST" "PUT" "PATCH" "DELETE" -}} {{- $relName := include "common.release" . -}} +{{- if (include "common.useAuthorizationPolicies" .) }} apiVersion: security.istio.io/v1beta1 kind: AuthorizationPolicy metadata: @@ -117,7 +118,6 @@ spec: app.kubernetes.io/name: {{ include "common.servicename" . }} action: ALLOW rules: -{{- if (include "common.useAuthorizationPolicies" .) }} {{- if $authorizedPrincipals }} {{- range $principal := $authorizedPrincipals }} - from: @@ -143,7 +143,5 @@ spec: {{- end }} {{- end }} {{- end }} -{{- else }} - - {} {{- end }} {{- end -}} diff --git a/kubernetes/common/repositoryGenerator/templates/_repository.tpl b/kubernetes/common/repositoryGenerator/templates/_repository.tpl index 1b99285a80..09a799e713 100644 --- a/kubernetes/common/repositoryGenerator/templates/_repository.tpl +++ b/kubernetes/common/repositoryGenerator/templates/_repository.tpl @@ -59,6 +59,16 @@ {{- end -}} {{/* + Resolve the name of the quay.io Repository image repository. + + - .Values.global.quayRepository : default image quayRepository for all images using quay repository + - .Values.quayRepositoryOverride : override global quayRepository repository on a per chart basis +*/}} +{{- define "repositoryGenerator.quayRepository" -}} + {{- include "repositoryGenerator._repositoryHelper" (merge (dict "repoName" "quayRepository") .) }} +{{- end -}} + +{{/* Resolve the name of the googleK8sRepository image repository. - .Values.global.googleK8sRepository : default image dockerHubRepository for all dockerHub images diff --git a/kubernetes/common/repositoryGenerator/values.yaml b/kubernetes/common/repositoryGenerator/values.yaml index 5d886aa7f2..b89c2b2bf6 100644 --- a/kubernetes/common/repositoryGenerator/values.yaml +++ b/kubernetes/common/repositoryGenerator/values.yaml @@ -21,6 +21,7 @@ global: elasticRepository: docker.elastic.co googleK8sRepository: k8s.gcr.io githubContainerRegistry: ghcr.io + quayRepository: quay.io # common global images busyboxImage: busybox:1.34.1 |