Skip to content

Commit

Permalink
service
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronstutzer committed Feb 13, 2024
1 parent 005ae8a commit e2c757a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
4 changes: 2 additions & 2 deletions charts/gke-ingress/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ app.kubernetes.io/name: {{ include "gke-ingress.name" . }}
{{- if hasKey .Values.service.labels "app" }}
{{- with .Values.service.labels.app }}app: {{.|quote}}
{{- end}}
{{- else }}app: {{ include "gateway.name" . }}
{{- else }}app: {{ include "gke-ingress.name" . }}
{{- end }}
{{- if hasKey .Values.service.labels "istio" }}
{{- with .Values.service.labels.istio }}
istio: {{.|quote}}
{{- end}}
{{- else }}
istio: {{ include "gateway.name" . | trimPrefix "istio-" }}
istio: {{ include "gke-ingress.name" . | trimPrefix "istio-" }}
{{- end }}
{{- end }}
15 changes: 9 additions & 6 deletions charts/gke-ingress/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
{{range .Values.service}}
apiVersion: v1
kind: Service
metadata:
name: {{ .Values.service.name }}
namespace: {{ .Release.Namespace }}
name: {{ .name }}
namespace: {{ default "istio-ingress" .namespace}}
labels:
{{- include "gke-ingress.labels" . | nindent 4 }}
annotations:
{{- .Values.service.annotations | toYaml | nindent 4 }}
{{- .annotations | toYaml | nindent 4 }}
spec:
type: {{ .Values.service.type }}
type: {{ .type }}
ports:
{{ .Values.service.ports | toYaml | indent 4 }}
{{ .ports | toYaml | indent 4 }}
selector:
{{- include "gke-ingress.selectorLabels" . | nindent 4 }}
{{- include "gke-ingress.selectorLabels" . | nindent 4 }}
---
{{ end }}

0 comments on commit e2c757a

Please sign in to comment.