bobbai00 commented on code in PR #4191:
URL: https://github.com/apache/texera/pull/4191#discussion_r2770581642
##########
bin/k8s/values.yaml:
##########
@@ -121,8 +117,8 @@ exampleDataLoader:
webserver:
name: webserver
- numOfPods: 1 # Number of pods for the Texera deployment
- imageName: apache/texera-dashboard-service:1.1.0-incubating # image name of
the texera
+ numOfPods: 1
Review Comment:
do you need to remove these comments?
##########
bin/k8s/values.yaml:
##########
@@ -30,7 +30,7 @@ persistence:
minioHostLocalPath: ""
postgresqlHostLocalPath: ""
-# Part 1: the configuration of Postgres, Minio and LakeFS
+# configuration of Postgres, Minio and LakeFS
Review Comment:
Is this change needed?
##########
bin/k8s/values.yaml:
##########
@@ -308,56 +276,9 @@ metrics-server:
create: true
serviceAccount:
create: true
- priorityClassName: system-cluster-critical
-# Custom Ingress resource configs
-ingressPaths:
- enabled: true
- ingressClassName: nginx # Set to "alb" when deploying on AWS
+gatewayConfig:
Review Comment:
can you provide comments on how to configure this part?
##########
bin/k8s/templates/eg-config-hook.yaml:
##########
@@ -0,0 +1,97 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+apiVersion: v1
Review Comment:
This hook is too ad-hoc. Please remove it, and try:
1. Add envoy gateway dependency to `Chart.yaml`, some thing like:
```
dependencies:
- name: gateway-helm
version: 1.6.3
repository: oci://docker.io/envoyproxy
alias: envoy-gateway
```
You can mimic how we did for postgres and minio.
2. In `values.yaml`, add some thing like:
```
envoy-gateway:
namespaces:
....
config:
envoyGateway:
extensionApis:
enableBackend: true
enableEnvoyPatchPolicy: true
```
##########
bin/k8s/templates/routes.yaml:
##########
@@ -0,0 +1,142 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
Review Comment:
change the file name to "gateway-routes.yaml"
##########
bin/k8s/templates/security-policy.yaml:
##########
@@ -0,0 +1,39 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+apiVersion: gateway.envoyproxy.io/v1alpha1
Review Comment:
can you give a better name for this file, e.g. 'gateway-security-policy'? I
think every file related to gateway should have this `gateway-` as the prefix
##########
access-control-service/src/main/scala/org/apache/texera/service/resource/AccessControlResource.scala:
##########
@@ -121,12 +121,20 @@ object AccessControlResource extends LazyLogging {
return Response.status(Response.Status.FORBIDDEN).build()
}
+ // Dynamic Routing Logic
+ val workflowComputingUnitPoolName =
sys.env.getOrElse("WORKFLOW_COMPUTING_UNIT_POOL_NAME",
"texera-workflow-computing-unit-pool")
Review Comment:
Please NOT read the env var in the ad-hoc way. Using `XXXConfig` way of
loading it. Please see `common/config/src/main/resources/kubernetes.conf`. I
think it contains the variables you need
##########
bin/k8s/templates/eg-config-hook.yaml:
##########
@@ -0,0 +1,97 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+ name: {{ .Release.Name }}-eg-setup-sa
+ namespace: {{ .Release.Namespace }}
+ annotations:
+ "helm.sh/hook": pre-install,pre-upgrade
+ "helm.sh/hook-delete-policy": before-hook-creation
+ "helm.sh/hook-weight": "-5"
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRole
+metadata:
+ name: texera-eg-setup-role
+ annotations:
+ "helm.sh/hook": pre-install,pre-upgrade
+ "helm.sh/hook-delete-policy": before-hook-creation
+ "helm.sh/hook-weight": "-5"
+rules:
+ - apiGroups: [""]
+ resources: ["configmaps"]
+ verbs: ["get", "patch"]
+ - apiGroups: ["apps"]
+ resources: ["deployments"]
+ verbs: ["get", "patch", "list"]
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRoleBinding
+metadata:
+ name: texera-eg-setup-binding
+ annotations:
+ "helm.sh/hook": pre-install,pre-upgrade
+ "helm.sh/hook-delete-policy": before-hook-creation
+ "helm.sh/hook-weight": "-5"
+subjects:
+ - kind: ServiceAccount
+ name: texera-eg-setup-sa
+ namespace: {{ .Release.Namespace }}
+roleRef:
+ kind: ClusterRole
+ name: texera-eg-setup-role
+ apiGroup: rbac.authorization.k8s.io
+---
+apiVersion: batch/v1
+kind: Job
+metadata:
+ name: texera-eg-enable-backend
+ namespace: {{ .Release.Namespace }}
+ annotations:
+ "helm.sh/hook": pre-install,pre-upgrade
+ "helm.sh/hook-delete-policy": hook-succeeded
+ "helm.sh/hook-weight": "0"
+spec:
+ template:
+ spec:
+ serviceAccountName: texera-eg-setup-sa
Review Comment:
ditto
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]