added repo
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
CHART NAME: {{ .Chart.Name }}
|
||||
CHART VERSION: {{ .Chart.Version }}
|
||||
APP VERSION: {{ .Chart.AppVersion }}
|
||||
|
||||
** Please be patient while the chart is being deployed **
|
||||
|
||||
{{- if eq .Values.envoy.service.type "LoadBalancer" }}
|
||||
1. Get Contours's load balancer IP/hostname:
|
||||
|
||||
NOTE: It may take a few minutes for this to become available.
|
||||
|
||||
You can watch the status by running:
|
||||
|
||||
$ kubectl get svc {{ printf "%s-envoy" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }} --namespace {{ include "common.names.namespace" . }} -w
|
||||
|
||||
Once 'EXTERNAL-IP' is no longer '<pending>':
|
||||
|
||||
$ kubectl describe svc {{ printf "%s-envoy" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }} --namespace {{ include "common.names.namespace" . }} | grep Ingress | awk '{print $3}'
|
||||
|
||||
2. Configure DNS records corresponding to Kubernetes ingress resources to point to the load balancer IP/hostname found in step 1
|
||||
{{- end }}
|
||||
{{- if eq .Values.envoy.service.type "NodePort" }}
|
||||
{{- if (and (not (empty .Values.envoy.service.nodePorts.https)) (not (empty .Values.envoy.service.nodePorts.http))) }}
|
||||
1. Contour is listening on the following ports on the host machine:
|
||||
|
||||
http - {{ .Values.envoy.service.nodePorts.http }}
|
||||
https - {{ .Values.envoy.service.nodePorts.https }}
|
||||
{{- else }}
|
||||
1. Contour has been started. You can find out the port numbers being used by Contour by running:
|
||||
|
||||
$ kubectl describe svc {{ include "common.names.fullname" . }} --namespace {{ include "common.names.namespace" . }}
|
||||
|
||||
{{- end }}
|
||||
|
||||
2. Configure DNS records corresponding to Kubernetes ingress resources to point to the NODE_IP/NODE_HOST
|
||||
{{- end }}
|
||||
|
||||
{{- include "contour.validateValues" . }}
|
||||
{{- include "common.warnings.rollingTag" .Values.contour.image }}
|
||||
{{- include "common.warnings.rollingTag" .Values.envoy.image }}
|
||||
@@ -0,0 +1,122 @@
|
||||
{{/*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{/* vim: set filetype=mustache: */}}
|
||||
|
||||
{{/*
|
||||
Create the name of the envoy service account to use
|
||||
*/}}
|
||||
{{- define "envoy.envoyServiceAccountName" -}}
|
||||
{{- if .Values.contour.serviceAccount.create -}}
|
||||
{{ default (printf "%s-envoy" (include "common.names.fullname" .)) .Values.envoy.serviceAccount.name }}
|
||||
{{- else -}}
|
||||
{{ default "default" .Values.envoy.serviceAccount.name }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create the name of the contour service account to use
|
||||
*/}}
|
||||
{{- define "contour.contourServiceAccountName" -}}
|
||||
{{- if .Values.contour.serviceAccount.create -}}
|
||||
{{ default (printf "%s-contour" (include "common.names.fullname" .)) .Values.contour.serviceAccount.name }}
|
||||
{{- else -}}
|
||||
{{ default "default" .Values.contour.serviceAccount.name }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create the name of the contour-certgen service account to use
|
||||
*/}}
|
||||
{{- define "contour.contourCertGenServiceAccountName" -}}
|
||||
{{- if .Values.contour.certgen.serviceAccount.create -}}
|
||||
{{ default (printf "%s-contour-certgen" (include "common.names.fullname" .)) .Values.contour.certgen.serviceAccount.name }}
|
||||
{{- else -}}
|
||||
{{ default "default" .Values.contour.certgen.serviceAccount.name }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Whether to enabled contour-certgen or not
|
||||
*/}}
|
||||
{{- define "contour.contour-certgen.enabled" -}}
|
||||
{{- if and (not .Values.tlsExistingSecret) (or (not .Values.contour.tlsExistingSecret) (not .Values.envoy.tlsExistingSecret)) -}}
|
||||
true
|
||||
{{- else -}}{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Contour certs secret name
|
||||
*/}}
|
||||
{{- define "contour.contour.certs-secret.name" -}}
|
||||
{{- $existingSecret := default .Values.tlsExistingSecret .Values.contour.tlsExistingSecret -}}
|
||||
{{- $name := default "contourcert" $existingSecret -}}
|
||||
{{- printf "%s" $name -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Envoy certs secret name
|
||||
*/}}
|
||||
{{- define "contour.envoy.certs-secret.name" -}}
|
||||
{{- $existingSecret := default .Values.tlsExistingSecret .Values.envoy.tlsExistingSecret -}}
|
||||
{{- $name := default "envoycert" $existingSecret -}}
|
||||
{{- printf "%s" $name -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create the name of the settings ConfigMap to use.
|
||||
*/}}
|
||||
{{- define "contour.configMapName" -}}
|
||||
{{- if .Values.configInline -}}
|
||||
{{ include "common.names.fullname" . }}
|
||||
{{- else -}}
|
||||
{{ .Values.existingConfigMap }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Compile all warnings into a single message, and call fail.
|
||||
*/}}
|
||||
{{- define "contour.validateValues" -}}
|
||||
{{- $messages := list -}}
|
||||
{{- $messages := append $messages (include "contour.validateValues.envoy.kind" .) -}}
|
||||
{{- $messages := without $messages "" -}}
|
||||
{{- $message := join "\n" $messages -}}
|
||||
|
||||
{{- if $message -}}
|
||||
{{- printf "\nVALUES VALIDATION:\n%s" $message | fail -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* Validate values of Contour - must provide a valid Envoy kind */}}
|
||||
{{- define "contour.validateValues.envoy.kind" -}}
|
||||
{{- if and .Values.envoy.enabled (ne .Values.envoy.kind "deployment") (ne .Values.envoy.kind "daemonset") -}}
|
||||
contour: envoy.kind
|
||||
Invalid envoy.kind selected. Valid values are "daemonset" and
|
||||
"deployment". Please set a valid kind (--set envoy.kind="xxxx")
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* Create the name of the IngressClass to use. */}}
|
||||
{{- define "contour.ingressClassName" -}}
|
||||
{{- $ingressClass := .Values.contour.ingressClass }}
|
||||
{{- if kindIs "string" $ingressClass -}}
|
||||
{{ default "contour" $ingressClass }}
|
||||
{{- else if kindIs "map" $ingressClass -}}
|
||||
{{ default "contour" $ingressClass.name }}
|
||||
{{- else -}}
|
||||
contour
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* Whether the name of the ingress class is defined or not */}}
|
||||
{{- define "contour.isIngressClassNameDefined" -}}
|
||||
{{- $ingressClass := .Values.contour.ingressClass -}}
|
||||
{{- if kindIs "string" $ingressClass -}}
|
||||
true
|
||||
{{- else if and (kindIs "map" $ingressClass) ($ingressClass.name) -}}
|
||||
true
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,84 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if and .Values.contour.enabled (include "contour.contour-certgen.enabled" .) }}
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: {{ printf "%s-contour-certgen" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
annotations:
|
||||
"helm.sh/hook": "pre-install,pre-upgrade"
|
||||
"helm.sh/hook-weight": "1"
|
||||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
|
||||
{{- if .Values.commonAnnotations }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.contour.image "chart" .Chart ) ) }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/component: contour-certgen
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 8 }}
|
||||
app.kubernetes.io/component: contour-certgen
|
||||
spec:
|
||||
{{- include "common.images.pullSecrets" ( dict "images" (list .Values.contour.image) "global" .Values.global) | nindent 6 }}
|
||||
{{- if .Values.contour.nodeSelector }}
|
||||
nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.contour.nodeSelector "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.contour.affinity }}
|
||||
affinity: {{- include "common.tplvalues.render" (dict "value" .Values.contour.affinity "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.contour.tolerations }}
|
||||
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.contour.tolerations "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.contour.podSecurityContext.enabled }}
|
||||
securityContext: {{- omit .Values.contour.podSecurityContext "enabled" | toYaml | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: contour
|
||||
image: {{ include "common.images.image" ( dict "imageRoot" .Values.contour.image "global" .Values.global) }}
|
||||
imagePullPolicy: {{ .Values.contour.image.pullPolicy }}
|
||||
command:
|
||||
- contour
|
||||
args:
|
||||
- certgen
|
||||
- --kube
|
||||
- --incluster
|
||||
- --overwrite
|
||||
- --secrets-format=compact
|
||||
- --namespace=$(CONTOUR_NAMESPACE)
|
||||
- --certificate-lifetime={{ .Values.contour.certgen.certificateLifetime }}
|
||||
env:
|
||||
- name: CONTOUR_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
{{- if .Values.contour.extraEnvVars }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.contour.extraEnvVars "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if or .Values.contour.extraEnvVarsCM .Values.contour.extraEnvVarsSecret }}
|
||||
envFrom:
|
||||
{{- if .Values.contour.extraEnvVarsCM }}
|
||||
- configMapRef:
|
||||
name: {{ include "common.tplvalues.render" ( dict "value" .Values.contour.extraEnvVarsCM "context" $ ) }}
|
||||
{{- end }}
|
||||
{{- if .Values.contour.extraEnvVarsSecret }}
|
||||
- secretRef:
|
||||
name: {{ include "common.tplvalues.render" ( dict "value" .Values.contour.extraEnvVarsSecret "context" $ ) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.contour.containerSecurityContext.enabled }}
|
||||
securityContext: {{- omit .Values.contour.containerSecurityContext "enabled" | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
resources: {{ toYaml .Values.contour.resources | nindent 12 }}
|
||||
restartPolicy: Never
|
||||
serviceAccountName: {{ include "contour.contourCertGenServiceAccountName" . }}
|
||||
parallelism: 1
|
||||
completions: 1
|
||||
backoffLimit: 1
|
||||
{{- end }}
|
||||
@@ -0,0 +1,48 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if and .Values.rbac.create .Values.contour.enabled (include "contour.contour-certgen.enabled" .) }}
|
||||
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.contour.image "chart" .Chart ) ) }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
|
||||
kind: Role
|
||||
metadata:
|
||||
name: {{ printf "%s-contour-certgen" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
annotations:
|
||||
"helm.sh/hook": "pre-install,pre-upgrade"
|
||||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
|
||||
{{- if .Values.commonAnnotations }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/component: contour-certgen
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- secrets
|
||||
verbs:
|
||||
- create
|
||||
- update
|
||||
---
|
||||
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: {{ printf "%s-contour-certgen" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
annotations:
|
||||
"helm.sh/hook": "pre-install,pre-upgrade"
|
||||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/component: contour-certgen
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: {{ printf "%s-contour-certgen" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "contour.contourCertGenServiceAccountName" . }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,24 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if and .Values.contour.certgen.serviceAccount.create (include "contour.contour-certgen.enabled" .) }}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "contour.contourCertGenServiceAccountName" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.contour.image "chart" .Chart ) ) }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/component: contour-certgen
|
||||
annotations:
|
||||
"helm.sh/hook": "pre-install,pre-upgrade"
|
||||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
|
||||
{{- if or .Values.contour.certgen.serviceAccount.annotations .Values.commonAnnotations }}
|
||||
{{- $mergedAnnotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.contour.certgen.serviceAccount.annotations .Values.commonAnnotations ) "context" . ) }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" $mergedAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
automountServiceAccountToken: {{ .Values.contour.certgen.serviceAccount.automountServiceAccountToken }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,22 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if .Values.configInline }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ include "common.names.fullname" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.contour.image "chart" .Chart ) ) }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/component: contour
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
data:
|
||||
contour.yaml: |-
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.configInline "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,247 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if .Values.contour.enabled }}
|
||||
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ printf "%s-contour" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.contour.image "chart" .Chart ) ) }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/component: contour
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.contour.podLabels .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
replicas: {{ .Values.contour.replicaCount }}
|
||||
{{- if .Values.contour.updateStrategy }}
|
||||
strategy: {{- toYaml .Values.contour.updateStrategy | nindent 4 }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
|
||||
app.kubernetes.io/component: contour
|
||||
template:
|
||||
metadata:
|
||||
{{- if or .Values.configInline .Values.contour.podAnnotations .Values.commonAnnotations }}
|
||||
annotations:
|
||||
{{- if .Values.contour.podAnnotations }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.contour.podAnnotations "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.configInline }}
|
||||
checksum/config: {{ include (print $.Template.BasePath "/contour/configmap.yaml") . | sha256sum }}
|
||||
{{- end }}
|
||||
{{- if .Values.commonAnnotations }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }}
|
||||
app.kubernetes.io/component: contour
|
||||
spec:
|
||||
{{- include "common.images.pullSecrets" ( dict "images" (list .Values.contour.image) "global" .Values.global) | nindent 6 }}
|
||||
{{- if .Values.contour.priorityClassName }}
|
||||
priorityClassName: {{ .Values.contour.priorityClassName | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.contour.hostAliases }}
|
||||
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.contour.hostAliases "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.contour.affinity }}
|
||||
affinity: {{- include "common.tplvalues.render" (dict "value" .Values.contour.affinity "context" $) | nindent 8 }}
|
||||
{{- else }}
|
||||
affinity:
|
||||
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.contour.podAffinityPreset "component" "contour" "customLabels" $podLabels "context" $) | nindent 10 }}
|
||||
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.contour.podAntiAffinityPreset "component" "contour" "customLabels" $podLabels "context" $) | nindent 10 }}
|
||||
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.contour.nodeAffinityPreset.type "key" .Values.contour.nodeAffinityPreset.key "values" .Values.contour.nodeAffinityPreset.values) | nindent 10 }}
|
||||
{{- end }}
|
||||
{{- if .Values.contour.nodeSelector }}
|
||||
nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.contour.nodeSelector "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.contour.tolerations }}
|
||||
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.contour.tolerations "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.contour.schedulerName }}
|
||||
schedulerName: {{ .Values.contour.schedulerName | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.contour.topologySpreadConstraints }}
|
||||
topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.contour.topologySpreadConstraints "context" .) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.contour.terminationGracePeriodSeconds }}
|
||||
terminationGracePeriodSeconds: {{ .Values.contour.terminationGracePeriodSeconds }}
|
||||
{{- end }}
|
||||
{{- if .Values.contour.initContainers }}
|
||||
initContainers: {{- include "common.tplvalues.render" ( dict "value" .Values.contour.initContainers "context" $ ) | nindent 6 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: contour
|
||||
{{- if .Values.diagnosticMode.enabled }}
|
||||
command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }}
|
||||
{{- else if .Values.contour.command }}
|
||||
command: {{- include "common.tplvalues.render" (dict "value" .Values.contour.command "context" $) | nindent 12 }}
|
||||
{{- else }}
|
||||
command:
|
||||
- contour
|
||||
{{- end }}
|
||||
{{- if .Values.diagnosticMode.enabled }}
|
||||
args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }}
|
||||
{{- else if .Values.contour.args }}
|
||||
args: {{- include "common.tplvalues.render" (dict "value" .Values.contour.args "context" $) | nindent 12 }}
|
||||
{{- else }}
|
||||
args:
|
||||
- serve
|
||||
- --incluster
|
||||
- --xds-address=0.0.0.0
|
||||
- --xds-port={{ .Values.contour.containerPorts.xds }}
|
||||
- --http-port={{ .Values.contour.containerPorts.metrics }}
|
||||
- --envoy-service-http-port={{ .Values.envoy.containerPorts.http }}
|
||||
- --envoy-service-https-port={{ .Values.envoy.containerPorts.https }}
|
||||
- --contour-cafile=/certs/ca.crt
|
||||
- --contour-cert-file=/certs/tls.crt
|
||||
- --contour-key-file=/certs/tls.key
|
||||
{{- if .Values.contour.configPath }}
|
||||
- --config-path=/config/contour.yaml
|
||||
{{- else }}
|
||||
- --contour-config-name={{ .Values.contour.contourConfigName }}
|
||||
{{- end }}
|
||||
{{- if .Values.contour.ingressStatusAddress }}
|
||||
- --ingress-status-address={{ .Values.contour.ingressStatusAddress }}
|
||||
{{- else }}
|
||||
- --envoy-service-namespace={{ default .Release.Namespace .Values.contour.envoyServiceNamespace }}
|
||||
- --envoy-service-name={{ default (printf "%s-envoy" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-") .Values.contour.envoyServiceName }}
|
||||
{{- end }}
|
||||
- --leader-election-resource-name={{ default (printf "%s-%s" (include "common.names.namespace" .) (printf "%s-contour" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-")) .Values.contour.leaderElectionResourceName }}
|
||||
{{- if .Values.contour.debug }}
|
||||
- --debug
|
||||
{{- end }}
|
||||
- --log-format={{ .Values.contour.logFormat }}
|
||||
- --kubernetes-debug={{ .Values.contour.kubernetesDebug }}
|
||||
{{- if (include "contour.isIngressClassNameDefined" .) }}
|
||||
- --ingress-class-name={{ include "contour.ingressClassName" . }}
|
||||
{{- end }}
|
||||
{{- if .Values.contour.rootNamespaces }}
|
||||
- --root-namespaces={{ .Values.contour.rootNamespaces }}
|
||||
{{- end }}
|
||||
{{- if .Values.contour.extraArgs }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.contour.extraArgs "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
image: {{ include "common.images.image" ( dict "imageRoot" .Values.contour.image "global" .Values.global) }}
|
||||
imagePullPolicy: {{ .Values.contour.image.pullPolicy }}
|
||||
ports:
|
||||
- containerPort: {{ .Values.contour.containerPorts.xds }}
|
||||
name: xds
|
||||
protocol: TCP
|
||||
- containerPort: {{ .Values.contour.containerPorts.metrics }}
|
||||
name: metrics
|
||||
protocol: TCP
|
||||
{{- if not .Values.diagnosticMode.enabled }}
|
||||
{{- if .Values.contour.lifecycleHooks }}
|
||||
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.contour.lifecycleHooks "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.contour.customLivenessProbe }}
|
||||
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.contour.customLivenessProbe "context" $) | nindent 12 }}
|
||||
{{- else if .Values.contour.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: {{ .Values.contour.containerPorts.metrics }}
|
||||
initialDelaySeconds: {{ .Values.contour.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.contour.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.contour.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.contour.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.contour.livenessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.contour.customReadinessProbe }}
|
||||
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.contour.customReadinessProbe "context" $) | nindent 12 }}
|
||||
{{- else if .Values.contour.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: {{ .Values.contour.containerPorts.metrics }}
|
||||
initialDelaySeconds: {{ .Values.contour.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.contour.readinessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.contour.readinessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.contour.readinessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.contour.readinessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.contour.customStartupProbe }}
|
||||
startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.contour.customStartupProbe "context" $) | nindent 12 }}
|
||||
{{- else if .Values.contour.startupProbe.enabled }}
|
||||
startupProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: {{ .Values.contour.containerPorts.metrics }}
|
||||
initialDelaySeconds: {{ .Values.contour.startupProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.contour.startupProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.contour.startupProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.contour.startupProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.contour.startupProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
resources: {{ toYaml .Values.contour.resources | nindent 12 }}
|
||||
volumeMounts:
|
||||
- name: contourcert
|
||||
mountPath: /certs
|
||||
readOnly: true
|
||||
- name: contour-config
|
||||
mountPath: /config
|
||||
readOnly: true
|
||||
{{- if .Values.contour.extraVolumeMounts }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.contour.extraVolumeMounts "context" $ ) | nindent 12 }}
|
||||
{{- end }}
|
||||
env:
|
||||
- name: CONTOUR_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
apiVersion: v1
|
||||
fieldPath: metadata.namespace
|
||||
- name: POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
apiVersion: v1
|
||||
fieldPath: metadata.name
|
||||
- name: BITNAMI_DEBUG
|
||||
value: {{ ternary "true" "false" (or .Values.contour.image.debug .Values.diagnosticMode.enabled) | quote }}
|
||||
{{- if .Values.contour.extraEnvVars }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.contour.extraEnvVars "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if or .Values.contour.extraEnvVarsCM .Values.contour.extraEnvVarsSecret }}
|
||||
envFrom:
|
||||
{{- if .Values.contour.extraEnvVarsCM }}
|
||||
- configMapRef:
|
||||
name: {{ include "common.tplvalues.render" ( dict "value" .Values.contour.extraEnvVarsCM "context" $ ) }}
|
||||
{{- end }}
|
||||
{{- if .Values.contour.extraEnvVarsSecret }}
|
||||
- secretRef:
|
||||
name: {{ include "common.tplvalues.render" ( dict "value" .Values.contour.extraEnvVarsSecret "context" $ ) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.contour.containerSecurityContext.enabled }}
|
||||
securityContext: {{- omit .Values.contour.containerSecurityContext "enabled" | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.contour.sidecars }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.contour.sidecars "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
dnsPolicy: ClusterFirst
|
||||
serviceAccountName: {{ include "contour.contourServiceAccountName" . }}
|
||||
{{- if .Values.contour.podSecurityContext.enabled }}
|
||||
securityContext: {{- omit .Values.contour.podSecurityContext "enabled" | toYaml | nindent 8 }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
- name: contourcert
|
||||
secret:
|
||||
secretName: {{ include "contour.contour.certs-secret.name" . }}
|
||||
- name: contour-config
|
||||
configMap:
|
||||
name: {{ include "contour.configMapName" . }}
|
||||
defaultMode: 0644
|
||||
items:
|
||||
- key: contour.yaml
|
||||
path: contour.yaml
|
||||
{{- if .Values.contour.extraVolumes }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.contour.extraVolumes "context" $ ) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,25 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{ $ingressClass := .Values.contour.ingressClass }}
|
||||
{{- if kindIs "map" $ingressClass }}
|
||||
{{- if $ingressClass.create }}
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: IngressClass
|
||||
metadata:
|
||||
name: {{ include "contour.ingressClassName" . }}
|
||||
annotations:
|
||||
{{- if $ingressClass.default }}
|
||||
ingressclass.kubernetes.io/is-default-class: "true"
|
||||
{{- end }}
|
||||
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.contour.image "chart" .Chart ) ) }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/component: contour
|
||||
spec:
|
||||
controller: {{ printf "projectcontour.io/%s/%s-contour" (include "common.names.namespace" .) (include "common.names.fullname" .) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,234 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if and .Values.rbac.create .Values.contour.enabled }}
|
||||
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: {{ printf "%s-contour" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.contour.image "chart" .Chart ) ) }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- configmaps
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- update
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- endpoints
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- namespaces
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- secrets
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- services
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- networking.k8s.io
|
||||
resources:
|
||||
- ingressclasses
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- networking.k8s.io
|
||||
resources:
|
||||
- ingresses
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- networking.k8s.io
|
||||
resources:
|
||||
- ingresses/status
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- update
|
||||
- apiGroups:
|
||||
- networking.x-k8s.io
|
||||
- gateway.networking.k8s.io
|
||||
resources:
|
||||
- gatewayclasses
|
||||
- gateways
|
||||
- grpcroutes
|
||||
- httproutes
|
||||
- tcproutes
|
||||
- tlsroutes
|
||||
- udproutes
|
||||
- referencepolicies
|
||||
- referencegrants
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- networking.x-k8s.io
|
||||
- gateway.networking.k8s.io
|
||||
resources:
|
||||
- gatewayclasses/status
|
||||
- gateways/status
|
||||
- grpcroutes/status
|
||||
- httproutes/status
|
||||
- tcproutes/status
|
||||
- tlsroutes/status
|
||||
- udproutes/status
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- projectcontour.io
|
||||
resources:
|
||||
- contourconfigurations
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- projectcontour.io
|
||||
resources:
|
||||
- contourconfigurations/status
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- update
|
||||
- apiGroups:
|
||||
- projectcontour.io
|
||||
resources:
|
||||
- extensionservices
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- projectcontour.io
|
||||
resources:
|
||||
- extensionservices/status
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- update
|
||||
- apiGroups:
|
||||
- projectcontour.io
|
||||
resources:
|
||||
- httpproxies
|
||||
- tlscertificatedelegations
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- projectcontour.io
|
||||
resources:
|
||||
- httpproxies/status
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- update
|
||||
- apiGroups:
|
||||
- discovery.k8s.io
|
||||
resources:
|
||||
- endpointslices
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
{{- if .Values.rbac.rules }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.rbac.rules "context" $ ) | nindent 2 }}
|
||||
{{- end }}
|
||||
---
|
||||
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: {{ printf "%s-contour" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.contour.image "chart" .Chart ) ) }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: {{ printf "%s-contour" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "contour.contourServiceAccountName" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
---
|
||||
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
|
||||
kind: Role
|
||||
metadata:
|
||||
name: {{ printf "%s-contour" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.contour.image "chart" .Chart ) ) }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- events
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- update
|
||||
- apiGroups:
|
||||
- coordination.k8s.io
|
||||
resources:
|
||||
- leases
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- update
|
||||
---
|
||||
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: {{ printf "%s-contour-role" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.contour.image "chart" .Chart ) ) }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: {{ printf "%s-contour" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "contour.contourServiceAccountName" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,28 @@
|
||||
{{- if .Values.contour.enabled }}
|
||||
{{- if .Values.contour.service.tcpLB }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ printf "%s-contour" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}-tcp-lb
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
annotations:
|
||||
cloud.google.com/load-balancer-type: "Internal"
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
app.kubernetes.io/component: contour
|
||||
{{- if .Values.contour.service.labels }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.contour.service.labels "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: LoadBalancer
|
||||
ports:
|
||||
- port: {{ .Values.contour.service.ports.xds }}
|
||||
name: tcp-xds
|
||||
protocol: TCP
|
||||
targetPort: xds
|
||||
selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: contour
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,80 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if .Values.contour.enabled }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "common.names.fullname" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.contour.image "chart" .Chart ) ) }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/component: contour
|
||||
{{- if or .Values.contour.service.annotations .Values.commonAnnotations }}
|
||||
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.contour.service.annotations .Values.commonAnnotations ) "context" . ) }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: {{ .Values.contour.service.type }}
|
||||
{{- if or (eq .Values.contour.service.type "LoadBalancer") (eq .Values.contour.service.type "NodePort") }}
|
||||
externalTrafficPolicy: {{ .Values.contour.service.externalTrafficPolicy | quote }}
|
||||
{{- end }}
|
||||
{{- if and .Values.contour.service.clusterIP (eq .Values.contour.service.type "ClusterIP") }}
|
||||
clusterIP: {{ .Values.contour.service.clusterIP }}
|
||||
{{- end }}
|
||||
{{- if and (eq .Values.contour.service.type "LoadBalancer") (not (empty .Values.contour.service.loadBalancerSourceRanges)) }}
|
||||
loadBalancerSourceRanges: {{ .Values.contour.service.loadBalancerSourceRanges }}
|
||||
{{- end }}
|
||||
{{- if and (eq .Values.contour.service.type "LoadBalancer") (not (empty .Values.contour.service.loadBalancerIP)) }}
|
||||
loadBalancerIP: {{ .Values.contour.service.loadBalancerIP }}
|
||||
{{- end }}
|
||||
{{- if .Values.contour.service.sessionAffinity }}
|
||||
sessionAffinity: {{ .Values.contour.service.sessionAffinity }}
|
||||
{{- end }}
|
||||
{{- if .Values.contour.service.sessionAffinityConfig }}
|
||||
sessionAffinityConfig: {{- include "common.tplvalues.render" (dict "value" .Values.contour.service.sessionAffinityConfig "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if and .Values.contour.service.loadBalancerClass (eq .Values.contour.service.type "LoadBalancer") }}
|
||||
loadBalancerClass: {{ .Values.contour.service.loadBalancerClass }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- port: {{ .Values.contour.service.ports.xds }}
|
||||
name: tcp-xds
|
||||
protocol: TCP
|
||||
targetPort: xds
|
||||
{{- if (and (or (eq .Values.contour.service.type "NodePort") (eq .Values.contour.service.type "LoadBalancer")) (not (empty .Values.contour.service.nodePorts.xds))) }}
|
||||
nodePort: {{ .Values.contour.service.nodePorts.xds }}
|
||||
{{- else if eq .Values.contour.service.type "ClusterIP" }}
|
||||
nodePort: null
|
||||
{{- end }}
|
||||
{{- if .Values.contour.service.extraPorts }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.contour.service.extraPorts "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.contour.podLabels .Values.commonLabels ) "context" . ) }}
|
||||
selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/component: contour
|
||||
{{- if .Values.metrics.serviceMonitor.enabled }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ printf "%s-contour-metrics" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/component: contour
|
||||
spec:
|
||||
type: ClusterIP
|
||||
clusterIP: None
|
||||
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.contour.podLabels .Values.commonLabels ) "context" . ) }}
|
||||
selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/component: contour
|
||||
ports:
|
||||
- name: metrics
|
||||
port: {{ .Values.contour.service.ports.metrics }}
|
||||
protocol: TCP
|
||||
targetPort: metrics
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,21 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if and .Values.contour.serviceAccount.create .Values.contour.enabled }}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "contour.contourServiceAccountName" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.contour.image "chart" .Chart ) ) }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/component: contour
|
||||
{{- $mergedAnnotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.contour.serviceAccount.annotations .Values.commonAnnotations ) "context" . ) }}
|
||||
{{- if $mergedAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" $mergedAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
automountServiceAccountToken: {{ .Values.contour.serviceAccount.automountServiceAccountToken }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,47 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if and .Values.metrics.serviceMonitor.enabled .Values.contour.enabled }}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
name: {{ printf "%s-contour" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||
namespace: {{ default (include "common.names.namespace" .) .Values.metrics.serviceMonitor.namespace }}
|
||||
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.contour.image "chart" .Chart ) ) }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.metrics.serviceMonitor.labels .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/component: contour
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
jobLabel: {{ .Values.metrics.serviceMonitor.jobLabel | quote }}
|
||||
selector:
|
||||
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 6 }}
|
||||
app.kubernetes.io/component: contour
|
||||
{{- if .Values.metrics.serviceMonitor.selector }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.metrics.serviceMonitor.selector "context" $) | nindent 6 }}
|
||||
{{- end }}
|
||||
namespaceSelector:
|
||||
matchNames:
|
||||
- {{ include "common.names.namespace" . | quote }}
|
||||
endpoints:
|
||||
- port: metrics
|
||||
{{- if .Values.metrics.serviceMonitor.interval }}
|
||||
interval: {{ .Values.metrics.serviceMonitor.interval }}
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.serviceMonitor.scrapeTimeout }}
|
||||
scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }}
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.serviceMonitor.honorLabels }}
|
||||
honorLabels: {{ .Values.metrics.serviceMonitor.honorLabels }}
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.serviceMonitor.metricRelabelings }}
|
||||
metricRelabelings: {{ toYaml .Values.metrics.serviceMonitor.metricRelabelings | nindent 6 }}
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.serviceMonitor.relabelings }}
|
||||
relabelings: {{ toYaml .Values.metrics.serviceMonitor.relabelings | nindent 6 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,425 @@
|
||||
{{- if .Values.contour.manageCRDs }}
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.13.0
|
||||
name: extensionservices.projectcontour.io
|
||||
spec:
|
||||
preserveUnknownFields: false
|
||||
group: projectcontour.io
|
||||
names:
|
||||
kind: ExtensionService
|
||||
listKind: ExtensionServiceList
|
||||
plural: extensionservices
|
||||
shortNames:
|
||||
- extensionservice
|
||||
- extensionservices
|
||||
singular: extensionservice
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: ExtensionService is the schema for the Contour extension services
|
||||
API. An ExtensionService resource binds a network service to the Contour
|
||||
API so that Contour API features can be implemented by collaborating components.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: ExtensionServiceSpec defines the desired state of an ExtensionService
|
||||
resource.
|
||||
properties:
|
||||
loadBalancerPolicy:
|
||||
description: The policy for load balancing GRPC service requests.
|
||||
Note that the `Cookie` and `RequestHash` load balancing strategies
|
||||
cannot be used here.
|
||||
properties:
|
||||
requestHashPolicies:
|
||||
description: RequestHashPolicies contains a list of hash policies
|
||||
to apply when the `RequestHash` load balancing strategy is chosen.
|
||||
If an element of the supplied list of hash policies is invalid,
|
||||
it will be ignored. If the list of hash policies is empty after
|
||||
validation, the load balancing strategy will fall back to the
|
||||
default `RoundRobin`.
|
||||
items:
|
||||
description: RequestHashPolicy contains configuration for an
|
||||
individual hash policy on a request attribute.
|
||||
properties:
|
||||
hashSourceIP:
|
||||
description: HashSourceIP should be set to true when request
|
||||
source IP hash based load balancing is desired. It must
|
||||
be the only hash option field set, otherwise this request
|
||||
hash policy object will be ignored.
|
||||
type: boolean
|
||||
headerHashOptions:
|
||||
description: HeaderHashOptions should be set when request
|
||||
header hash based load balancing is desired. It must be
|
||||
the only hash option field set, otherwise this request
|
||||
hash policy object will be ignored.
|
||||
properties:
|
||||
headerName:
|
||||
description: HeaderName is the name of the HTTP request
|
||||
header that will be used to calculate the hash key.
|
||||
If the header specified is not present on a request,
|
||||
no hash will be produced.
|
||||
minLength: 1
|
||||
type: string
|
||||
type: object
|
||||
queryParameterHashOptions:
|
||||
description: QueryParameterHashOptions should be set when
|
||||
request query parameter hash based load balancing is desired.
|
||||
It must be the only hash option field set, otherwise this
|
||||
request hash policy object will be ignored.
|
||||
properties:
|
||||
parameterName:
|
||||
description: ParameterName is the name of the HTTP request
|
||||
query parameter that will be used to calculate the
|
||||
hash key. If the query parameter specified is not
|
||||
present on a request, no hash will be produced.
|
||||
minLength: 1
|
||||
type: string
|
||||
type: object
|
||||
terminal:
|
||||
description: Terminal is a flag that allows for short-circuiting
|
||||
computing of a hash for a given request. If set to true,
|
||||
and the request attribute specified in the attribute hash
|
||||
options is present, no further hash policies will be used
|
||||
to calculate a hash for the request.
|
||||
type: boolean
|
||||
type: object
|
||||
type: array
|
||||
strategy:
|
||||
description: Strategy specifies the policy used to balance requests
|
||||
across the pool of backend pods. Valid policy names are `Random`,
|
||||
`RoundRobin`, `WeightedLeastRequest`, `Cookie`, and `RequestHash`.
|
||||
If an unknown strategy name is specified or no policy is supplied,
|
||||
the default `RoundRobin` policy is used.
|
||||
type: string
|
||||
type: object
|
||||
protocol:
|
||||
description: Protocol may be used to specify (or override) the protocol
|
||||
used to reach this Service. Values may be h2 or h2c. If omitted,
|
||||
protocol-selection falls back on Service annotations.
|
||||
enum:
|
||||
- h2
|
||||
- h2c
|
||||
type: string
|
||||
protocolVersion:
|
||||
description: This field sets the version of the GRPC protocol that
|
||||
Envoy uses to send requests to the extension service. Since Contour
|
||||
always uses the v3 Envoy API, this is currently fixed at "v3". However,
|
||||
other protocol options will be available in future.
|
||||
enum:
|
||||
- v3
|
||||
type: string
|
||||
services:
|
||||
description: Services specifies the set of Kubernetes Service resources
|
||||
that receive GRPC extension API requests. If no weights are specified
|
||||
for any of the entries in this array, traffic will be spread evenly
|
||||
across all the services. Otherwise, traffic is balanced proportionally
|
||||
to the Weight field in each entry.
|
||||
items:
|
||||
description: ExtensionServiceTarget defines an Kubernetes Service
|
||||
to target with extension service traffic.
|
||||
properties:
|
||||
name:
|
||||
description: Name is the name of Kubernetes service that will
|
||||
accept service traffic.
|
||||
type: string
|
||||
port:
|
||||
description: Port (defined as Integer) to proxy traffic to since
|
||||
a service can have multiple defined.
|
||||
exclusiveMaximum: true
|
||||
maximum: 65536
|
||||
minimum: 1
|
||||
type: integer
|
||||
weight:
|
||||
description: Weight defines proportion of traffic to balance
|
||||
to the Kubernetes Service.
|
||||
format: int32
|
||||
type: integer
|
||||
required:
|
||||
- name
|
||||
- port
|
||||
type: object
|
||||
minItems: 1
|
||||
type: array
|
||||
timeoutPolicy:
|
||||
description: The timeout policy for requests to the services.
|
||||
properties:
|
||||
idle:
|
||||
description: Timeout for how long the proxy should wait while
|
||||
there is no activity during single request/response (for HTTP/1.1)
|
||||
or stream (for HTTP/2). Timeout will not trigger while HTTP/1.1
|
||||
connection is idle between two consecutive requests. If not
|
||||
specified, there is no per-route idle timeout, though a connection
|
||||
manager-wide stream_idle_timeout default of 5m still applies.
|
||||
pattern: ^(((\d*(\.\d*)?h)|(\d*(\.\d*)?m)|(\d*(\.\d*)?s)|(\d*(\.\d*)?ms)|(\d*(\.\d*)?us)|(\d*(\.\d*)?µs)|(\d*(\.\d*)?ns))+|infinity|infinite)$
|
||||
type: string
|
||||
idleConnection:
|
||||
description: Timeout for how long connection from the proxy to
|
||||
the upstream service is kept when there are no active requests.
|
||||
If not supplied, Envoy's default value of 1h applies.
|
||||
pattern: ^(((\d*(\.\d*)?h)|(\d*(\.\d*)?m)|(\d*(\.\d*)?s)|(\d*(\.\d*)?ms)|(\d*(\.\d*)?us)|(\d*(\.\d*)?µs)|(\d*(\.\d*)?ns))+|infinity|infinite)$
|
||||
type: string
|
||||
response:
|
||||
description: Timeout for receiving a response from the server
|
||||
after processing a request from client. If not supplied, Envoy's
|
||||
default value of 15s applies.
|
||||
pattern: ^(((\d*(\.\d*)?h)|(\d*(\.\d*)?m)|(\d*(\.\d*)?s)|(\d*(\.\d*)?ms)|(\d*(\.\d*)?us)|(\d*(\.\d*)?µs)|(\d*(\.\d*)?ns))+|infinity|infinite)$
|
||||
type: string
|
||||
type: object
|
||||
validation:
|
||||
description: UpstreamValidation defines how to verify the backend
|
||||
service's certificate
|
||||
properties:
|
||||
caSecret:
|
||||
description: Name or namespaced name of the Kubernetes secret
|
||||
used to validate the certificate presented by the backend. The
|
||||
secret must contain key named ca.crt. The name can be optionally
|
||||
prefixed with namespace "namespace/name". When cross-namespace
|
||||
reference is used, TLSCertificateDelegation resource must exist
|
||||
in the namespace to grant access to the secret.
|
||||
type: string
|
||||
subjectName:
|
||||
description: Key which is expected to be present in the 'subjectAltName'
|
||||
of the presented certificate.
|
||||
type: string
|
||||
required:
|
||||
- caSecret
|
||||
- subjectName
|
||||
type: object
|
||||
required:
|
||||
- services
|
||||
type: object
|
||||
status:
|
||||
description: ExtensionServiceStatus defines the observed state of an ExtensionService
|
||||
resource.
|
||||
properties:
|
||||
conditions:
|
||||
description: "Conditions contains the current status of the ExtensionService
|
||||
resource. \n Contour will update a single condition, `Valid`, that
|
||||
is in normal-true polarity. \n Contour will not modify any other
|
||||
Conditions set in this block, in case some other controller wants
|
||||
to add a Condition."
|
||||
items:
|
||||
description: "DetailedCondition is an extension of the normal Kubernetes
|
||||
conditions, with two extra fields to hold sub-conditions, which
|
||||
provide more detailed reasons for the state (True or False) of
|
||||
the condition. \n `errors` holds information about sub-conditions
|
||||
which are fatal to that condition and render its state False.
|
||||
\n `warnings` holds information about sub-conditions which are
|
||||
not fatal to that condition and do not force the state to be False.
|
||||
\n Remember that Conditions have a type, a status, and a reason.
|
||||
\n The type is the type of the condition, the most important one
|
||||
in this CRD set is `Valid`. `Valid` is a positive-polarity condition:
|
||||
when it is `status: true` there are no problems. \n In more detail,
|
||||
`status: true` means that the object is has been ingested into
|
||||
Contour with no errors. `warnings` may still be present, and will
|
||||
be indicated in the Reason field. There must be zero entries in
|
||||
the `errors` slice in this case. \n `Valid`, `status: false` means
|
||||
that the object has had one or more fatal errors during processing
|
||||
into Contour. The details of the errors will be present under
|
||||
the `errors` field. There must be at least one error in the `errors`
|
||||
slice if `status` is `false`. \n For DetailedConditions of types
|
||||
other than `Valid`, the Condition must be in the negative polarity.
|
||||
When they have `status` `true`, there is an error. There must
|
||||
be at least one entry in the `errors` Subcondition slice. When
|
||||
they have `status` `false`, there are no serious errors, and there
|
||||
must be zero entries in the `errors` slice. In either case, there
|
||||
may be entries in the `warnings` slice. \n Regardless of the polarity,
|
||||
the `reason` and `message` fields must be updated with either
|
||||
the detail of the reason (if there is one and only one entry in
|
||||
total across both the `errors` and `warnings` slices), or `MultipleReasons`
|
||||
if there is more than one entry."
|
||||
properties:
|
||||
errors:
|
||||
description: "Errors contains a slice of relevant error subconditions
|
||||
for this object. \n Subconditions are expected to appear when
|
||||
relevant (when there is a error), and disappear when not relevant.
|
||||
An empty slice here indicates no errors."
|
||||
items:
|
||||
description: "SubCondition is a Condition-like type intended
|
||||
for use as a subcondition inside a DetailedCondition. \n
|
||||
It contains a subset of the Condition fields. \n It is intended
|
||||
for warnings and errors, so `type` names should use abnormal-true
|
||||
polarity, that is, they should be of the form \"ErrorPresent:
|
||||
true\". \n The expected lifecycle for these errors is that
|
||||
they should only be present when the error or warning is,
|
||||
and should be removed when they are not relevant."
|
||||
properties:
|
||||
message:
|
||||
description: "Message is a human readable message indicating
|
||||
details about the transition. \n This may be an empty
|
||||
string."
|
||||
maxLength: 32768
|
||||
type: string
|
||||
reason:
|
||||
description: "Reason contains a programmatic identifier
|
||||
indicating the reason for the condition's last transition.
|
||||
Producers of specific condition types may define expected
|
||||
values and meanings for this field, and whether the
|
||||
values are considered a guaranteed API. \n The value
|
||||
should be a CamelCase string. \n This field may not
|
||||
be empty."
|
||||
maxLength: 1024
|
||||
minLength: 1
|
||||
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
|
||||
type: string
|
||||
status:
|
||||
description: Status of the condition, one of True, False,
|
||||
Unknown.
|
||||
enum:
|
||||
- "True"
|
||||
- "False"
|
||||
- Unknown
|
||||
type: string
|
||||
type:
|
||||
description: "Type of condition in `CamelCase` or in `foo.example.com/CamelCase`.
|
||||
\n This must be in abnormal-true polarity, that is,
|
||||
`ErrorFound` or `controller.io/ErrorFound`. \n The regex
|
||||
it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)"
|
||||
maxLength: 316
|
||||
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
|
||||
type: string
|
||||
required:
|
||||
- message
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
lastTransitionTime:
|
||||
description: lastTransitionTime is the last time the condition
|
||||
transitioned from one status to another. This should be when
|
||||
the underlying condition changed. If that is not known, then
|
||||
using the time when the API field changed is acceptable.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: message is a human readable message indicating
|
||||
details about the transition. This may be an empty string.
|
||||
maxLength: 32768
|
||||
type: string
|
||||
observedGeneration:
|
||||
description: observedGeneration represents the .metadata.generation
|
||||
that the condition was set based upon. For instance, if .metadata.generation
|
||||
is currently 12, but the .status.conditions[x].observedGeneration
|
||||
is 9, the condition is out of date with respect to the current
|
||||
state of the instance.
|
||||
format: int64
|
||||
minimum: 0
|
||||
type: integer
|
||||
reason:
|
||||
description: reason contains a programmatic identifier indicating
|
||||
the reason for the condition's last transition. Producers
|
||||
of specific condition types may define expected values and
|
||||
meanings for this field, and whether the values are considered
|
||||
a guaranteed API. The value should be a CamelCase string.
|
||||
This field may not be empty.
|
||||
maxLength: 1024
|
||||
minLength: 1
|
||||
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
|
||||
type: string
|
||||
status:
|
||||
description: status of the condition, one of True, False, Unknown.
|
||||
enum:
|
||||
- "True"
|
||||
- "False"
|
||||
- Unknown
|
||||
type: string
|
||||
type:
|
||||
description: type of condition in CamelCase or in foo.example.com/CamelCase.
|
||||
--- Many .condition.type values are consistent across resources
|
||||
like Available, but because arbitrary conditions can be useful
|
||||
(see .node.status.conditions), the ability to deconflict is
|
||||
important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
|
||||
maxLength: 316
|
||||
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
|
||||
type: string
|
||||
warnings:
|
||||
description: "Warnings contains a slice of relevant warning
|
||||
subconditions for this object. \n Subconditions are expected
|
||||
to appear when relevant (when there is a warning), and disappear
|
||||
when not relevant. An empty slice here indicates no warnings."
|
||||
items:
|
||||
description: "SubCondition is a Condition-like type intended
|
||||
for use as a subcondition inside a DetailedCondition. \n
|
||||
It contains a subset of the Condition fields. \n It is intended
|
||||
for warnings and errors, so `type` names should use abnormal-true
|
||||
polarity, that is, they should be of the form \"ErrorPresent:
|
||||
true\". \n The expected lifecycle for these errors is that
|
||||
they should only be present when the error or warning is,
|
||||
and should be removed when they are not relevant."
|
||||
properties:
|
||||
message:
|
||||
description: "Message is a human readable message indicating
|
||||
details about the transition. \n This may be an empty
|
||||
string."
|
||||
maxLength: 32768
|
||||
type: string
|
||||
reason:
|
||||
description: "Reason contains a programmatic identifier
|
||||
indicating the reason for the condition's last transition.
|
||||
Producers of specific condition types may define expected
|
||||
values and meanings for this field, and whether the
|
||||
values are considered a guaranteed API. \n The value
|
||||
should be a CamelCase string. \n This field may not
|
||||
be empty."
|
||||
maxLength: 1024
|
||||
minLength: 1
|
||||
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
|
||||
type: string
|
||||
status:
|
||||
description: Status of the condition, one of True, False,
|
||||
Unknown.
|
||||
enum:
|
||||
- "True"
|
||||
- "False"
|
||||
- Unknown
|
||||
type: string
|
||||
type:
|
||||
description: "Type of condition in `CamelCase` or in `foo.example.com/CamelCase`.
|
||||
\n This must be in abnormal-true polarity, that is,
|
||||
`ErrorFound` or `controller.io/ErrorFound`. \n The regex
|
||||
it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)"
|
||||
maxLength: 316
|
||||
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
|
||||
type: string
|
||||
required:
|
||||
- message
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- message
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-map-keys:
|
||||
- type
|
||||
x-kubernetes-list-type: map
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
{{- end }}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,291 @@
|
||||
{{- if .Values.contour.manageCRDs }}
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.13.0
|
||||
name: tlscertificatedelegations.projectcontour.io
|
||||
spec:
|
||||
preserveUnknownFields: false
|
||||
group: projectcontour.io
|
||||
names:
|
||||
kind: TLSCertificateDelegation
|
||||
listKind: TLSCertificateDelegationList
|
||||
plural: tlscertificatedelegations
|
||||
shortNames:
|
||||
- tlscerts
|
||||
singular: tlscertificatedelegation
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: TLSCertificateDelegation is an TLS Certificate Delegation CRD
|
||||
specification. See design/tls-certificate-delegation.md for details.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: TLSCertificateDelegationSpec defines the spec of the CRD
|
||||
properties:
|
||||
delegations:
|
||||
items:
|
||||
description: CertificateDelegation maps the authority to reference
|
||||
a secret in the current namespace to a set of namespaces.
|
||||
properties:
|
||||
secretName:
|
||||
description: required, the name of a secret in the current namespace.
|
||||
type: string
|
||||
targetNamespaces:
|
||||
description: required, the namespaces the authority to reference
|
||||
the secret will be delegated to. If TargetNamespaces is nil
|
||||
or empty, the CertificateDelegation' is ignored. If the TargetNamespace
|
||||
list contains the character, "*" the secret will be delegated
|
||||
to all namespaces.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- secretName
|
||||
- targetNamespaces
|
||||
type: object
|
||||
type: array
|
||||
required:
|
||||
- delegations
|
||||
type: object
|
||||
status:
|
||||
description: TLSCertificateDelegationStatus allows for the status of the
|
||||
delegation to be presented to the user.
|
||||
properties:
|
||||
conditions:
|
||||
description: "Conditions contains information about the current status
|
||||
of the HTTPProxy, in an upstream-friendly container. \n Contour
|
||||
will update a single condition, `Valid`, that is in normal-true
|
||||
polarity. That is, when `currentStatus` is `valid`, the `Valid`
|
||||
condition will be `status: true`, and vice versa. \n Contour will
|
||||
leave untouched any other Conditions set in this block, in case
|
||||
some other controller wants to add a Condition. \n If you are another
|
||||
controller owner and wish to add a condition, you *should* namespace
|
||||
your condition with a label, like `controller.domain.com\\ConditionName`."
|
||||
items:
|
||||
description: "DetailedCondition is an extension of the normal Kubernetes
|
||||
conditions, with two extra fields to hold sub-conditions, which
|
||||
provide more detailed reasons for the state (True or False) of
|
||||
the condition. \n `errors` holds information about sub-conditions
|
||||
which are fatal to that condition and render its state False.
|
||||
\n `warnings` holds information about sub-conditions which are
|
||||
not fatal to that condition and do not force the state to be False.
|
||||
\n Remember that Conditions have a type, a status, and a reason.
|
||||
\n The type is the type of the condition, the most important one
|
||||
in this CRD set is `Valid`. `Valid` is a positive-polarity condition:
|
||||
when it is `status: true` there are no problems. \n In more detail,
|
||||
`status: true` means that the object is has been ingested into
|
||||
Contour with no errors. `warnings` may still be present, and will
|
||||
be indicated in the Reason field. There must be zero entries in
|
||||
the `errors` slice in this case. \n `Valid`, `status: false` means
|
||||
that the object has had one or more fatal errors during processing
|
||||
into Contour. The details of the errors will be present under
|
||||
the `errors` field. There must be at least one error in the `errors`
|
||||
slice if `status` is `false`. \n For DetailedConditions of types
|
||||
other than `Valid`, the Condition must be in the negative polarity.
|
||||
When they have `status` `true`, there is an error. There must
|
||||
be at least one entry in the `errors` Subcondition slice. When
|
||||
they have `status` `false`, there are no serious errors, and there
|
||||
must be zero entries in the `errors` slice. In either case, there
|
||||
may be entries in the `warnings` slice. \n Regardless of the polarity,
|
||||
the `reason` and `message` fields must be updated with either
|
||||
the detail of the reason (if there is one and only one entry in
|
||||
total across both the `errors` and `warnings` slices), or `MultipleReasons`
|
||||
if there is more than one entry."
|
||||
properties:
|
||||
errors:
|
||||
description: "Errors contains a slice of relevant error subconditions
|
||||
for this object. \n Subconditions are expected to appear when
|
||||
relevant (when there is a error), and disappear when not relevant.
|
||||
An empty slice here indicates no errors."
|
||||
items:
|
||||
description: "SubCondition is a Condition-like type intended
|
||||
for use as a subcondition inside a DetailedCondition. \n
|
||||
It contains a subset of the Condition fields. \n It is intended
|
||||
for warnings and errors, so `type` names should use abnormal-true
|
||||
polarity, that is, they should be of the form \"ErrorPresent:
|
||||
true\". \n The expected lifecycle for these errors is that
|
||||
they should only be present when the error or warning is,
|
||||
and should be removed when they are not relevant."
|
||||
properties:
|
||||
message:
|
||||
description: "Message is a human readable message indicating
|
||||
details about the transition. \n This may be an empty
|
||||
string."
|
||||
maxLength: 32768
|
||||
type: string
|
||||
reason:
|
||||
description: "Reason contains a programmatic identifier
|
||||
indicating the reason for the condition's last transition.
|
||||
Producers of specific condition types may define expected
|
||||
values and meanings for this field, and whether the
|
||||
values are considered a guaranteed API. \n The value
|
||||
should be a CamelCase string. \n This field may not
|
||||
be empty."
|
||||
maxLength: 1024
|
||||
minLength: 1
|
||||
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
|
||||
type: string
|
||||
status:
|
||||
description: Status of the condition, one of True, False,
|
||||
Unknown.
|
||||
enum:
|
||||
- "True"
|
||||
- "False"
|
||||
- Unknown
|
||||
type: string
|
||||
type:
|
||||
description: "Type of condition in `CamelCase` or in `foo.example.com/CamelCase`.
|
||||
\n This must be in abnormal-true polarity, that is,
|
||||
`ErrorFound` or `controller.io/ErrorFound`. \n The regex
|
||||
it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)"
|
||||
maxLength: 316
|
||||
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
|
||||
type: string
|
||||
required:
|
||||
- message
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
lastTransitionTime:
|
||||
description: lastTransitionTime is the last time the condition
|
||||
transitioned from one status to another. This should be when
|
||||
the underlying condition changed. If that is not known, then
|
||||
using the time when the API field changed is acceptable.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: message is a human readable message indicating
|
||||
details about the transition. This may be an empty string.
|
||||
maxLength: 32768
|
||||
type: string
|
||||
observedGeneration:
|
||||
description: observedGeneration represents the .metadata.generation
|
||||
that the condition was set based upon. For instance, if .metadata.generation
|
||||
is currently 12, but the .status.conditions[x].observedGeneration
|
||||
is 9, the condition is out of date with respect to the current
|
||||
state of the instance.
|
||||
format: int64
|
||||
minimum: 0
|
||||
type: integer
|
||||
reason:
|
||||
description: reason contains a programmatic identifier indicating
|
||||
the reason for the condition's last transition. Producers
|
||||
of specific condition types may define expected values and
|
||||
meanings for this field, and whether the values are considered
|
||||
a guaranteed API. The value should be a CamelCase string.
|
||||
This field may not be empty.
|
||||
maxLength: 1024
|
||||
minLength: 1
|
||||
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
|
||||
type: string
|
||||
status:
|
||||
description: status of the condition, one of True, False, Unknown.
|
||||
enum:
|
||||
- "True"
|
||||
- "False"
|
||||
- Unknown
|
||||
type: string
|
||||
type:
|
||||
description: type of condition in CamelCase or in foo.example.com/CamelCase.
|
||||
--- Many .condition.type values are consistent across resources
|
||||
like Available, but because arbitrary conditions can be useful
|
||||
(see .node.status.conditions), the ability to deconflict is
|
||||
important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
|
||||
maxLength: 316
|
||||
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
|
||||
type: string
|
||||
warnings:
|
||||
description: "Warnings contains a slice of relevant warning
|
||||
subconditions for this object. \n Subconditions are expected
|
||||
to appear when relevant (when there is a warning), and disappear
|
||||
when not relevant. An empty slice here indicates no warnings."
|
||||
items:
|
||||
description: "SubCondition is a Condition-like type intended
|
||||
for use as a subcondition inside a DetailedCondition. \n
|
||||
It contains a subset of the Condition fields. \n It is intended
|
||||
for warnings and errors, so `type` names should use abnormal-true
|
||||
polarity, that is, they should be of the form \"ErrorPresent:
|
||||
true\". \n The expected lifecycle for these errors is that
|
||||
they should only be present when the error or warning is,
|
||||
and should be removed when they are not relevant."
|
||||
properties:
|
||||
message:
|
||||
description: "Message is a human readable message indicating
|
||||
details about the transition. \n This may be an empty
|
||||
string."
|
||||
maxLength: 32768
|
||||
type: string
|
||||
reason:
|
||||
description: "Reason contains a programmatic identifier
|
||||
indicating the reason for the condition's last transition.
|
||||
Producers of specific condition types may define expected
|
||||
values and meanings for this field, and whether the
|
||||
values are considered a guaranteed API. \n The value
|
||||
should be a CamelCase string. \n This field may not
|
||||
be empty."
|
||||
maxLength: 1024
|
||||
minLength: 1
|
||||
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
|
||||
type: string
|
||||
status:
|
||||
description: Status of the condition, one of True, False,
|
||||
Unknown.
|
||||
enum:
|
||||
- "True"
|
||||
- "False"
|
||||
- Unknown
|
||||
type: string
|
||||
type:
|
||||
description: "Type of condition in `CamelCase` or in `foo.example.com/CamelCase`.
|
||||
\n This must be in abnormal-true polarity, that is,
|
||||
`ErrorFound` or `controller.io/ErrorFound`. \n The regex
|
||||
it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)"
|
||||
maxLength: 316
|
||||
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
|
||||
type: string
|
||||
required:
|
||||
- message
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- message
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-map-keys:
|
||||
- type
|
||||
x-kubernetes-list-type: map
|
||||
type: object
|
||||
required:
|
||||
- metadata
|
||||
- spec
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,172 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if .Values.defaultBackend.enabled }}
|
||||
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ printf "%s-default-backend" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.defaultBackend.image "chart" .Chart ) ) }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/component: default-backend
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.defaultBackend.podLabels .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
selector:
|
||||
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
|
||||
app.kubernetes.io/component: default-backend
|
||||
replicas: {{ .Values.defaultBackend.replicaCount }}
|
||||
{{- if .Values.defaultBackend.updateStrategy }}
|
||||
strategy: {{- toYaml .Values.defaultBackend.updateStrategy | nindent 4 }}
|
||||
{{- end }}
|
||||
template:
|
||||
metadata:
|
||||
{{- if or .Values.defaultBackend.podAnnotations .Values.commonAnnotations }}
|
||||
{{- $podAnnotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.defaultBackend.podAnnotations .Values.commonAnnotations ) "context" . ) }}
|
||||
annotations: {{- include "common.tplvalues.render" (dict "value" $podAnnotations "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }}
|
||||
app.kubernetes.io/component: default-backend
|
||||
spec:
|
||||
{{- include "common.images.pullSecrets" ( dict "images" (list .Values.defaultBackend.image) "global" .Values.global) | nindent 6 }}
|
||||
{{- if .Values.defaultBackend.hostAliases }}
|
||||
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.defaultBackend.hostAliases "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.defaultBackend.priorityClassName }}
|
||||
priorityClassName: {{ .Values.defaultBackend.priorityClassName | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.defaultBackend.affinity }}
|
||||
affinity: {{- include "common.tplvalues.render" ( dict "value" .Values.defaultBackend.affinity "context" $) | nindent 8 }}
|
||||
{{- else }}
|
||||
affinity:
|
||||
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.defaultBackend.podAffinityPreset "component" "default-backend" "customLabels" $podLabels "context" $) | nindent 10 }}
|
||||
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.defaultBackend.podAntiAffinityPreset "component" "default-backend" "customLabels" $podLabels "context" $) | nindent 10 }}
|
||||
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.defaultBackend.nodeAffinityPreset.type "key" .Values.defaultBackend.nodeAffinityPreset.key "values" .Values.defaultBackend.nodeAffinityPreset.values) | nindent 10 }}
|
||||
{{- end }}
|
||||
{{- if .Values.defaultBackend.nodeSelector }}
|
||||
nodeSelector: {{- include "common.tplvalues.render" ( dict "value" .Values.defaultBackend.nodeSelector "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.defaultBackend.tolerations }}
|
||||
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.defaultBackend.tolerations "context" .) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.defaultBackend.podSecurityContext.enabled }}
|
||||
securityContext: {{- omit .Values.defaultBackend.podSecurityContext "enabled" | toYaml | nindent 8 }}
|
||||
{{- end }}
|
||||
automountServiceAccountToken: false
|
||||
serviceAccountName: {{ include "envoy.envoyServiceAccountName" . }}
|
||||
{{- if .Values.defaultBackend.schedulerName }}
|
||||
schedulerName: {{ .Values.defaultBackend.schedulerName | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.defaultBackend.topologySpreadConstraints }}
|
||||
topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.defaultBackend.topologySpreadConstraints "context" .) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.defaultBackend.terminationGracePeriodSeconds }}
|
||||
terminationGracePeriodSeconds: {{ .Values.defaultBackend.terminationGracePeriodSeconds }}
|
||||
{{- end }}
|
||||
{{- if .Values.defaultBackend.initContainers }}
|
||||
initContainers: {{- include "common.tplvalues.render" ( dict "value" .Values.defaultBackend.initContainers "context" $ ) | nindent 6 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: default-backend
|
||||
image: {{ include "common.images.image" ( dict "imageRoot" .Values.defaultBackend.image "global" .Values.global) }}
|
||||
imagePullPolicy: {{ .Values.defaultBackend.image.pullPolicy | quote }}
|
||||
{{- if .Values.defaultBackend.containerSecurityContext.enabled }}
|
||||
securityContext: {{- omit .Values.defaultBackend.containerSecurityContext "enabled" | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.defaultBackend.command }}
|
||||
command: {{- include "common.tplvalues.render" (dict "value" .Values.defaultBackend.command "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.defaultBackend.args }}
|
||||
args: {{- include "common.tplvalues.render" (dict "value" .Values.defaultBackend.args "context" $) | nindent 12 }}
|
||||
{{- else }}
|
||||
args:
|
||||
{{- range $key, $value := .Values.defaultBackend.extraArgs }}
|
||||
{{- if $value }}
|
||||
- --{{ $key }}={{ $value }}
|
||||
{{- else }}
|
||||
- --{{ $key }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.defaultBackend.lifecycleHooks }}
|
||||
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.defaultBackend.lifecycleHooks "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.defaultBackend.extraEnvVars }}
|
||||
env: {{- include "common.tplvalues.render" (dict "value" .Values.defaultBackend.extraEnvVars "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if or .Values.defaultBackend.extraEnvVarsCM .Values.defaultBackend.extraEnvVarsSecret }}
|
||||
envFrom:
|
||||
{{- if .Values.defaultBackend.extraEnvVarsCM }}
|
||||
- configMapRef:
|
||||
name: {{ include "common.tplvalues.render" ( dict "value" .Values.defaultBackend.extraEnvVarsCM "context" $ ) }}
|
||||
{{- end }}
|
||||
{{- if .Values.defaultBackend.extraEnvVarsSecret }}
|
||||
- secretRef:
|
||||
name: {{ include "common.tplvalues.render" ( dict "value" .Values.defaultBackend.extraEnvVarsSecret "context" $ ) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.defaultBackend.customLivenessProbe }}
|
||||
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.defaultBackend.customLivenessProbe "context" $) | nindent 12 }}
|
||||
{{- else if .Values.defaultBackend.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
scheme: HTTP
|
||||
initialDelaySeconds: {{ .Values.defaultBackend.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.defaultBackend.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.defaultBackend.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.defaultBackend.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.defaultBackend.livenessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.defaultBackend.customReadinessProbe }}
|
||||
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.defaultBackend.customReadinessProbe "context" $) | nindent 12 }}
|
||||
{{- else if .Values.defaultBackend.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
scheme: HTTP
|
||||
initialDelaySeconds: {{ .Values.defaultBackend.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.defaultBackend.readinessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.defaultBackend.readinessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.defaultBackend.readinessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.defaultBackend.readinessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.defaultBackend.customStartupProbe }}
|
||||
startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.defaultBackend.customStartupProbe "context" $) | nindent 12 }}
|
||||
{{- else if .Values.defaultBackend.startupProbe.enabled }}
|
||||
startupProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
scheme: HTTP
|
||||
initialDelaySeconds: {{ .Values.defaultBackend.startupProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.defaultBackend.startupProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.defaultBackend.startupProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.defaultBackend.startupProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.defaultBackend.startupProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: {{ .Values.defaultBackend.containerPorts.http }}
|
||||
protocol: TCP
|
||||
{{- if .Values.defaultBackend.resources }}
|
||||
resources: {{- toYaml .Values.defaultBackend.resources | nindent 12 }}
|
||||
{{- if .Values.defaultBackend.extraVolumeMounts }}
|
||||
volumeMounts: {{- include "common.tplvalues.render" ( dict "value" .Values.contour.extraVolumeMounts "context" $ ) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.defaultBackend.sidecars }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.defaultBackend.sidecars "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.defaultBackend.extraVolumes }}
|
||||
volumes: {{- include "common.tplvalues.render" ( dict "value" .Values.defaultBackend.extraVolumes "context" $ ) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,70 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if .Values.defaultBackend.enabled }}
|
||||
apiVersion: {{ include "common.capabilities.ingress.apiVersion" . }}
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ printf "%s-default-backend" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.defaultBackend.image "chart" .Chart ) ) }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: {{ include "contour.ingressClassName" . }}
|
||||
{{- if .Values.ingress.certManager }}
|
||||
kubernetes.io/tls-acme: "true"
|
||||
{{- end }}
|
||||
{{- if or .Values.ingress.annotations .Values.commonAnnotations }}
|
||||
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.ingress.annotations .Values.commonAnnotations ) "context" . ) }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if and .Values.ingress.ingressClassName (eq "true" (include "common.ingress.supportsIngressClassname" .)) }}
|
||||
ingressClassName: {{ .Values.ingress.ingressClassName | quote }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- if .Values.ingress.rulesOverride }}
|
||||
{{- toYaml .Values.ingress.rulesOverride | nindent 4 }}
|
||||
{{- else }}
|
||||
{{- if .Values.ingress.hostname }}
|
||||
- host: {{ .Values.ingress.hostname | quote }}
|
||||
http:
|
||||
paths:
|
||||
{{- if .Values.ingress.extraPaths }}
|
||||
{{- toYaml .Values.ingress.extraPaths | nindent 10 }}
|
||||
{{- end }}
|
||||
- path: {{ .Values.ingress.path }}
|
||||
{{- if eq "true" (include "common.ingress.supportsPathType" .) }}
|
||||
pathType: {{ .Values.ingress.pathType }}
|
||||
{{- end }}
|
||||
backend: {{- include "common.ingress.backend" (dict "serviceName" (printf "%s-default-backend" (include "common.names.fullname" .)) "servicePort" "http" "context" $) | nindent 14 }}
|
||||
{{- end }}
|
||||
{{- range .Values.ingress.extraHosts }}
|
||||
- host: {{ .name | quote }}
|
||||
http:
|
||||
paths:
|
||||
- path: {{ default "/" .path }}
|
||||
{{- if eq "true" (include "common.ingress.supportsPathType" $) }}
|
||||
pathType: {{ default "ImplementationSpecific" .pathType }}
|
||||
{{- end }}
|
||||
backend: {{- include "common.ingress.backend" (dict "serviceName" (printf "%s-default-backend" (include "common.names.fullname" $)) "servicePort" "http" "context" $) | nindent 14 }}
|
||||
{{- end }}
|
||||
{{- if .Values.ingress.extraRules }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.ingress.extraRules "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if or (and .Values.ingress.tls (or .Values.ingress.certManager .Values.ingress.selfSigned)) .Values.ingress.extraTls }}
|
||||
tls:
|
||||
{{- if and .Values.ingress.tls (or .Values.ingress.certManager .Values.ingress.selfSigned) }}
|
||||
- hosts:
|
||||
- {{ .Values.ingress.hostname | quote }}
|
||||
secretName: {{ printf "%s-tls" .Values.ingress.hostname }}
|
||||
{{- end }}
|
||||
{{- if .Values.ingress.extraTls }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.ingress.extraTls "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,30 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if and .Values.defaultBackend.enabled .Values.defaultBackend.pdb.create }}
|
||||
apiVersion: {{ include "common.capabilities.policy.apiVersion" . }}
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: {{ printf "%s-default-backend" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.defaultBackend.image "chart" .Chart ) ) }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/component: default-backend
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.defaultBackend.pdb.minAvailable }}
|
||||
minAvailable: {{ .Values.defaultBackend.pdb.minAvailable }}
|
||||
{{- end }}
|
||||
{{- if .Values.defaultBackend.pdb.maxUnavailable }}
|
||||
maxUnavailable: {{ .Values.defaultBackend.pdb.maxUnavailable }}
|
||||
{{- end }}
|
||||
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.defaultBackend.podLabels .Values.commonLabels ) "context" . ) }}
|
||||
selector:
|
||||
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
|
||||
app.kubernetes.io/component: default-backend
|
||||
{{- end }}
|
||||
@@ -0,0 +1,30 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if .Values.defaultBackend.enabled }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ printf "%s-default-backend" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.defaultBackend.image "chart" .Chart ) ) }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/component: default-backend
|
||||
{{- if or .Values.defaultBackend.service.annotations .Values.commonAnnotations }}
|
||||
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.defaultBackend.service.annotations .Values.commonAnnotations ) "context" . ) }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: {{ .Values.defaultBackend.service.type }}
|
||||
ports:
|
||||
- name: http
|
||||
port: {{ .Values.defaultBackend.service.ports.http }}
|
||||
protocol: TCP
|
||||
targetPort: http
|
||||
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.defaultBackend.podLabels .Values.commonLabels ) "context" . ) }}
|
||||
selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/component: default-backend
|
||||
{{- end }}
|
||||
@@ -0,0 +1,46 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if .Values.ingress.enabled }}
|
||||
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.defaultBackend.image "chart" .Chart ) ) }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
{{- if .Values.ingress.secrets }}
|
||||
{{- range .Values.ingress.secrets }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ .name }}
|
||||
namespace: {{ include "common.names.namespace" $ | quote }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
{{- if $.Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" $.Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
type: kubernetes.io/tls
|
||||
data:
|
||||
tls.crt: {{ .certificate | b64enc }}
|
||||
tls.key: {{ .key | b64enc }}
|
||||
---
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if and .Values.ingress.tls .Values.ingress.selfSigned }}
|
||||
{{- $secretName := printf "%s-tls" .Values.ingress.hostname }}
|
||||
{{- $ca := genCA "odoo-ca" 365 }}
|
||||
{{- $cert := genSignedCert .Values.ingress.hostname nil (list .Values.ingress.hostname) 365 $ca }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ $secretName }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
type: kubernetes.io/tls
|
||||
data:
|
||||
tls.crt: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "tls.crt" "defaultValue" $cert.Cert "context" $) }}
|
||||
tls.key: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "tls.key" "defaultValue" $cert.Key "context" $) }}
|
||||
ca.crt: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "ca.crt" "defaultValue" $ca.Cert "context" $) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,313 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if and .Values.envoy.enabled (eq .Values.envoy.kind "daemonset") }}
|
||||
apiVersion: apps/v1
|
||||
kind: DaemonSet
|
||||
metadata:
|
||||
name: {{ printf "%s-envoy" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.envoy.image "chart" .Chart ) ) }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/component: envoy
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.envoy.updateStrategy }}
|
||||
updateStrategy: {{- toYaml .Values.envoy.updateStrategy | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.envoy.podLabels .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
selector:
|
||||
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
|
||||
app.kubernetes.io/component: envoy
|
||||
template:
|
||||
metadata:
|
||||
{{- if or .Values.envoy.podAnnotations .Values.commonAnnotations }}
|
||||
{{- $podAnnotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.envoy.podAnnotations .Values.commonAnnotations ) "context" . ) }}
|
||||
annotations: {{- include "common.tplvalues.render" (dict "value" $podAnnotations "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }}
|
||||
app.kubernetes.io/component: envoy
|
||||
spec:
|
||||
{{- include "common.images.pullSecrets" ( dict "images" (list .Values.contour.image .Values.envoy.image) "global" .Values.global) | nindent 6 }}
|
||||
{{- if .Values.envoy.hostAliases }}
|
||||
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.envoy.hostAliases "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.envoy.priorityClassName }}
|
||||
priorityClassName: {{ .Values.envoy.priorityClassName | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.envoy.affinity }}
|
||||
affinity: {{- include "common.tplvalues.render" (dict "value" .Values.envoy.affinity "context" $) | nindent 8 }}
|
||||
{{- else }}
|
||||
affinity:
|
||||
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.envoy.podAffinityPreset "component" "envoy" "customLabels" $podLabels "context" $) | nindent 10 }}
|
||||
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.envoy.podAntiAffinityPreset "component" "envoy" "customLabels" $podLabels "context" $) | nindent 10 }}
|
||||
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.envoy.nodeAffinityPreset.type "key" .Values.envoy.nodeAffinityPreset.key "values" .Values.envoy.nodeAffinityPreset.values) | nindent 10 }}
|
||||
{{- end }}
|
||||
{{- if .Values.envoy.nodeSelector }}
|
||||
nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.envoy.nodeSelector "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.envoy.tolerations }}
|
||||
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.envoy.tolerations "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
terminationGracePeriodSeconds: {{ .Values.envoy.terminationGracePeriodSeconds }}
|
||||
hostNetwork: {{ .Values.envoy.hostNetwork }}
|
||||
dnsPolicy: {{ .Values.envoy.dnsPolicy }}
|
||||
{{- if .Values.envoy.podSecurityContext.enabled }}
|
||||
securityContext: {{- omit .Values.envoy.podSecurityContext "enabled" | toYaml | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
{{- if .Values.envoy.shutdownManager.enabled }}
|
||||
- command:
|
||||
- contour
|
||||
args:
|
||||
- envoy
|
||||
- shutdown-manager
|
||||
{{- if .Values.envoy.shutdownManager.extraArgs }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.envoy.shutdownManager.extraArgs "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
image: {{ include "common.images.image" ( dict "imageRoot" .Values.contour.image "global" .Values.global) }}
|
||||
imagePullPolicy: {{ .Values.contour.image.pullPolicy }}
|
||||
{{- if .Values.contour.extraEnvVars }}
|
||||
env:
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.contour.extraEnvVars "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if or .Values.contour.extraEnvVarsCM .Values.contour.extraEnvVarsSecret }}
|
||||
envFrom:
|
||||
{{- if .Values.contour.extraEnvVarsCM }}
|
||||
- configMapRef:
|
||||
name: {{ include "common.tplvalues.render" ( dict "value" .Values.contour.extraEnvVarsCM "context" $ ) }}
|
||||
{{- end }}
|
||||
{{- if .Values.contour.extraEnvVarsSecret }}
|
||||
- secretRef:
|
||||
name: {{ include "common.tplvalues.render" ( dict "value" .Values.contour.extraEnvVarsSecret "context" $ ) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.envoy.shutdownManager.containerSecurityContext.enabled }}
|
||||
securityContext: {{- omit .Values.envoy.shutdownManager.containerSecurityContext "enabled" | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.envoy.lifecycleHooks }}
|
||||
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.envoy.lifecycleHooks "context" $) | nindent 12 }}
|
||||
{{- else }}
|
||||
lifecycle:
|
||||
preStop:
|
||||
exec:
|
||||
command:
|
||||
- contour
|
||||
- envoy
|
||||
- shutdown
|
||||
{{- end }}
|
||||
name: shutdown-manager
|
||||
resources: {{- toYaml .Values.envoy.shutdownManager.resources | nindent 12 }}
|
||||
volumeMounts:
|
||||
- name: envoy-admin
|
||||
mountPath: /admin
|
||||
{{- if .Values.envoy.extraVolumeMounts }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.envoy.extraVolumeMounts "context" $ ) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
- name: envoy
|
||||
{{- if .Values.envoy.command }}
|
||||
command: {{- include "common.tplvalues.render" (dict "value" .Values.envoy.command "context" $) | nindent 12 }}
|
||||
{{- else }}
|
||||
command:
|
||||
- envoy
|
||||
{{- end }}
|
||||
{{- if .Values.envoy.args }}
|
||||
args: {{- include "common.tplvalues.render" (dict "value" .Values.envoy.args "context" $) | nindent 12 }}
|
||||
{{- else }}
|
||||
args:
|
||||
- -c
|
||||
- /config/envoy.json
|
||||
- --service-cluster $(CONTOUR_NAMESPACE)
|
||||
- --service-node $(ENVOY_POD_NAME)
|
||||
- --log-level {{ .Values.envoy.logLevel }}
|
||||
{{- if .Values.envoy.extraArgs }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.envoy.extraArgs "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
image: {{ include "common.images.image" ( dict "imageRoot" .Values.envoy.image "global" .Values.global ) }}
|
||||
imagePullPolicy: {{ .Values.envoy.image.pullPolicy }}
|
||||
{{- if .Values.envoy.containerSecurityContext.enabled }}
|
||||
securityContext: {{- omit .Values.envoy.containerSecurityContext "enabled" | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
env:
|
||||
- name: CONTOUR_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
apiVersion: v1
|
||||
fieldPath: metadata.namespace
|
||||
- name: ENVOY_POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
apiVersion: v1
|
||||
fieldPath: metadata.name
|
||||
{{- if .Values.envoy.extraEnvVars }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.envoy.extraEnvVars "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if or .Values.envoy.extraEnvVarsCM .Values.envoy.extraEnvVarsSecret }}
|
||||
envFrom:
|
||||
{{- if .Values.envoy.extraEnvVarsCM }}
|
||||
- configMapRef:
|
||||
name: {{ include "common.tplvalues.render" ( dict "value" .Values.envoy.extraEnvVarsCM "context" $ ) }}
|
||||
{{- end }}
|
||||
{{- if .Values.envoy.extraEnvVarsSecret }}
|
||||
- secretRef:
|
||||
name: {{ include "common.tplvalues.render" ( dict "value" .Values.envoy.extraEnvVarsSecret "context" $ ) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- containerPort: {{ .Values.envoy.containerPorts.http }}
|
||||
# Use of .Values.envoy.useHostPort as boolean is DEPRECATED. Support will be removed in upcoming versions.
|
||||
{{- if or (and (kindIs "boolean" .Values.envoy.useHostPort) .Values.envoy.useHostPort) (and (kindIs "map" .Values.envoy.useHostPort) .Values.envoy.useHostPort.http) }}
|
||||
hostPort: {{ .Values.envoy.hostPorts.http }}
|
||||
{{- end }}
|
||||
{{- if .Values.envoy.useHostIP }}
|
||||
hostIP: {{ .Values.envoy.hostIPs.http }}
|
||||
{{- end }}
|
||||
name: http
|
||||
protocol: TCP
|
||||
- containerPort: {{ .Values.envoy.containerPorts.https }}
|
||||
# Use of .Values.envoy.useHostPort as boolean is DEPRECATED. Support will be removed in upcoming versions.
|
||||
{{- if or (and (kindIs "boolean" .Values.envoy.useHostPort) .Values.envoy.useHostPort) (and (kindIs "map" .Values.envoy.useHostPort) .Values.envoy.useHostPort.https) }}
|
||||
hostPort: {{ .Values.envoy.hostPorts.https }}
|
||||
{{- end }}
|
||||
{{- if .Values.envoy.useHostIP }}
|
||||
hostIP: {{ .Values.envoy.hostIPs.https }}
|
||||
{{- end }}
|
||||
name: https
|
||||
protocol: TCP
|
||||
- containerPort: {{ .Values.envoy.containerPorts.metrics }}
|
||||
# Use of .Values.envoy.useHostPort as boolean is DEPRECATED. Support will be removed in upcoming versions.
|
||||
{{- if or (and (kindIs "boolean" .Values.envoy.useHostPort) .Values.envoy.useHostPort) (and (kindIs "map" .Values.envoy.useHostPort) .Values.envoy.useHostPort.metrics) }}
|
||||
hostPort: {{ .Values.envoy.hostPorts.metrics }}
|
||||
{{- end }}
|
||||
{{- if .Values.envoy.useHostIP }}
|
||||
hostIP: {{ .Values.envoy.hostIPs.metrics }}
|
||||
{{- end }}
|
||||
name: metrics
|
||||
protocol: TCP
|
||||
{{- if .Values.envoy.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /ready
|
||||
port: {{ .Values.envoy.containerPorts.metrics }}
|
||||
initialDelaySeconds: {{ .Values.envoy.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.envoy.readinessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.envoy.readinessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.envoy.readinessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.envoy.readinessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.envoy.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /ready
|
||||
port: {{ .Values.envoy.containerPorts.metrics }}
|
||||
initialDelaySeconds: {{ .Values.envoy.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.envoy.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.envoy.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.envoy.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.envoy.livenessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
resources: {{ toYaml .Values.envoy.resources | nindent 12 }}
|
||||
volumeMounts:
|
||||
- name: envoy-config
|
||||
mountPath: /config
|
||||
- name: envoycert
|
||||
mountPath: /certs
|
||||
- name: envoy-admin
|
||||
mountPath: /admin
|
||||
{{- if .Values.envoy.extraVolumeMounts }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.envoy.extraVolumeMounts "context" $ ) | nindent 12 }}
|
||||
{{- end }}
|
||||
lifecycle:
|
||||
preStop:
|
||||
{{- if .Values.envoy.shutdownManager.enabled }}
|
||||
httpGet:
|
||||
path: /shutdown
|
||||
port: {{ .Values.envoy.shutdownManager.port }}
|
||||
scheme: HTTP
|
||||
{{- else }}
|
||||
exec:
|
||||
command:
|
||||
- sh
|
||||
- '-c'
|
||||
- sleep {{ .Values.envoy.terminationGracePeriodSeconds }}; kill 1
|
||||
{{- end }}
|
||||
{{- if .Values.envoy.sidecars }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.envoy.sidecars "context" $ ) | nindent 8 }}
|
||||
{{- end }}
|
||||
initContainers:
|
||||
- command:
|
||||
- contour
|
||||
args:
|
||||
- bootstrap
|
||||
- /config/envoy.json
|
||||
- --xds-address={{ template "common.names.fullname" . }}
|
||||
- --xds-port={{ .Values.contour.service.ports.xds }}
|
||||
- --resources-dir=/config/resources
|
||||
- --envoy-cafile=/certs/ca.crt
|
||||
- --envoy-cert-file=/certs/tls.crt
|
||||
- --envoy-key-file=/certs/tls.key
|
||||
{{- if .Values.contour.overloadManager.enabled }}
|
||||
- --overload-max-heap={{ int .Values.contour.overloadManager.maxHeapBytes }}
|
||||
{{- end }}
|
||||
image: {{ include "common.images.image" ( dict "imageRoot" .Values.contour.image "global" .Values.global) }}
|
||||
imagePullPolicy: {{ .Values.contour.image.pullPolicy }}
|
||||
name: envoy-initconfig
|
||||
resources: {{ toYaml .Values.envoy.resources | nindent 12 }}
|
||||
volumeMounts:
|
||||
- name: envoy-config
|
||||
mountPath: /config
|
||||
- name: envoycert
|
||||
mountPath: /certs
|
||||
readOnly: true
|
||||
- name: envoy-admin
|
||||
mountPath: /admin
|
||||
{{- if .Values.envoy.extraVolumeMounts }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.envoy.extraVolumeMounts "context" $ ) | nindent 12 }}
|
||||
{{- end }}
|
||||
env:
|
||||
- name: CONTOUR_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
{{- if .Values.contour.extraEnvVars }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.contour.extraEnvVars "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if or .Values.contour.extraEnvVarsCM .Values.contour.extraEnvVarsSecret }}
|
||||
envFrom:
|
||||
{{- if .Values.contour.extraEnvVarsCM }}
|
||||
- configMapRef:
|
||||
name: {{ include "common.tplvalues.render" ( dict "value" .Values.contour.extraEnvVarsCM "context" $ ) }}
|
||||
{{- end }}
|
||||
{{- if .Values.contour.extraEnvVarsSecret }}
|
||||
- secretRef:
|
||||
name: {{ include "common.tplvalues.render" ( dict "value" .Values.contour.extraEnvVarsSecret "context" $ ) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.envoy.initConfig.containerSecurityContext.enabled }}
|
||||
securityContext: {{- omit .Values.envoy.initConfig.containerSecurityContext "enabled" | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.envoy.initContainers }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.envoy.initContainers "context" $ ) | nindent 8 }}
|
||||
{{- end }}
|
||||
automountServiceAccountToken: {{ .Values.envoy.serviceAccount.automountServiceAccountToken }}
|
||||
serviceAccountName: {{ include "envoy.envoyServiceAccountName" . }}
|
||||
volumes:
|
||||
- name: envoy-admin
|
||||
emptyDir: {}
|
||||
- name: envoy-config
|
||||
emptyDir: {}
|
||||
- name: envoycert
|
||||
secret:
|
||||
secretName: {{ include "contour.envoy.certs-secret.name" . }}
|
||||
{{- if .Values.envoy.extraVolumes }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.envoy.extraVolumes "context" $ ) | nindent 8 }}
|
||||
{{- end }}
|
||||
restartPolicy: Always
|
||||
{{- end }}
|
||||
@@ -0,0 +1,338 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if and .Values.envoy.enabled (eq .Values.envoy.kind "deployment") }}
|
||||
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ printf "%s-envoy" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.envoy.image "chart" .Chart ) ) }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/component: envoy
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if not .Values.envoy.autoscaling.enabled }}
|
||||
replicas: {{ .Values.envoy.replicaCount }}
|
||||
{{- end }}
|
||||
revisionHistoryLimit: {{ .Values.envoy.revisionHistoryLimit }}
|
||||
{{- if .Values.envoy.updateStrategy }}
|
||||
strategy: {{- toYaml .Values.envoy.updateStrategy | nindent 4 }}
|
||||
{{- end }}
|
||||
minReadySeconds: {{ .Values.envoy.minReadySeconds }}
|
||||
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.envoy.podLabels .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
selector:
|
||||
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
|
||||
app.kubernetes.io/component: envoy
|
||||
template:
|
||||
metadata:
|
||||
{{- if or .Values.envoy.podAnnotations .Values.commonAnnotations }}
|
||||
{{- $podAnnotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.envoy.podAnnotations .Values.commonAnnotations ) "context" . ) }}
|
||||
annotations: {{- include "common.tplvalues.render" (dict "value" $podAnnotations "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }}
|
||||
app.kubernetes.io/component: envoy
|
||||
spec:
|
||||
{{- include "common.images.pullSecrets" ( dict "images" (list .Values.contour.image .Values.envoy.image) "global" .Values.global) | nindent 6 }}
|
||||
{{- if .Values.envoy.hostAliases }}
|
||||
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.envoy.hostAliases "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.envoy.affinity }}
|
||||
affinity: {{- include "common.tplvalues.render" (dict "value" .Values.envoy.affinity "context" $) | nindent 8 }}
|
||||
{{- else }}
|
||||
affinity:
|
||||
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.envoy.podAffinityPreset "component" "envoy" "customLabels" $podLabels "context" $) | nindent 10 }}
|
||||
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.envoy.podAntiAffinityPreset "component" "envoy" "customLabels" $podLabels "context" $) | nindent 10 }}
|
||||
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.envoy.nodeAffinityPreset.type "key" .Values.envoy.nodeAffinityPreset.key "values" .Values.envoy.nodeAffinityPreset.values) | nindent 10 }}
|
||||
{{- end }}
|
||||
{{- if .Values.envoy.priorityClassName }}
|
||||
priorityClassName: {{ .Values.envoy.priorityClassName | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.envoy.schedulerName }}
|
||||
schedulerName: {{ .Values.envoy.schedulerName | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.envoy.topologySpreadConstraints }}
|
||||
topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.envoy.topologySpreadConstraints "context" .) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.envoy.nodeSelector }}
|
||||
nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.envoy.nodeSelector "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.envoy.tolerations }}
|
||||
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.envoy.tolerations "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
terminationGracePeriodSeconds: {{ .Values.envoy.terminationGracePeriodSeconds }}
|
||||
hostNetwork: {{ .Values.envoy.hostNetwork }}
|
||||
dnsPolicy: {{ .Values.envoy.dnsPolicy }}
|
||||
{{- if .Values.envoy.podSecurityContext.enabled }}
|
||||
securityContext: {{- omit .Values.envoy.podSecurityContext "enabled" | toYaml | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
{{- if .Values.envoy.shutdownManager.enabled }}
|
||||
- command:
|
||||
- contour
|
||||
args:
|
||||
- envoy
|
||||
- shutdown-manager
|
||||
{{- if .Values.envoy.shutdownManager.extraArgs }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.envoy.shutdownManager.extraArgs "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
image: {{ include "common.images.image" ( dict "imageRoot" .Values.contour.image "global" .Values.global) }}
|
||||
imagePullPolicy: {{ .Values.contour.image.pullPolicy }}
|
||||
{{- if .Values.contour.extraEnvVars }}
|
||||
env:
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.contour.extraEnvVars "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if or .Values.contour.extraEnvVarsCM .Values.contour.extraEnvVarsSecret }}
|
||||
envFrom:
|
||||
{{- if .Values.contour.extraEnvVarsCM }}
|
||||
- configMapRef:
|
||||
name: {{ include "common.tplvalues.render" ( dict "value" .Values.contour.extraEnvVarsCM "context" $ ) }}
|
||||
{{- end }}
|
||||
{{- if .Values.contour.extraEnvVarsSecret }}
|
||||
- secretRef:
|
||||
name: {{ include "common.tplvalues.render" ( dict "value" .Values.contour.extraEnvVarsSecret "context" $ ) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.envoy.shutdownManager.containerSecurityContext.enabled }}
|
||||
securityContext: {{- omit .Values.envoy.shutdownManager.containerSecurityContext "enabled" | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
lifecycle:
|
||||
preStop:
|
||||
exec:
|
||||
command:
|
||||
- contour
|
||||
- envoy
|
||||
- shutdown
|
||||
{{- if .Values.envoy.customReadinessProbe }}
|
||||
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.envoy.customReadinessProbe "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
name: shutdown-manager
|
||||
resources: {{- toYaml .Values.envoy.shutdownManager.resources | nindent 12 }}
|
||||
volumeMounts:
|
||||
- name: envoy-admin
|
||||
mountPath: /admin
|
||||
{{- if .Values.envoy.extraVolumeMounts }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.envoy.extraVolumeMounts "context" $ ) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
- name: envoy
|
||||
{{- if .Values.envoy.command }}
|
||||
command: {{- include "common.tplvalues.render" (dict "value" .Values.envoy.command "context" $) | nindent 12 }}
|
||||
{{- else }}
|
||||
command:
|
||||
- envoy
|
||||
{{- end }}
|
||||
{{- if .Values.envoy.args }}
|
||||
args: {{- include "common.tplvalues.render" (dict "value" .Values.envoy.args "context" $) | nindent 12 }}
|
||||
{{- else }}
|
||||
args:
|
||||
- -c
|
||||
- /config/envoy.json
|
||||
- --service-cluster $(CONTOUR_NAMESPACE)
|
||||
- --service-node $(ENVOY_POD_NAME)
|
||||
- --log-level {{ .Values.envoy.logLevel }}
|
||||
{{- if .Values.envoy.extraArgs }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.envoy.extraArgs "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
image: {{ include "common.images.image" ( dict "imageRoot" .Values.envoy.image "global" .Values.global ) }}
|
||||
imagePullPolicy: {{ .Values.envoy.image.pullPolicy }}
|
||||
{{- if .Values.envoy.containerSecurityContext.enabled }}
|
||||
securityContext: {{- omit .Values.envoy.containerSecurityContext "enabled" | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
env:
|
||||
- name: CONTOUR_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
apiVersion: v1
|
||||
fieldPath: metadata.namespace
|
||||
- name: ENVOY_POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
apiVersion: v1
|
||||
fieldPath: metadata.name
|
||||
{{- if .Values.envoy.extraEnvVars }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.envoy.extraEnvVars "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if or .Values.envoy.extraEnvVarsCM .Values.envoy.extraEnvVarsSecret }}
|
||||
envFrom:
|
||||
{{- if .Values.envoy.extraEnvVarsCM }}
|
||||
- configMapRef:
|
||||
name: {{ include "common.tplvalues.render" ( dict "value" .Values.envoy.extraEnvVarsCM "context" $ ) }}
|
||||
{{- end }}
|
||||
{{- if .Values.envoy.extraEnvVarsSecret }}
|
||||
- secretRef:
|
||||
name: {{ include "common.tplvalues.render" ( dict "value" .Values.envoy.extraEnvVarsSecret "context" $ ) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- containerPort: {{ .Values.envoy.containerPorts.http }}
|
||||
# Use of .Values.envoy.useHostPort as boolean is DEPRECATED. Support will be removed in upcoming versions.
|
||||
{{- if or (and (kindIs "boolean" .Values.envoy.useHostPort) .Values.envoy.useHostPort) (and (kindIs "map" .Values.envoy.useHostPort) .Values.envoy.useHostPort.http) }}
|
||||
hostPort: {{ .Values.envoy.hostPorts.http }}
|
||||
{{- end }}
|
||||
{{- if .Values.envoy.useHostIP }}
|
||||
hostIP: {{ .Values.envoy.hostIPs.http }}
|
||||
{{- end }}
|
||||
name: http
|
||||
protocol: TCP
|
||||
- containerPort: {{ .Values.envoy.containerPorts.https }}
|
||||
# Use of .Values.envoy.useHostPort as boolean is DEPRECATED. Support will be removed in upcoming versions.
|
||||
{{- if or (and (kindIs "boolean" .Values.envoy.useHostPort) .Values.envoy.useHostPort) (and (kindIs "map" .Values.envoy.useHostPort) .Values.envoy.useHostPort.https) }}
|
||||
hostPort: {{ .Values.envoy.hostPorts.https }}
|
||||
{{- end }}
|
||||
{{- if .Values.envoy.useHostIP }}
|
||||
hostIP: {{ .Values.envoy.hostIPs.https }}
|
||||
{{- end }}
|
||||
name: https
|
||||
protocol: TCP
|
||||
- containerPort: {{ .Values.envoy.containerPorts.metrics }}
|
||||
# Use of .Values.envoy.useHostPort as boolean is DEPRECATED. Support will be removed in upcoming versions.
|
||||
{{- if or (and (kindIs "boolean" .Values.envoy.useHostPort) .Values.envoy.useHostPort) (and (kindIs "map" .Values.envoy.useHostPort) .Values.envoy.useHostPort.metrics) }}
|
||||
hostPort: {{ .Values.envoy.hostPorts.metrics }}
|
||||
{{- end }}
|
||||
{{- if .Values.envoy.useHostIP }}
|
||||
hostIP: {{ .Values.envoy.hostIPs.metrics }}
|
||||
{{- end }}
|
||||
name: metrics
|
||||
protocol: TCP
|
||||
{{- if .Values.envoy.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /ready
|
||||
port: {{ .Values.envoy.containerPorts.metrics }}
|
||||
initialDelaySeconds: {{ .Values.envoy.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.envoy.readinessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.envoy.readinessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.envoy.readinessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.envoy.readinessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.envoy.customLivenessProbe }}
|
||||
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.envoy.customLivenessProbe "context" $) | nindent 12 }}
|
||||
{{- else if .Values.envoy.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /ready
|
||||
port: {{ .Values.envoy.containerPorts.metrics }}
|
||||
initialDelaySeconds: {{ .Values.envoy.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.envoy.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.envoy.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.envoy.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.envoy.livenessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.envoy.customStartupProbe }}
|
||||
startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.envoy.customStartupProbe "context" $) | nindent 12 }}
|
||||
{{- else if .Values.envoy.startupProbe.enabled }}
|
||||
startupProbe:
|
||||
httpGet:
|
||||
path: /ready
|
||||
port: {{ .Values.envoy.containerPorts.metrics }}
|
||||
initialDelaySeconds: {{ .Values.envoy.startupProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.envoy.startupProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.envoy.startupProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.envoy.startupProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.envoy.startupProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
resources: {{- toYaml .Values.envoy.resources | nindent 12 }}
|
||||
volumeMounts:
|
||||
- name: envoy-config
|
||||
mountPath: /config
|
||||
- name: envoycert
|
||||
mountPath: /certs
|
||||
- name: envoy-admin
|
||||
mountPath: /admin
|
||||
{{- if .Values.envoy.extraVolumeMounts }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.envoy.extraVolumeMounts "context" $ ) | nindent 12 }}
|
||||
{{- end }}
|
||||
lifecycle:
|
||||
preStop:
|
||||
{{- if .Values.envoy.shutdownManager.enabled }}
|
||||
httpGet:
|
||||
path: /shutdown
|
||||
port: {{ .Values.envoy.shutdownManager.port }}
|
||||
scheme: HTTP
|
||||
{{- else }}
|
||||
exec:
|
||||
command:
|
||||
- sh
|
||||
- '-c'
|
||||
- sleep {{ .Values.envoy.terminationGracePeriodSeconds }}; kill 1
|
||||
{{- end }}
|
||||
{{- if .Values.envoy.sidecars }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.envoy.sidecars "context" $ ) | nindent 8 }}
|
||||
{{- end }}
|
||||
initContainers:
|
||||
- command:
|
||||
- contour
|
||||
args:
|
||||
- bootstrap
|
||||
- /config/envoy.json
|
||||
- --xds-address={{ template "common.names.fullname" . }}
|
||||
- --xds-port={{ .Values.contour.service.ports.xds }}
|
||||
- --resources-dir=/config/resources
|
||||
- --envoy-cafile=/certs/ca.crt
|
||||
- --envoy-cert-file=/certs/tls.crt
|
||||
- --envoy-key-file=/certs/tls.key
|
||||
{{- if .Values.contour.overloadManager.enabled }}
|
||||
- --overload-max-heap={{ int .Values.contour.overloadManager.maxHeapBytes }}
|
||||
{{- end }}
|
||||
image: {{ include "common.images.image" ( dict "imageRoot" .Values.contour.image "global" .Values.global) }}
|
||||
imagePullPolicy: {{ .Values.contour.image.pullPolicy }}
|
||||
name: envoy-initconfig
|
||||
resources: {{ toYaml .Values.envoy.resources | nindent 12 }}
|
||||
volumeMounts:
|
||||
- name: envoy-config
|
||||
mountPath: /config
|
||||
- name: envoycert
|
||||
mountPath: /certs
|
||||
readOnly: true
|
||||
- name: envoy-admin
|
||||
mountPath: /admin
|
||||
{{- if .Values.envoy.extraVolumeMounts }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.envoy.extraVolumeMounts "context" $ ) | nindent 12 }}
|
||||
{{- end }}
|
||||
env:
|
||||
- name: CONTOUR_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
{{- if .Values.contour.extraEnvVars }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.contour.extraEnvVars "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if or .Values.contour.extraEnvVarsCM .Values.contour.extraEnvVarsSecret }}
|
||||
envFrom:
|
||||
{{- if .Values.contour.extraEnvVarsCM }}
|
||||
- configMapRef:
|
||||
name: {{ include "common.tplvalues.render" ( dict "value" .Values.contour.extraEnvVarsCM "context" $ ) }}
|
||||
{{- end }}
|
||||
{{- if .Values.contour.extraEnvVarsSecret }}
|
||||
- secretRef:
|
||||
name: {{ include "common.tplvalues.render" ( dict "value" .Values.contour.extraEnvVarsSecret "context" $ ) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.envoy.initConfig.containerSecurityContext.enabled }}
|
||||
securityContext: {{- omit .Values.envoy.initConfig.containerSecurityContext "enabled" | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.envoy.initContainers }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.envoy.initContainers "context" $ ) | nindent 8 }}
|
||||
{{- end }}
|
||||
automountServiceAccountToken: {{ .Values.envoy.serviceAccount.automountServiceAccountToken }}
|
||||
serviceAccountName: {{ include "envoy.envoyServiceAccountName" . }}
|
||||
volumes:
|
||||
- name: envoy-admin
|
||||
emptyDir: {}
|
||||
- name: envoy-config
|
||||
emptyDir: {}
|
||||
- name: envoycert
|
||||
secret:
|
||||
secretName: {{ include "contour.envoy.certs-secret.name" . }}
|
||||
{{- if .Values.envoy.extraVolumes }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.envoy.extraVolumes "context" $ ) | nindent 8 }}
|
||||
{{- end }}
|
||||
restartPolicy: Always
|
||||
{{- end }}
|
||||
@@ -0,0 +1,9 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- range .Values.extraDeploy }}
|
||||
---
|
||||
{{ include "common.tplvalues.render" (dict "value" . "context" $) }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,38 @@
|
||||
{{- if .Values.envoy.enabled }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ printf "%s-envoy" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}-headless
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
app.kubernetes.io/component: envoy
|
||||
{{- if .Values.envoy.service.labels }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.envoy.service.labels "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
clusterIP: None
|
||||
{{- if .Values.envoy.service.sessionAffinity }}
|
||||
sessionAffinity: {{ .Values.envoy.service.sessionAffinity }}
|
||||
{{- end }}
|
||||
{{- if .Values.envoy.service.sessionAffinityConfig }}
|
||||
sessionAffinityConfig: {{- include "common.tplvalues.render" (dict "value" .Values.envoy.service.sessionAffinityConfig "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.envoy.service.ipFamilyPolicy }}
|
||||
ipFamilyPolicy: {{ .Values.envoy.service.ipFamilyPolicy }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
port: {{ .Values.envoy.service.ports.http }}
|
||||
protocol: TCP
|
||||
targetPort: {{ .Values.envoy.service.targetPorts.http }}
|
||||
nodePort: null
|
||||
{{- if .Values.envoy.service.extraPorts }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.envoy.service.extraPorts "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: envoy
|
||||
type: ClusterIP
|
||||
{{- end }}
|
||||
@@ -0,0 +1,55 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if and .Values.envoy.enabled .Values.envoy.autoscaling.enabled (eq .Values.envoy.kind "deployment") (ne .Values.envoy.autoscaling.keda.enabled true) }}
|
||||
apiVersion: {{ include "common.capabilities.hpa.apiVersion" ( dict "context" $ ) }}
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
name: {{ printf "%s-envoy" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.envoy.image "chart" .Chart ) ) }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/component: envoy
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.envoy.autoscaling.behavior }}
|
||||
behavior:
|
||||
{{- toYaml .Values.envoy.autoscaling.behavior | nindent 4 }}
|
||||
{{- end }}
|
||||
scaleTargetRef:
|
||||
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
|
||||
kind: Deployment
|
||||
name: {{ printf "%s-envoy" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||
minReplicas: {{ .Values.envoy.autoscaling.minReplicas }}
|
||||
maxReplicas: {{ .Values.envoy.autoscaling.maxReplicas }}
|
||||
metrics:
|
||||
{{- if .Values.envoy.autoscaling.targetMemory }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: memory
|
||||
{{- if semverCompare "<1.23-0" (include "common.capabilities.kubeVersion" .) }}
|
||||
targetAverageUtilization: {{ .Values.envoy.autoscaling.targetMemory }}
|
||||
{{- else }}
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: {{ .Values.envoy.autoscaling.targetMemory }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.envoy.autoscaling.targetCPU }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: cpu
|
||||
{{- if semverCompare "<1.23-0" (include "common.capabilities.kubeVersion" .) }}
|
||||
targetAverageUtilization: {{ .Values.envoy.autoscaling.targetCPU }}
|
||||
{{- else }}
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: {{ .Values.envoy.autoscaling.targetCPU }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,26 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if and .Values.metrics.prometheusRule.enabled .Values.envoy.enabled .Values.metrics.enabled}}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: PrometheusRule
|
||||
metadata:
|
||||
name: {{ include "common.names.fullname" . }}
|
||||
namespace: {{ default .Release.Namespace .Values.metrics.prometheusRule.namespace | quote }}
|
||||
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.envoy.image "chart" .Chart ) ) }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/component: metrics
|
||||
{{- if .Values.metrics.prometheusRule.additionalLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.metrics.prometheusRule.additionalLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
groups:
|
||||
- name: {{ include "common.names.fullname" . }}
|
||||
rules: {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.prometheusRule.rules "context" $ ) | nindent 6 }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,57 @@
|
||||
{{- if .Values.envoy.autoscaling.keda.enabled }}
|
||||
apiVersion: keda.sh/v1alpha1
|
||||
kind: ScaledObject
|
||||
metadata:
|
||||
name: {{ printf "%s-envoy" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
app.kubernetes.io/component: envoy
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: {{ printf "%s-envoy" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||
pollingInterval: {{ .Values.envoy.autoscaling.keda.pollingInterval }}
|
||||
minReplicaCount: {{ .Values.envoy.autoscaling.minReplicas }}
|
||||
maxReplicaCount: {{ .Values.envoy.autoscaling.maxReplicas }}
|
||||
advanced:
|
||||
horizontalPodAutoscalerConfig:
|
||||
behavior:
|
||||
scaleDown:
|
||||
stabilizationWindowSeconds: {{ .Values.envoy.autoscaling.keda.stabilizationWindowSeconds | default "300" }}
|
||||
policies:
|
||||
{{- range .Values.envoy.autoscaling.keda.scaledown.policies }}
|
||||
- type: {{ .type }}
|
||||
value: {{ .value }}
|
||||
periodSeconds: {{ .periodseconds }}
|
||||
{{- end }}
|
||||
selectPolicy: {{ .Values.envoy.autoscaling.keda.scaledown.selectpolicy }}
|
||||
scaleUp:
|
||||
stabilizationWindowSeconds: {{ .Values.envoy.autoscaling.keda.scaleup.stabilizationWindowSeconds }}
|
||||
policies:
|
||||
{{- range .Values.envoy.autoscaling.keda.scaleup.policies }}
|
||||
- type: {{ .type }}
|
||||
value: {{ .value }}
|
||||
periodSeconds: {{ .periodseconds }}
|
||||
{{- end }}
|
||||
selectPolicy: {{ .Values.envoy.autoscaling.keda.scaleup.selectpolicy }}
|
||||
triggers:
|
||||
- metadata:
|
||||
value: {{ .Values.envoy.autoscaling.targetCPU | quote }}
|
||||
metricType: Utilization
|
||||
type: cpu
|
||||
- metadata:
|
||||
value: {{ .Values.envoy.autoscaling.targetMemory | quote }}
|
||||
metricType: Utilization
|
||||
type: memory
|
||||
{{- if .Values.envoy.autoscaling.keda.triggers }}
|
||||
{{- toYaml .Values.envoy.autoscaling.keda.triggers | nindent 2 }}
|
||||
{{ end }}
|
||||
|
||||
{{- end }}
|
||||
@@ -0,0 +1,13 @@
|
||||
{{- if .Values.envoy.service.export.enabled }}
|
||||
kind: ServiceExport
|
||||
apiVersion: net.gke.io/v1
|
||||
metadata:
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
name: {{ default (printf "%s-envoy" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-") .Values.envoy.service.name }}
|
||||
---
|
||||
kind: ServiceExport
|
||||
apiVersion: net.gke.io/v1
|
||||
metadata:
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
name: {{ default (printf "%s-envoy" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-") .Values.envoy.service.name }}-headless
|
||||
{{- end }}
|
||||
@@ -0,0 +1,46 @@
|
||||
{{- if .Values.envoy.enabled }}
|
||||
{{- if .Values.envoy.service.tcpLB }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ printf "%s-envoy" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}-tcp-lb
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
annotations:
|
||||
networking.gke.io/load-balancer-type: "Internal"
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
app.kubernetes.io/component: envoy
|
||||
{{- if .Values.envoy.service.labels }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.envoy.service.labels "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.envoy.service.sessionAffinity }}
|
||||
sessionAffinity: {{ .Values.envoy.service.sessionAffinity }}
|
||||
{{- end }}
|
||||
{{- if .Values.envoy.service.sessionAffinityConfig }}
|
||||
sessionAffinityConfig: {{- include "common.tplvalues.render" (dict "value" .Values.envoy.service.sessionAffinityConfig "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.envoy.service.ipFamilyPolicy }}
|
||||
ipFamilyPolicy: {{ .Values.envoy.service.ipFamilyPolicy }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
port: {{ .Values.envoy.service.ports.http }}
|
||||
protocol: TCP
|
||||
targetPort: {{ .Values.envoy.service.targetPorts.http }}
|
||||
{{- if .Values.envoy.service.ports.grpc }}
|
||||
- name: grpc
|
||||
port: {{ .Values.envoy.service.ports.grpc }}
|
||||
protocol: TCP
|
||||
targetPort: {{ .Values.envoy.service.targetPorts.http }}
|
||||
{{- end }}
|
||||
{{- if .Values.envoy.service.extraPorts }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.envoy.service.extraPorts "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: envoy
|
||||
type: LoadBalancer
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,103 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.envoy.image "chart" .Chart ) ) }}
|
||||
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.envoy.podLabels .Values.commonLabels ) "context" . ) }}
|
||||
{{- if .Values.envoy.enabled }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ default (printf "%s-envoy" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-") .Values.envoy.service.name }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.envoy.service.labels .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/component: envoy
|
||||
annotations:
|
||||
{{- if (ne (index .Values.envoy.service.annotations "service.beta.kubernetes.io/aws-load-balancer-type" | toString ) "nlb") }}
|
||||
# This annotation puts the AWS ELB into "TCP" mode so that it does not
|
||||
# do HTTP negotiation for HTTPS connections at the ELB edge.
|
||||
# The downside of this is the remote IP address of all connections will
|
||||
# appear to be the internal address of the ELB. See docs/proxy-proto.md
|
||||
# for information about enabling the PROXY protocol on the ELB to recover
|
||||
# the original remote IP address.
|
||||
# We don't set this for nlb, per the contour docs.
|
||||
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp
|
||||
{{- end }}
|
||||
{{- if or .Values.envoy.service.annotations .Values.commonAnnotations }}
|
||||
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.envoy.service.annotations .Values.commonAnnotations ) "context" . ) }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.envoy.service.externalTrafficPolicy }}
|
||||
externalTrafficPolicy: {{ .Values.envoy.service.externalTrafficPolicy | quote }}
|
||||
{{- end }}
|
||||
{{- if not (empty .Values.envoy.service.clusterIP) }}
|
||||
clusterIP: {{ .Values.envoy.service.clusterIP | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.envoy.service.sessionAffinity }}
|
||||
sessionAffinity: {{ .Values.envoy.service.sessionAffinity }}
|
||||
{{- end }}
|
||||
{{- if .Values.envoy.service.sessionAffinityConfig }}
|
||||
sessionAffinityConfig: {{- include "common.tplvalues.render" (dict "value" .Values.envoy.service.sessionAffinityConfig "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.envoy.service.externalIPs }}
|
||||
externalIPs: {{- toYaml .Values.envoy.service.externalIPs | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.envoy.service.loadBalancerIP }}
|
||||
loadBalancerIP: {{ .Values.envoy.service.loadBalancerIP | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.envoy.service.loadBalancerSourceRanges }}
|
||||
loadBalancerSourceRanges: {{- toYaml .Values.envoy.service.loadBalancerSourceRanges | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.envoy.service.ipFamilyPolicy }}
|
||||
ipFamilyPolicy: {{ .Values.envoy.service.ipFamilyPolicy }}
|
||||
{{- end }}
|
||||
{{- if .Values.envoy.service.ipFamilies }}
|
||||
ipFamilies: {{ toYaml .Values.envoy.service.ipFamilies | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if and .Values.envoy.service.loadBalancerClass (eq .Values.envoy.service.type "LoadBalancer") }}
|
||||
loadBalancerClass: {{ .Values.envoy.service.loadBalancerClass }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
port: {{ .Values.envoy.service.ports.http }}
|
||||
protocol: TCP
|
||||
targetPort: {{ .Values.envoy.service.targetPorts.http }}
|
||||
{{- if and (or (eq .Values.envoy.service.type "NodePort") (eq .Values.envoy.service.type "LoadBalancer")) (not (empty .Values.envoy.service.nodePorts.http)) }}
|
||||
nodePort: {{ .Values.envoy.service.nodePorts.http }}
|
||||
{{- else if eq .Values.envoy.service.type "ClusterIP" }}
|
||||
nodePort: null
|
||||
{{- end }}
|
||||
{{- if .Values.envoy.service.extraPorts }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.envoy.service.extraPorts "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/component: envoy
|
||||
type: {{ .Values.envoy.service.type }}
|
||||
{{- if .Values.metrics.serviceMonitor.enabled }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ printf "%s-envoy-metrics" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/component: envoy
|
||||
spec:
|
||||
type: ClusterIP
|
||||
clusterIP: None
|
||||
{{- if not .Values.envoy.shutdownManager.enabled }}
|
||||
publishNotReadyAddresses: true
|
||||
{{- end }}
|
||||
selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/component: envoy
|
||||
ports:
|
||||
- name: metrics
|
||||
port: {{ .Values.envoy.service.ports.metrics }}
|
||||
protocol: TCP
|
||||
targetPort: {{ .Values.envoy.service.targetPorts.metrics }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,21 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if and .Values.envoy.serviceAccount.create .Values.envoy.enabled }}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "envoy.envoyServiceAccountName" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.envoy.image "chart" .Chart ) ) }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/component: envoy
|
||||
{{- if or .Values.envoy.serviceAccount.annotations .Values.commonAnnotations }}
|
||||
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.envoy.serviceAccount.annotations .Values.commonAnnotations ) "context" . ) }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
automountServiceAccountToken: {{ .Values.envoy.serviceAccount.automountServiceAccountToken }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,48 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if and .Values.metrics.serviceMonitor.enabled .Values.envoy.enabled }}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
name: {{ printf "%s-envoy" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||
namespace: {{ default (include "common.names.namespace" .) .Values.metrics.serviceMonitor.namespace | quote }}
|
||||
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.envoy.image "chart" .Chart ) ) }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.metrics.serviceMonitor.labels .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/component: envoy
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
jobLabel: {{ .Values.metrics.serviceMonitor.jobLabel | quote }}
|
||||
selector:
|
||||
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 6 }}
|
||||
app.kubernetes.io/component: envoy
|
||||
{{- if .Values.metrics.serviceMonitor.selector }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.metrics.serviceMonitor.selector "context" $) | nindent 6 }}
|
||||
{{- end }}
|
||||
namespaceSelector:
|
||||
matchNames:
|
||||
- {{ include "common.names.namespace" . | quote }}
|
||||
endpoints:
|
||||
- port: metrics
|
||||
path: /stats/prometheus
|
||||
{{- if .Values.metrics.serviceMonitor.interval }}
|
||||
interval: {{ .Values.metrics.serviceMonitor.interval }}
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.serviceMonitor.scrapeTimeout }}
|
||||
scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }}
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.serviceMonitor.honorLabels }}
|
||||
honorLabels: {{ .Values.metrics.serviceMonitor.honorLabels }}
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.serviceMonitor.metricRelabelings }}
|
||||
metricRelabelings: {{ toYaml .Values.metrics.serviceMonitor.metricRelabelings | nindent 6 }}
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.serviceMonitor.relabelings }}
|
||||
relabelings: {{ toYaml .Values.metrics.serviceMonitor.relabelings | nindent 6 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user