diff --git a/core/controllers/gateway/config/crd/bases/gateway.laf.dev_domains.yaml b/core/controllers/gateway/config/crd/bases/gateway.laf.dev_domains.yaml index 6be417dc6b..e854fb9619 100644 --- a/core/controllers/gateway/config/crd/bases/gateway.laf.dev_domains.yaml +++ b/core/controllers/gateway/config/crd/bases/gateway.laf.dev_domains.yaml @@ -36,34 +36,27 @@ spec: description: DomainSpec defines the desired state of Domain properties: backendType: - description: BackendType是后端服务类型,必须存在APP;bucket;WEBSITE enum: - app - bucket - website type: string certConfigRef: - description: CertConfigRef 是字符串类型,是configMap的引用,可选存在 type: string cluster: - description: Cluster 是网关集群配置 必须存在 properties: key: - description: key是集群的key,必须存在 type: string url: - description: url是集群的url,必须存在 type: string required: - key - url type: object 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 region: - description: Region 是区域 必须存在 由字符数组和-组成 pattern: ^[a-zA-Z0-9-]+$ type: string required: @@ -76,7 +69,6 @@ spec: description: DomainStatus defines the observed state of Domain properties: certConfigRef: - description: CertConfigRef 是字符串类型,是configMap的引用 type: string required: - certConfigRef diff --git a/core/controllers/gateway/config/crd/bases/gateway.laf.dev_gateways.yaml b/core/controllers/gateway/config/crd/bases/gateway.laf.dev_gateways.yaml index 669d5c1103..e1a0a9305d 100644 --- a/core/controllers/gateway/config/crd/bases/gateway.laf.dev_gateways.yaml +++ b/core/controllers/gateway/config/crd/bases/gateway.laf.dev_gateways.yaml @@ -38,12 +38,10 @@ spec: appid: type: string buckets: - description: Buckets是存储桶, 是一个数组,可选存在 items: type: string type: array websites: - description: Websites是静态站点,是一个数组,可选存在 items: type: string type: array @@ -54,16 +52,12 @@ spec: description: GatewayStatus defines the observed state of Gateway properties: appRoute: - description: AppRoute 是应用路由 properties: domain: - description: Domain 是域名,必须存在 type: string domainName: - description: DomainName 是域名名称,必须存在 type: string domainNamespace: - description: DomainNamespace 是域名所在的命名空间,必须存在 type: string required: - domain @@ -74,20 +68,16 @@ spec: additionalProperties: properties: domain: - description: Domain 是域名,必须存在 type: string domainName: - description: DomainName 是域名名称,必须存在 type: string domainNamespace: - description: DomainNamespace 是域名所在的命名空间,必须存在 type: string required: - domain - domainName - domainNamespace type: object - description: BucketRoutes 是存储桶路由 type: object conditions: description: 'Conditions - Type: Ready' @@ -162,20 +152,16 @@ spec: additionalProperties: properties: domain: - description: Domain 是域名,必须存在 type: string domainName: - description: DomainName 是域名名称,必须存在 type: string domainNamespace: - description: DomainNamespace 是域名所在的命名空间,必须存在 type: string required: - domain - domainName - domainNamespace type: object - description: WebsiteRoutes 是静态站点路由 type: object type: object type: object diff --git a/core/controllers/gateway/config/crd/bases/gateway.laf.dev_routes.yaml b/core/controllers/gateway/config/crd/bases/gateway.laf.dev_routes.yaml index 7d9f9cbd0f..d97aaf80eb 100644 --- a/core/controllers/gateway/config/crd/bases/gateway.laf.dev_routes.yaml +++ b/core/controllers/gateway/config/crd/bases/gateway.laf.dev_routes.yaml @@ -36,13 +36,11 @@ spec: description: RouteSpec defines the desired state of Route properties: backend: - description: Backend是service配置, 必须存在 + description: Backend defines the desired state of Backend properties: serviceName: - description: ServiceName 是service的名称,必须存在 type: string servicePort: - description: ServicePort是service的端口,必须存在 format: int32 type: integer required: @@ -50,31 +48,22 @@ spec: - servicePort type: object certConfigRef: - description: CertConfigRef 是证书配置,可选存在 type: string domain: - description: Domain 是路由域名,必须存在 type: string domainName: - description: DomainName 是域名名称,必须存在 type: string domainNamespace: - description: DomainNamespace 是域名所在的命名空间,必须存在 type: string enableWebSocket: - description: EnableWebSocket 是否开启websocket, 默认否 type: boolean passHost: - description: PassHost 传给上游的host,可选存在, 如果不设置,则默认将客户端的 host 透传给上游 type: string pathRewrite: - description: PathRewrite 是路径重写,可选存在 properties: regex: - description: Regex 是正则表达式,必须存在 type: string replacement: - description: Replacement 是替代内容,必须存在 type: string required: - regex @@ -90,10 +79,8 @@ spec: description: RouteStatus defines the observed state of Route properties: Domain: - description: Domain 是路由的完整域名,必须存在 type: string supportSSL: - description: SupportSSL 是否支持ssl, 默认为false type: boolean required: - Domain diff --git a/core/controllers/gateway/controllers/gateway_controller.go b/core/controllers/gateway/controllers/gateway_controller.go index 59f7366784..e1ed834afa 100644 --- a/core/controllers/gateway/controllers/gateway_controller.go +++ b/core/controllers/gateway/controllers/gateway_controller.go @@ -252,7 +252,7 @@ func (r *GatewayReconciler) addBuckets(ctx context.Context, gateway *gatewayv1.G routeStatus := &gatewayv1.GatewayRoute{ DomainName: bucketDomain.Name, DomainNamespace: bucketDomain.Namespace, - Domain: gateway.Spec.AppId + "-" + bucketName + "." + bucketDomain.Spec.Domain, + Domain: bucketName + "." + bucketDomain.Spec.Domain, } // create bucket route diff --git a/core/controllers/gateway/deploy/manifests/deploy.yaml b/core/controllers/gateway/deploy/manifests/deploy.yaml index b75f1044b6..60a2ce98ca 100644 --- a/core/controllers/gateway/deploy/manifests/deploy.yaml +++ b/core/controllers/gateway/deploy/manifests/deploy.yaml @@ -42,34 +42,27 @@ spec: description: DomainSpec defines the desired state of Domain properties: backendType: - description: BackendType是后端服务类型,必须存在APP;bucket;WEBSITE enum: - app - bucket - website type: string certConfigRef: - description: CertConfigRef 是字符串类型,是configMap的引用,可选存在 type: string cluster: - description: Cluster 是网关集群配置 必须存在 properties: key: - description: key是集群的key,必须存在 type: string url: - description: url是集群的url,必须存在 type: string required: - key - url type: object 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 region: - description: Region 是区域 必须存在 由字符数组和-组成 pattern: ^[a-zA-Z0-9-]+$ type: string required: @@ -82,7 +75,6 @@ spec: description: DomainStatus defines the observed state of Domain properties: certConfigRef: - description: CertConfigRef 是字符串类型,是configMap的引用 type: string required: - certConfigRef @@ -132,12 +124,10 @@ spec: appid: type: string buckets: - description: Buckets是存储桶, 是一个数组,可选存在 items: type: string type: array websites: - description: Websites是静态站点,是一个数组,可选存在 items: type: string type: array @@ -148,16 +138,12 @@ spec: description: GatewayStatus defines the observed state of Gateway properties: appRoute: - description: AppRoute 是应用路由 properties: domain: - description: Domain 是域名,必须存在 type: string domainName: - description: DomainName 是域名名称,必须存在 type: string domainNamespace: - description: DomainNamespace 是域名所在的命名空间,必须存在 type: string required: - domain @@ -168,20 +154,16 @@ spec: additionalProperties: properties: domain: - description: Domain 是域名,必须存在 type: string domainName: - description: DomainName 是域名名称,必须存在 type: string domainNamespace: - description: DomainNamespace 是域名所在的命名空间,必须存在 type: string required: - domain - domainName - domainNamespace type: object - description: BucketRoutes 是存储桶路由 type: object conditions: description: 'Conditions - Type: Ready' @@ -256,20 +238,16 @@ spec: additionalProperties: properties: domain: - description: Domain 是域名,必须存在 type: string domainName: - description: DomainName 是域名名称,必须存在 type: string domainNamespace: - description: DomainNamespace 是域名所在的命名空间,必须存在 type: string required: - domain - domainName - domainNamespace type: object - description: WebsiteRoutes 是静态站点路由 type: object type: object type: object @@ -315,13 +293,11 @@ spec: description: RouteSpec defines the desired state of Route properties: backend: - description: Backend是service配置, 必须存在 + description: Backend defines the desired state of Backend properties: serviceName: - description: ServiceName 是service的名称,必须存在 type: string servicePort: - description: ServicePort是service的端口,必须存在 format: int32 type: integer required: @@ -329,31 +305,22 @@ spec: - servicePort type: object certConfigRef: - description: CertConfigRef 是证书配置,可选存在 type: string domain: - description: Domain 是路由域名,必须存在 type: string domainName: - description: DomainName 是域名名称,必须存在 type: string domainNamespace: - description: DomainNamespace 是域名所在的命名空间,必须存在 type: string enableWebSocket: - description: EnableWebSocket 是否开启websocket, 默认否 type: boolean passHost: - description: PassHost 传给上游的host,可选存在, 如果不设置,则默认将客户端的 host 透传给上游 type: string pathRewrite: - description: PathRewrite 是路径重写,可选存在 properties: regex: - description: Regex 是正则表达式,必须存在 type: string replacement: - description: Replacement 是替代内容,必须存在 type: string required: - regex @@ -369,10 +336,8 @@ spec: description: RouteStatus defines the observed state of Route properties: Domain: - description: Domain 是路由的完整域名,必须存在 type: string supportSSL: - description: SupportSSL 是否支持ssl, 默认为false type: boolean required: - Domain diff --git a/deploy/build/charts/laf/charts/minio/templates/statefulset.yaml b/deploy/build/charts/laf/charts/minio/templates/statefulset.yaml index 490de918d7..55a51e1361 100644 --- a/deploy/build/charts/laf/charts/minio/templates/statefulset.yaml +++ b/deploy/build/charts/laf/charts/minio/templates/statefulset.yaml @@ -139,6 +139,8 @@ spec: - name: {{ $scheme }}-console containerPort: {{ .Values.minioConsolePort }} env: + - name: MINIO_DOMAIN + value: oss.{{ .Values.global.domain }} - name: MINIO_ROOT_USER valueFrom: secretKeyRef: