5b37bcfb06
This PS adds a basic ingress controller chart for Openstack-Helm Change-Id: Icee97fd118a8dab0563cf91400f80ee695e85dfe
95 lines
3.1 KiB
YAML
95 lines
3.1 KiB
YAML
# Copyright 2017 The Openstack-Helm Authors.
|
|
#
|
|
# 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.
|
|
|
|
apiVersion: extensions/v1beta1
|
|
kind: {{ .Values.deployment_type }}
|
|
metadata:
|
|
name: ingress-api
|
|
spec:
|
|
{{- if eq .Values.deployment_type "Deployment" }}
|
|
replicas: {{ .Values.replicas.ingress }}
|
|
revisionHistoryLimit: {{ .Values.upgrades.revision_history }}
|
|
strategy:
|
|
type: {{ .Values.upgrades.pod_replacement_strategy }}
|
|
{{ if eq .Values.upgrades.pod_replacement_strategy "RollingUpdate" }}
|
|
rollingUpdate:
|
|
maxUnavailable: {{ .Values.upgrades.rolling_update.max_unavailable }}
|
|
maxSurge: {{ .Values.upgrades.rolling_update.max_surge }}
|
|
{{ end }}
|
|
{{- end }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: ingress-api
|
|
spec:
|
|
nodeSelector:
|
|
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
|
|
{{- if .Values.network.host_namespace }}
|
|
hostNetwork: true
|
|
{{- end }}
|
|
terminationGracePeriodSeconds: 60
|
|
containers:
|
|
- name: ingress-api
|
|
image: {{ .Values.images.ingress }}
|
|
imagePullPolicy: {{ .Values.images.pull_policy }}
|
|
{{- if .Values.resources.enabled }}
|
|
resources:
|
|
limits:
|
|
cpu: {{ .Values.resources.ingress.limits.cpu | quote }}
|
|
memory: {{ .Values.resources.ingress.limits.memory | quote }}
|
|
requests:
|
|
cpu: {{ .Values.resources.ingress.requests.cpu | quote }}
|
|
memory: {{ .Values.resources.ingress.requests.memory | quote }}
|
|
{{- end }}
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /healthz
|
|
port: 10254
|
|
scheme: HTTP
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /healthz
|
|
port: 10254
|
|
scheme: HTTP
|
|
initialDelaySeconds: 10
|
|
timeoutSeconds: 1
|
|
env:
|
|
- name: POD_NAME
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: metadata.name
|
|
- name: POD_NAMESPACE
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: metadata.namespace
|
|
ports:
|
|
- containerPort: 80
|
|
hostPort: 80
|
|
- containerPort: 443
|
|
hostPort: 443
|
|
args:
|
|
- /nginx-ingress-controller
|
|
- '--default-backend-service=$(POD_NAMESPACE)/ingress-error-pages'
|
|
- '--v=3'
|
|
{{- if .Values.network.host_namespace }}
|
|
volumeMounts:
|
|
- name: resolvconf
|
|
mountPath: /etc/resolv.conf
|
|
subPath: resolv.conf
|
|
volumes:
|
|
- name: resolvconf
|
|
configMap:
|
|
name: ingress-etc
|
|
{{- end }}
|