-
-
Notifications
You must be signed in to change notification settings - Fork 663
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(gateway): update gateway crds and rename pkg/string.go (#303)
* feat(gateway): update gateway crds * feat: rename pkg/string.go to pkg/slice.go * feat: rename pkg/string.go to pkg/slice.go
- Loading branch information
Showing
7 changed files
with
409 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
controllers/gateway/config/crd/bases/gateway.laf.dev_domains.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
--- | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: v0.9.0 | ||
creationTimestamp: null | ||
name: domains.gateway.laf.dev | ||
spec: | ||
group: gateway.laf.dev | ||
names: | ||
kind: Domain | ||
listKind: DomainList | ||
plural: domains | ||
singular: domain | ||
scope: Namespaced | ||
versions: | ||
- name: v1 | ||
schema: | ||
openAPIV3Schema: | ||
description: Domain is the Schema for the domains API | ||
properties: | ||
apiVersion: | ||
description: 'APIVersion defines the versioned schema of this representation | ||
of an object. Servers should convert recognized schemas to the latest | ||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' | ||
type: string | ||
kind: | ||
description: 'Kind is a string value representing the REST resource this | ||
object represents. Servers may infer this from the endpoint the client | ||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' | ||
type: string | ||
metadata: | ||
type: object | ||
spec: | ||
description: DomainSpec defines the desired state of Domain | ||
properties: | ||
certConfigRef: | ||
description: CertConfigRef 是字符串类型,是configMap的引用 | ||
type: string | ||
domain: | ||
description: Domain 是域名,是字符串类型,规则匹配域名规则,必须存在 | ||
pattern: ^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6}$ | ||
type: string | ||
preferred: | ||
description: Preferred 是提供域名使用位置的推荐项,是字符串类型,长度大于1小于10,必须存在 | ||
maxLength: 10 | ||
minLength: 1 | ||
type: string | ||
region: | ||
description: Region 是域名设定的解析区域,是字符串类型,长度大于1小于10,可选存在 | ||
maxLength: 10 | ||
minLength: 1 | ||
type: string | ||
required: | ||
- certConfigRef | ||
- domain | ||
- preferred | ||
type: object | ||
status: | ||
description: DomainStatus defines the observed state of Domain | ||
properties: | ||
certConfigRef: | ||
description: CertConfigRef 是字符串类型,是configMap的引用 | ||
type: string | ||
required: | ||
- certConfigRef | ||
type: object | ||
type: object | ||
served: true | ||
storage: true | ||
subresources: | ||
status: {} |
78 changes: 78 additions & 0 deletions
78
controllers/gateway/config/crd/bases/gateway.laf.dev_gateways.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
--- | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: v0.9.0 | ||
creationTimestamp: null | ||
name: gateways.gateway.laf.dev | ||
spec: | ||
group: gateway.laf.dev | ||
names: | ||
kind: Gateway | ||
listKind: GatewayList | ||
plural: gateways | ||
singular: gateway | ||
scope: Namespaced | ||
versions: | ||
- name: v1 | ||
schema: | ||
openAPIV3Schema: | ||
description: Gateway is the Schema for the gateways API | ||
properties: | ||
apiVersion: | ||
description: 'APIVersion defines the versioned schema of this representation | ||
of an object. Servers should convert recognized schemas to the latest | ||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' | ||
type: string | ||
kind: | ||
description: 'Kind is a string value representing the REST resource this | ||
object represents. Servers may infer this from the endpoint the client | ||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' | ||
type: string | ||
metadata: | ||
type: object | ||
spec: | ||
description: GatewaySpec defines the desired state of Gateway | ||
properties: | ||
appId: | ||
description: AppId是应用id,字母数字组成,长度5至16位,必须存在 | ||
pattern: ^[a-zA-Z0-9]{5,16}$ | ||
type: string | ||
buckets: | ||
description: Buckets是存储桶, 是一个数组,可选存在 | ||
items: | ||
type: string | ||
type: array | ||
websites: | ||
description: Websites是静态站点,是一个数组,可选存在 | ||
items: | ||
type: string | ||
type: array | ||
required: | ||
- appId | ||
type: object | ||
status: | ||
description: GatewayStatus defines the observed state of Gateway | ||
properties: | ||
appDomain: | ||
description: AppDomain 是应用域名,必须存在 | ||
type: string | ||
bucketDomains: | ||
description: BucketDomains 是存储桶域名列表,是一个数组,可选存在 | ||
items: | ||
type: string | ||
type: array | ||
websiteDomains: | ||
description: WebsiteDomains 是静态站点域名列表,是一个数组,可选存在 | ||
items: | ||
type: string | ||
type: array | ||
required: | ||
- appDomain | ||
type: object | ||
type: object | ||
served: true | ||
storage: true | ||
subresources: | ||
status: {} |
88 changes: 88 additions & 0 deletions
88
controllers/gateway/config/crd/bases/gateway.laf.dev_routes.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
--- | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: v0.9.0 | ||
creationTimestamp: null | ||
name: routes.gateway.laf.dev | ||
spec: | ||
group: gateway.laf.dev | ||
names: | ||
kind: Route | ||
listKind: RouteList | ||
plural: routes | ||
singular: route | ||
scope: Namespaced | ||
versions: | ||
- name: v1 | ||
schema: | ||
openAPIV3Schema: | ||
description: Route is the Schema for the routes API | ||
properties: | ||
apiVersion: | ||
description: 'APIVersion defines the versioned schema of this representation | ||
of an object. Servers should convert recognized schemas to the latest | ||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' | ||
type: string | ||
kind: | ||
description: 'Kind is a string value representing the REST resource this | ||
object represents. Servers may infer this from the endpoint the client | ||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' | ||
type: string | ||
metadata: | ||
type: object | ||
spec: | ||
description: RouteSpec defines the desired state of Route | ||
properties: | ||
backend: | ||
description: Backend是service配置, 必须存在 | ||
properties: | ||
serviceName: | ||
description: ServiceName 是service的名称,必须存在 | ||
type: string | ||
servicePort: | ||
description: ServicePort是service的端口,必须存在 | ||
format: int32 | ||
type: integer | ||
required: | ||
- serviceName | ||
- servicePort | ||
type: object | ||
certConfigRef: | ||
description: CertConfigRef 是证书配置,可选存在 | ||
type: string | ||
domain: | ||
description: Domain 是路由域名,必须存在 | ||
pattern: ^[a-zA-Z0-9]*$ | ||
type: string | ||
enableWebSocket: | ||
description: EnableWebSocket 是否开启websocket, 默认否 | ||
type: boolean | ||
passHost: | ||
description: PassHost 传给上游的host,可选存在, 如果不设置,则默认将客户端的 host 透传给上游 | ||
type: string | ||
pathRewrite: | ||
description: PathRewrite 是路径重写,可选存在 | ||
type: string | ||
required: | ||
- backend | ||
type: object | ||
status: | ||
description: RouteStatus defines the observed state of Route | ||
properties: | ||
Domain: | ||
description: Domain 是路由的完整域名,必须存在 | ||
type: string | ||
supportSSL: | ||
description: SupportSSL 是否支持ssl, 默认为false | ||
type: boolean | ||
required: | ||
- Domain | ||
- supportSSL | ||
type: object | ||
type: object | ||
served: true | ||
storage: true | ||
subresources: | ||
status: {} |
Oops, something went wrong.