Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- contour tls issue.
- contour yaml.
- straight from the `Get Started` section of https://github.com/heptio/contour
- plus followed instructions from https://github.com/heptio/contour/blob/master/docs/tls.md
- and mainly https://github.com/heptio/contour/blob/master/docs/proxy-proto.md
- apiVersion: v1
- kind: Namespace
- metadata:
- name: heptio-contour
- ---
- apiVersion: v1
- kind: ServiceAccount
- metadata:
- name: contour
- namespace: heptio-contour
- ---
- apiVersion: apiextensions.k8s.io/v1beta1
- kind: CustomResourceDefinition
- metadata:
- name: ingressroutes.contour.heptio.com
- labels:
- component: ingressroute
- spec:
- group: contour.heptio.com
- version: v1beta1
- scope: Namespaced
- names:
- plural: ingressroutes
- kind: IngressRoute
- additionalPrinterColumns:
- - name: FQDN
- type: string
- description: Fully qualified domain name
- JSONPath: .spec.virtualhost.fqdn
- - name: TLS Secret
- type: string
- description: Secret with TLS credentials
- JSONPath: .spec.virtualhost.tls.secretName
- - name: First route
- type: string
- description: First routes defined
- JSONPath: .spec.routes[0].match
- - name: Status
- type: string
- description: The current status of the IngressRoute
- JSONPath: .status.currentStatus
- - name: Status Description
- type: string
- description: Description of the current status
- JSONPath: .status.description
- validation:
- openAPIV3Schema:
- properties:
- spec:
- required:
- - routes
- properties:
- virtualhost:
- properties:
- fqdn:
- type: string
- pattern: ^([a-zA-Z0-9]+(-[a-zA-Z0-9]+)*\.)+[a-z]{2,}$
- tls:
- properties:
- secretName:
- type: string
- pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ # DNS-1123 subdomain
- minimumProtocolVersion:
- type: string
- enum:
- - "1.3"
- - "1.2"
- - "1.1"
- strategy:
- type: string
- enum:
- - RoundRobin
- - WeightedLeastRequest
- - Random
- - RingHash
- - Maglev
- healthCheck:
- type: object
- required:
- - path
- properties:
- path:
- type: string
- pattern: ^\/.*$
- intervalSeconds:
- type: integer
- timeoutSeconds:
- type: integer
- unhealthyThresholdCount:
- type: integer
- healthyThresholdCount:
- type: integer
- routes:
- type: array
- items:
- required:
- - match
- properties:
- match:
- type: string
- pattern: ^\/.*$
- delegate:
- type: object
- required:
- - name
- properties:
- name:
- type: string
- pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ # DNS-1123 subdomain
- namespace:
- type: string
- pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ # DNS-1123 label
- services:
- type: array
- items:
- type: object
- required:
- - name
- - port
- properties:
- name:
- type: string
- pattern: ^[a-z]([-a-z0-9]*[a-z0-9])?$ # DNS-1035 label
- port:
- type: integer
- weight:
- type: integer
- strategy:
- type: string
- enum:
- - RoundRobin
- - WeightedLeastRequest
- - Random
- - RingHash
- - Maglev
- healthCheck:
- type: object
- required:
- - path
- properties:
- path:
- type: string
- pattern: ^\/.*$
- intervalSeconds:
- type: integer
- timeoutSeconds:
- type: integer
- unhealthyThresholdCount:
- type: integer
- healthyThresholdCount:
- type: integer
- ---
- apiVersion: extensions/v1beta1
- kind: Deployment
- metadata:
- labels:
- app: contour
- name: contour
- namespace: heptio-contour
- spec:
- selector:
- matchLabels:
- app: contour
- replicas: 2
- template:
- metadata:
- labels:
- app: contour
- annotations:
- prometheus.io/scrape: "true"
- prometheus.io/port: "8002"
- prometheus.io/path: "/stats"
- prometheus.io/format: "prometheus"
- spec:
- containers:
- - image: gcr.io/heptio-images/contour:master
- imagePullPolicy: Always
- name: contour
- command: ["contour"]
- args: ["serve", "--incluster", "--use-proxy-protocol"]
- - image: docker.io/envoyproxy/envoy-alpine:v1.7.0
- name: envoy
- ports:
- - containerPort: 8080
- name: http
- - containerPort: 8443
- name: https
- command: ["envoy"]
- args:
- - --config-path /config/contour.yaml
- - --service-cluster cluster0
- - --service-node node0
- - --log-level info
- - --v2-config-only
- readinessProbe:
- httpGet:
- path: /healthz
- port: 8002
- initialDelaySeconds: 3
- periodSeconds: 3
- volumeMounts:
- - name: contour-config
- mountPath: /config
- lifecycle:
- preStop:
- exec:
- command: ["wget", "-qO-", "http://localhost:9001/healthcheck/fail"]
- initContainers:
- - image: gcr.io/heptio-images/contour:master
- imagePullPolicy: Always
- name: envoy-initconfig
- command: ["contour"]
- args:
- - bootstrap
- # Uncomment the statsd-enable to enable statsd metrics
- #- --statsd-enable
- # Uncomment to set a custom stats emission address and port
- #- --stats-address=0.0.0.0
- #- --stats-port=8002
- - /config/contour.yaml
- volumeMounts:
- - name: contour-config
- mountPath: /config
- volumes:
- - name: contour-config
- emptyDir: {}
- dnsPolicy: ClusterFirst
- serviceAccountName: contour
- terminationGracePeriodSeconds: 30
- # The affinity stanza below tells Kubernetes to try hard not to place 2 of
- # these pods on the same node.
- affinity:
- podAntiAffinity:
- preferredDuringSchedulingIgnoredDuringExecution:
- - weight: 100
- podAffinityTerm:
- labelSelector:
- matchLabels:
- app: contour
- topologyKey: kubernetes.io/hostname
- ---
- apiVersion: rbac.authorization.k8s.io/v1beta1
- kind: ClusterRoleBinding
- metadata:
- name: contour
- roleRef:
- apiGroup: rbac.authorization.k8s.io
- kind: ClusterRole
- name: contour
- subjects:
- - kind: ServiceAccount
- name: contour
- namespace: heptio-contour
- ---
- apiVersion: rbac.authorization.k8s.io/v1beta1
- kind: ClusterRole
- metadata:
- name: contour
- rules:
- - apiGroups:
- - ""
- resources:
- - configmaps
- - endpoints
- - nodes
- - pods
- - secrets
- verbs:
- - list
- - watch
- - apiGroups:
- - ""
- resources:
- - nodes
- verbs:
- - get
- - apiGroups:
- - ""
- resources:
- - services
- verbs:
- - get
- - list
- - watch
- - apiGroups:
- - extensions
- resources:
- - ingresses
- verbs:
- - get
- - list
- - watch
- - apiGroups: ["contour.heptio.com"]
- resources: ["ingressroutes"]
- verbs:
- - get
- - list
- - watch
- - put
- - post
- - patch
- ---
- apiVersion: v1
- kind: Service
- metadata:
- name: contour
- namespace: heptio-contour
- annotations:
- # 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.
- service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp
- service.beta.kubernetes.io/aws-load-balancer-proxy-protocol: '*'
- spec:
- ports:
- - port: 80
- name: http
- protocol: TCP
- targetPort: 8080
- - port: 443
- name: https
- protocol: TCP
- targetPort: 8443
- selector:
- app: contour
- type: LoadBalancer
- ---
Advertisement
Add Comment
Please, Sign In to add comment