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

e2e-test: add e2e tests and CRDs for ApisixTls v2 #1014

Merged
merged 1 commit into from
May 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/kube/apisix/apis/config/v2/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ type ApisixConsumerBasicAuth struct {
// ApisixConsumerBasicAuthValue defines the in-place username and password configuration for basic auth.
type ApisixConsumerBasicAuthValue struct {
Username string `json:"username" yaml:"username"`
Password string `json:"password" yaml:"username"`
Password string `json:"password" yaml:"password"`
}

// ApisixConsumerKeyAuth defines the configuration for the key auth.
Expand Down
248 changes: 247 additions & 1 deletion samples/deploy/crd/v1/ApisixRoute.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ spec:
type: integer
- name: v2beta3
served: true
storage: true
storage: false
subresources:
status: { }
additionalPrinterColumns:
Expand Down Expand Up @@ -518,3 +518,249 @@ spec:
type: string
observedGeneration:
type: integer
- name: v2
served: true
storage: true
subresources:
status: { }
additionalPrinterColumns:
- jsonPath: .spec.http[].match.hosts
name: Hosts
type: string
priority: 0
- jsonPath: .spec.http[].match.paths
name: URIs
type: string
priority: 0
- jsonPath: .spec.http[].backends[].serviceName
name: Target Service(HTTP)
type: string
priority: 1
- jsonPath: .spec.tcp[].match.ingressPort
name: Ingress Server Port(TCP)
type: integer
priority: 1
- jsonPath: .spec.tcp[].match.backend.serviceName
name: Target Service(TCP)
type: string
priority: 1
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
priority: 0
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
anyOf:
- required: [ "http" ]
- required: [ "stream" ]
properties:
http:
type: array
minItems: 1
items:
type: object
required: [ "name", "match", "backends" ]
properties:
name:
type: string
minLength: 1
priority:
type: integer
timeout:
type: object
properties:
connect:
type: string
send:
type: string
read:
type: string
match:
type: object
required:
- paths
properties:
paths:
type: array
minItems: 1
items:
type: string
pattern: "^/[a-zA-Z0-9\\-._~%!$&'()+,;=:@/]*\\*?$"
hosts:
type: array
minItems: 1
items:
type: string
pattern: "^\\*?[0-9a-zA-Z-._]+$"
methods:
type: array
minItems: 1
items:
type: string
enum: [ "CONNECT", "DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT", "TRACE" ]
remoteAddrs:
type: array
minItems: 1
items:
type: string
exprs:
type: array
minItems: 1
items:
type: object
properties:
subject:
type: object
properties:
scope:
type: string
enum: [ "Cookie", "Header", "Path", "Query" ]
name:
type: string
minLength: 1
required:
- scope
op:
type: string
enum:
- Equal
- NotEqual
- GreaterThan
- LessThan
- In
- NotIn
- RegexMatch
- RegexNotMatch
- RegexMatchCaseInsensitive
- RegexNotMatchCaseInsensitive
value:
type: string
set:
type: array
items:
type: string
oneOf:
- required: [ "subject", "op", "value" ]
- required: [ "subject", "op", "set" ]
websocket:
type: boolean
plugin_config_name:
type: string
minLength: 1
backends:
type: array
minItems: 1
items:
type: object
properties:
serviceName:
type: string
minLength: 1
servicePort:
type: integer
minimum: 1
maximum: 65535
resolveGranularity:
type: string
enum: [ "endpoint", "service" ]
weight:
type: integer
minimum: 0
subset:
type: string
required:
- serviceName
- servicePort
plugins:
type: array
items:
type: object
properties:
name:
type: string
minLength: 1
enable:
type: boolean
config:
type: object
x-kubernetes-preserve-unknown-fields: true # we have to enable it since plugin config
required:
- name
- enable
authentication:
type: object
properties:
enable:
type: boolean
type:
type: string
enum: [ "basicAuth", "keyAuth" ]
keyAuth:
type: object
properties:
header:
type: string
required:
- enable
stream:
type: array
minItems: 1
items:
type: object
required: [ "name", "match", "backend", "protocol" ]
properties:
"protocol":
type: string
enum: [ "TCP", "UDP" ]
name:
type: string
minLength: 1
match:
type: object
properties:
ingressPort:
type: integer
minimum: 1
maximum: 65535
required:
- ingressPort
backend:
type: object
properties:
serviceName:
type: string
minLength: 1
servicePort:
type: integer
minimum: 1
maximum: 65535
resolveGranularity:
type: string
enum: [ "endpoint", "service" ]
subset:
type: string
required:
- serviceName
- servicePort
status:
type: object
properties:
conditions:
type: array
items:
type: object
properties:
"type":
type: string
reason:
type: string
status:
type: string
message:
type: string
observedGeneration:
type: integer
Loading