17d4ce73d81309714b441ed658f4fd450743bbb1
[ric-plt/ric-dep.git] / helm / infrastructure / subcharts / kong / templates / crd-kongingress.yaml
1 {{- if and .Values.ingressController.enabled .Values.ingressController.installCRDs -}}
2 apiVersion: apiextensions.k8s.io/v1beta1
3 kind: CustomResourceDefinition
4 metadata:
5   name: kongingresses.configuration.konghq.com
6   labels:
7     app: {{ template "kong.name" . }}
8     chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
9     release: "{{ .Release.Name }}"
10     heritage: "{{ .Release.Service }}"
11 spec:
12   group: configuration.konghq.com
13   version: v1
14   scope: Namespaced
15   names:
16     kind: KongIngress
17     plural: kongingresses
18     shortNames:
19     - ki
20   validation:
21     openAPIV3Schema:
22       properties:
23         upstream:
24           type: object
25         route:
26           properties:
27             methods:
28               type: array
29               items:
30                 type: string
31             regex_priority:
32               type: integer
33             strip_path:
34               type: boolean
35             preserve_host:
36               type: boolean
37             protocols:
38               type: array
39               items:
40                 type: string
41                 enum:
42                 - http
43                 - https
44         proxy:
45           type: object
46           properties:
47             protocol:
48               type: string
49               enum:
50               - http
51               - https
52             path:
53               type: string
54               pattern: ^/.*$
55             retries:
56               type: integer
57               minimum: 0
58             connect_timeout:
59               type: integer
60               minimum: 0
61             read_timeout:
62               type: integer
63               minimum: 0
64             write_timeout:
65               type: integer
66               minimum: 0
67         upstream:
68           type: object
69           properties:
70             hash_on:
71               type: string
72             hash_on_cookie:
73               type: string
74             hash_on_cookie_path:
75               type: string
76             hash_on_header:
77               type: string
78             hash_fallback_header:
79               type: string
80             hash_fallback:
81               type: string
82             slots:
83               type: integer
84               minimum: 10
85             healthchecks:
86               type: object
87               properties:
88                 active:
89                   type: object
90                   properties:
91                     concurrency:
92                       type: integer
93                       minimum: 1
94                     timeout:
95                       type: integer
96                       minimum: 0
97                     http_path:
98                       type: string
99                       pattern: ^/.*$
100                     healthy: &healthy
101                       type: object
102                       properties:
103                         http_statuses:
104                           type: array
105                           items:
106                             type: integer
107                         interval:
108                           type: integer
109                           minimum: 0
110                         successes:
111                           type: integer
112                           minimum: 0
113                     unhealthy: &unhealthy
114                       type: object
115                       properties:
116                         http_failures:
117                           type: integer
118                           minimum: 0
119                         http_statuses:
120                           type: array
121                           items:
122                             type: integer
123                         interval:
124                           type: integer
125                           minimum: 0
126                         tcp_failures:
127                           type: integer
128                           minimum: 0
129                         timeout:
130                           type: integer
131                           minimum: 0
132                 passive:
133                   type: object
134                   properties:
135                     healthy: *healthy
136                     unhealthy: *unhealthy
137 {{- end -}}