added repo

This commit is contained in:
Your Name
2026-08-26 03:39:42 +05:30
parent 45c25a95af
commit b8575bb8b9
6889 changed files with 1217125 additions and 0 deletions
@@ -0,0 +1,22 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
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,256 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
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 }}
automountServiceAccountToken: {{ .Values.contour.automountServiceAccountToken }}
{{- 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 }}
{{- $envoyServiceName := coalesce .Values.envoy.service.name .Values.contour.envoyServiceName }}
{{- if .Values.envoy.service.multiAz.enabled }}
- --envoy-service-name={{ default (printf "%s-%s-envoy" (include "common.names.fullname" .) (index .Values.envoy.service.multiAz.zones 0).name | trunc 63 | trimSuffix "-") $envoyServiceName }}
{{- else }}
- --envoy-service-name={{ default (printf "%s-envoy" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-") $envoyServiceName }}
{{- end }}
{{- 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:
tcpSocket:
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 }}
{{- if .Values.contour.resources }}
resources: {{ toYaml .Values.contour.resources | nindent 12 }}
{{- else if ne .Values.contour.resourcesPreset "none" }}
resources: {{- include "common.resources.preset" (dict "type" .Values.contour.resourcesPreset) | nindent 12 }}
{{- end }}
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: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.contour.containerSecurityContext "context" $) | 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: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.contour.podSecurityContext "context" $) | 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 Broadcom, Inc. All Rights Reserved.
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,90 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if and .Values.contour.enabled .Values.contour.networkPolicy.enabled }}
kind: NetworkPolicy
apiVersion: {{ include "common.capabilities.networkPolicy.apiVersion" . }}
metadata:
name: {{ printf "%s-contour" (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
{{- 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.podLabels .Values.commonLabels ) "context" . ) }}
podSelector:
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
app.kubernetes.io/component: contour
policyTypes:
- Ingress
- Egress
{{- if .Values.contour.networkPolicy.allowExternalEgress }}
egress:
- {}
{{- else }}
egress:
- ports:
- port: 53
protocol: UDP
- port: 53
protocol: TCP
{{- range $port := .Values.contour.networkPolicy.kubeAPIServerPorts }}
- port: {{ $port }}
{{- end }}
# Allow outbound connections to other contour pods
- ports:
- port: {{ .Values.contour.containerPorts.xds }}
- port: {{ .Values.contour.containerPorts.metrics }}
to:
- podSelector:
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 14 }}
app.kubernetes.io/component: contour
{{- if .Values.envoy.enabled }}
# Allow outbound connections to envoy
- ports:
- port: {{ .Values.envoy.containerPorts.http }}
- port: {{ .Values.envoy.containerPorts.https }}
- port: {{ .Values.envoy.containerPorts.metrics }}
to:
- podSelector:
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 14 }}
app.kubernetes.io/component: envoy
{{- end }}
{{- if .Values.contour.networkPolicy.extraEgress }}
{{- include "common.tplvalues.render" ( dict "value" .Values.contour.networkPolicy.extraEgress "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}
ingress:
- ports:
- port: {{ .Values.contour.containerPorts.xds }}
- port: {{ .Values.contour.containerPorts.metrics }}
{{- if not .Values.contour.networkPolicy.allowExternal }}
from:
- podSelector:
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 14 }}
- podSelector:
matchLabels:
{{ template "common.names.fullname" . }}-client: "true"
{{- if .Values.contour.networkPolicy.ingressNSMatchLabels }}
- namespaceSelector:
matchLabels:
{{- range $key, $value := .Values.contour.networkPolicy.ingressNSMatchLabels }}
{{ $key | quote }}: {{ $value | quote }}
{{- end }}
{{- if .Values.contour.networkPolicy.ingressNSPodMatchLabels }}
podSelector:
matchLabels:
{{- range $key, $value := .Values.contour.networkPolicy.ingressNSPodMatchLabels }}
{{ $key | quote }}: {{ $value | quote }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.contour.networkPolicy.extraIngress }}
{{- include "common.tplvalues.render" ( dict "value" .Values.contour.networkPolicy.extraIngress "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}
@@ -0,0 +1,30 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- $replicaCount := int .Values.contour.replicaCount }}
{{- if and .Values.contour.enabled .Values.contour.pdb.create (gt $replicaCount 1) }}
apiVersion: {{ include "common.capabilities.policy.apiVersion" . }}
kind: PodDisruptionBudget
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:
{{- if .Values.contour.pdb.minAvailable }}
minAvailable: {{ .Values.contour.pdb.minAvailable }}
{{- end }}
{{- if or .Values.contour.pdb.maxUnavailable ( not .Values.contour.pdb.minAvailable ) }}
maxUnavailable: {{ .Values.contour.pdb.maxUnavailable | default 1 }}
{{- end }}
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.contour.podLabels .Values.commonLabels ) "context" . ) }}
selector:
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
app.kubernetes.io/component: contour
{{- end }}
@@ -0,0 +1,237 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
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
- list
- update
- watch
- 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
- backendtlspolicies
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,29 @@
{{- /*
Meesho Custom: GCP Internal Load Balancer for Contour xDS service
*/}}
{{- 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"
{{- $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:
type: LoadBalancer
ports:
- port: {{ .Values.contour.service.ports.xds }}
name: tcp-xds
protocol: TCP
targetPort: xds
{{- $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
{{- end }}
{{- end }}
@@ -0,0 +1,80 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
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 Broadcom, Inc. All Rights Reserved.
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 Broadcom, Inc. All Rights Reserved.
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 }}