Browse Source

Allow overriding service name

Waqar Ahmed 4 năm trước cách đây
mục cha
commit
c325524327
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 3 0
      library/common/templates/classes/_service.tpl

+ 3 - 0
library/common/templates/classes/_service.tpl

@@ -5,6 +5,9 @@ within the common library.
 {{- define "common.classes.service" -}}
 {{- $values := .commonService -}}
 {{- $serviceName := include "common.names.fullname" . -}}
+{{- if hasKey $values "nameSuffix" -}}
+  {{- $serviceName = (printf "%v-%v" $serviceName $values.nameSuffix) -}}
+{{ end -}}
 {{- $svcType := $values.type | default "" -}}
 apiVersion: v1
 kind: Service