5a8b1d82e8
This avoids a race condition that can occur while joining nodes when another node is down. The service is really a discovery service that is primarily used by the haproxy chart to find apiserver endpoints, so it's reasonable for it to include all endpoints (HAProxy will monitor health on its own). Change-Id: I09dd66883af4ff91f9d13432137094fdf876ca83
46 lines
1.4 KiB
YAML
46 lines
1.4 KiB
YAML
{{/*
|
|
Copyright 2017 AT&T Intellectual Property. All other rights reserved.
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
*/}}
|
|
|
|
{{- if .Values.manifests.service }}
|
|
{{- $envAll := . }}
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: {{ .Values.service.name }}
|
|
annotations:
|
|
service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
|
|
spec:
|
|
ports:
|
|
{{ if .Values.network.kubernetes_apiserver.enable_node_port }}
|
|
- name: https
|
|
nodePort: {{ .Values.network.kubernetes_apiserver.node_port }}
|
|
port: {{ .Values.network.kubernetes_apiserver.port }}
|
|
protocol: TCP
|
|
targetPort: {{ .Values.network.kubernetes_apiserver.port }}
|
|
{{ else }}
|
|
- name: https
|
|
port: {{ .Values.network.kubernetes_apiserver.port }}
|
|
protocol: TCP
|
|
targetPort: {{ .Values.network.kubernetes_apiserver.port }}
|
|
{{ end }}
|
|
selector:
|
|
{{ .Values.service.name }}-service: enabled
|
|
{{- if .Values.service.ip }}
|
|
clusterIP: {{ .Values.service.ip }}
|
|
{{- end }}
|
|
{{- end }}
|