Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CRD annotations for 1.x parity #1757

Merged
merged 12 commits into from
Aug 27, 2021
161 changes: 161 additions & 0 deletions config/base/kong-ingress-crd-spec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: kongingresses.configuration.konghq.com
spec:
versions:
- name: v1
schema:
openAPIV3Schema:
properties:
route:
properties:
methods:
type: array
items:
type: string
headers:
type: object
additionalProperties:
type: array
items:
type: string
regex_priority:
type: integer
strip_path:
type: boolean
preserve_host:
type: boolean
path_handling:
type: string
enum:
- "v0"
- "v1"
protocols:
type: array
items:
type: string
enum:
- http
- https
- grpc
- grpcs
- tcp
- tls
https_redirect_status_code:
type: integer
snis:
type: array
items:
type: string
request_buffering:
type: boolean
response_buffering:
type: boolean
proxy:
type: object
properties:
protocol:
type: string
enum:
- http
- https
- grpc
- grpcs
- tcp
- tls
path:
type: string
pattern: ^/.*$
retries:
type: integer
minimum: 0
connect_timeout:
type: integer
minimum: 0
read_timeout:
type: integer
minimum: 0
write_timeout:
type: integer
minimum: 0
upstream:
type: object
properties:
algorithm:
type: string
enum:
- "round-robin"
- "consistent-hashing"
- "least-connections"
host_header:
type: string
hash_on:
type: string
hash_on_cookie:
type: string
hash_on_cookie_path:
type: string
hash_on_header:
type: string
hash_fallback_header:
type: string
hash_fallback:
type: string
slots:
type: integer
minimum: 10
healthchecks:
type: object
properties:
threshold:
type: integer
active:
type: object
properties:
concurrency:
type: integer
minimum: 1
timeout:
type: integer
minimum: 0
http_path:
type: string
pattern: ^/.*$
healthy: &healthy
type: object
properties:
http_statuses:
type: array
items:
type: integer
interval:
type: integer
minimum: 0
successes:
type: integer
minimum: 0
unhealthy: &unhealthy
type: object
properties:
http_failures:
type: integer
minimum: 0
http_statuses:
type: array
items:
type: integer
interval:
type: integer
minimum: 0
tcp_failures:
type: integer
minimum: 0
timeout:
type: integer
minimum: 0
passive:
type: object
properties:
healthy: *healthy
unhealthy: *unhealthy
2 changes: 2 additions & 0 deletions config/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ resources:
- validation-service.yaml
- kong-ingress-dbless.yaml
namespace: kong
patchesStrategicMerge:
- kong-ingress-crd-spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,30 @@ spec:
kind: KongClusterPlugin
listKind: KongClusterPluginList
plural: kongclusterplugins
shortNames:
- kcp
singular: kongclusterplugin
preserveUnknownFields: false
scope: Cluster
versions:
- name: v1
- additionalPrinterColumns:
- description: Name of the plugin
jsonPath: .plugin
name: Plugin-Type
type: string
- description: Age
jsonPath: .metadata.creationTimestamp
name: Age
type: date
- description: Indicates if the plugin is disabled
jsonPath: .disabled
name: Disabled
type: boolean
- description: Configuration of the plugin
jsonPath: .config
name: Config
type: string
name: v1
schema:
openAPIV3Schema:
description: KongClusterPlugin is the Schema for the kongclusterplugins API
Expand All @@ -29,6 +48,7 @@ spec:
type: string
config:
description: Config contains the plugin configuration.
type: object
x-kubernetes-preserve-unknown-fields: true
configFrom:
description: ConfigFrom references a secret containing the plugin configuration.
Expand Down Expand Up @@ -69,6 +89,10 @@ spec:
namespace:
description: The namespace containing the secret
type: string
required:
- key
- name
- namespace
type: object
type: object
consumerRef:
Expand All @@ -91,13 +115,26 @@ spec:
protocols:
description: Protocols configures plugin to run on requests received on
specific protocols.
enum:
- http
rainest marked this conversation as resolved.
Show resolved Hide resolved
- https
- grpc
- grpcs
- tcp
- tls
items:
type: string
type: array
run_on:
description: RunOn configures the plugin to run on the first or the second
or both nodes in case of a service mesh deployment.
enum:
- first
- second
- all
type: string
required:
- plugin
type: object
served: true
storage: true
Expand Down
13 changes: 12 additions & 1 deletion config/crd/bases/configuration.konghq.com_kongconsumers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,22 @@ spec:
kind: KongConsumer
listKind: KongConsumerList
plural: kongconsumers
shortNames:
- kc
singular: kongconsumer
preserveUnknownFields: false
scope: Namespaced
versions:
- name: v1
- additionalPrinterColumns:
- description: Username of a Kong Consumer
jsonPath: .username
name: Username
type: string
- description: Age
jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1
schema:
openAPIV3Schema:
description: KongConsumer is the Schema for the kongconsumers API
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ spec:
kind: KongIngress
listKind: KongIngressList
plural: kongingresses
shortNames:
- ki
singular: kongingress
preserveUnknownFields: false
scope: Namespaced
Expand Down
38 changes: 37 additions & 1 deletion config/crd/bases/configuration.konghq.com_kongplugins.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,30 @@ spec:
kind: KongPlugin
listKind: KongPluginList
plural: kongplugins
shortNames:
- kp
singular: kongplugin
preserveUnknownFields: false
scope: Namespaced
versions:
- name: v1
- additionalPrinterColumns:
- description: Name of the plugin
jsonPath: .plugin
name: Plugin-Type
type: string
- description: Age
jsonPath: .metadata.creationTimestamp
name: Age
type: date
- description: Indicates if the plugin is disabled
jsonPath: .disabled
name: Disabled
type: boolean
- description: Configuration of the plugin
jsonPath: .config
name: Config
type: string
name: v1
schema:
openAPIV3Schema:
description: KongPlugin is the Schema for the kongplugins API
Expand All @@ -29,6 +48,7 @@ spec:
type: string
config:
description: Config contains the plugin configuration.
type: object
x-kubernetes-preserve-unknown-fields: true
configFrom:
description: ConfigFrom references a secret containing the plugin configuration.
Expand Down Expand Up @@ -66,6 +86,9 @@ spec:
name:
description: the secret containing the key
type: string
required:
- key
- name
type: object
type: object
consumerRef:
Expand All @@ -88,13 +111,26 @@ spec:
protocols:
description: Protocols configures plugin to run on requests received on
specific protocols.
enum:
- http
- https
- grpc
- grpcs
- tcp
- tls
items:
type: string
type: array
run_on:
description: RunOn configures the plugin to run on the first or the second
or both nodes in case of a service mesh deployment.
enum:
- first
- second
- all
type: string
required:
- plugin
type: object
served: true
storage: true
Expand Down
13 changes: 12 additions & 1 deletion config/crd/bases/configuration.konghq.com_tcpingresses.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,16 @@ spec:
preserveUnknownFields: false
scope: Namespaced
versions:
- name: v1beta1
- additionalPrinterColumns:
- description: Address of the load balancer
jsonPath: .status.loadBalancer.ingress[*].ip
name: Address
type: string
- description: Age
jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1beta1
schema:
openAPIV3Schema:
description: TCPIngress is the Schema for the tcpingresses API
Expand Down Expand Up @@ -53,6 +62,7 @@ spec:
type: string
servicePort:
description: Specifies the port of the referenced service.
format: int32
type: integer
required:
- serviceName
Expand All @@ -69,6 +79,7 @@ spec:
over TCP sessions and route. It is a required field. If a
Host is not specified, the requested are routed based only
on Port.
format: int32
maximum: 65535
minimum: 1
type: integer
Expand Down
Loading