Skip to content

Commit

Permalink
Enable agent service by default (#4993)
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Su <[email protected]>
  • Loading branch information
pingsutw authored Mar 11, 2024
1 parent b0b5dc3 commit 04508c0
Show file tree
Hide file tree
Showing 16 changed files with 33 additions and 21 deletions.
1 change: 1 addition & 0 deletions charts/flyte-binary/eks-production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ configuration:
- container
- sidecar
- K8S-ARRAY #used for MapTasks
- agent-service
default-for-task-types:
- container: container
- container_array: K8S-ARRAY
Expand Down
1 change: 1 addition & 0 deletions charts/flyte-binary/eks-starter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ configuration:
- container
- sidecar
- K8S-ARRAY #used for MapTasks
- agent-service
default-for-task-types:
- container: container
- container_array: K8S-ARRAY
Expand Down
6 changes: 3 additions & 3 deletions charts/flyte-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ helm install gateway bitnami/contour -n flyte
| configmap.core.propeller | object | `{"downstream-eval-duration":"30s","enable-admin-launcher":true,"leader-election":{"enabled":true,"lease-duration":"15s","lock-config-map":{"name":"propeller-leader","namespace":"flyte"},"renew-deadline":"10s","retry-period":"2s"},"limit-namespace":"all","max-workflow-retries":30,"metadata-prefix":"metadata/propeller","metrics-prefix":"flyte","prof-port":10254,"queue":{"batch-size":-1,"batching-interval":"2s","queue":{"base-delay":"5s","capacity":1000,"max-delay":"120s","rate":100,"type":"maxof"},"sub-queue":{"capacity":100,"rate":10,"type":"bucket"},"type":"batch"},"rawoutput-prefix":"s3://my-s3-bucket/","workers":4,"workflow-reeval-duration":"30s"}` | follows the structure specified [here](https://pkg.go.dev/github.com/flyteorg/flytepropeller/pkg/controller/config). |
| configmap.datacatalogServer | object | `{"application":{"grpcPort":8089,"grpcServerReflection":true,"httpPort":8080},"datacatalog":{"heartbeat-grace-period-multiplier":3,"max-reservation-heartbeat":"30s","metrics-scope":"datacatalog","profiler-port":10254,"storage-prefix":"metadata/datacatalog"}}` | Datacatalog server config |
| configmap.domain | object | `{"domains":[{"id":"development","name":"development"},{"id":"staging","name":"staging"},{"id":"production","name":"production"}]}` | Domains configuration for Flyte projects. This enables the specified number of domains across all projects in Flyte. |
| configmap.enabled_plugins.tasks | object | `{"task-plugins":{"default-for-task-types":{"container":"container","container_array":"k8s-array","sidecar":"sidecar"},"enabled-plugins":["container","sidecar","k8s-array"]}}` | Tasks specific configuration [structure](https://pkg.go.dev/github.com/flyteorg/flytepropeller/pkg/controller/nodes/task/config#GetConfig) |
| configmap.enabled_plugins.tasks.task-plugins | object | `{"default-for-task-types":{"container":"container","container_array":"k8s-array","sidecar":"sidecar"},"enabled-plugins":["container","sidecar","k8s-array"]}` | Plugins configuration, [structure](https://pkg.go.dev/github.com/flyteorg/flytepropeller/pkg/controller/nodes/task/config#TaskPluginConfig) |
| configmap.enabled_plugins.tasks.task-plugins.enabled-plugins | list | `["container","sidecar","k8s-array"]` | [Enabled Plugins](https://pkg.go.dev/github.com/lyft/flyteplugins/go/tasks/config#Config). Enable sagemaker*, athena if you install the backend plugins |
| configmap.enabled_plugins.tasks | object | `{"task-plugins":{"default-for-task-types":{"container":"container","container_array":"k8s-array","sidecar":"sidecar"},"enabled-plugins":["container","sidecar","k8s-array","agent-service"]}}` | Tasks specific configuration [structure](https://pkg.go.dev/github.com/flyteorg/flytepropeller/pkg/controller/nodes/task/config#GetConfig) |
| configmap.enabled_plugins.tasks.task-plugins | object | `{"default-for-task-types":{"container":"container","container_array":"k8s-array","sidecar":"sidecar"},"enabled-plugins":["container","sidecar","k8s-array","agent-service"]}` | Plugins configuration, [structure](https://pkg.go.dev/github.com/flyteorg/flytepropeller/pkg/controller/nodes/task/config#TaskPluginConfig) |
| configmap.enabled_plugins.tasks.task-plugins.enabled-plugins | list | `["container","sidecar","k8s-array","agent-service"]` | [Enabled Plugins](https://pkg.go.dev/github.com/lyft/flyteplugins/go/tasks/config#Config). Enable sagemaker*, athena if you install the backend plugins |
| configmap.k8s | object | `{"plugins":{"k8s":{"default-cpus":"100m","default-env-vars":[],"default-memory":"100Mi"}}}` | Kubernetes specific Flyte configuration |
| configmap.k8s.plugins.k8s | object | `{"default-cpus":"100m","default-env-vars":[],"default-memory":"100Mi"}` | Configuration section for all K8s specific plugins [Configuration structure](https://pkg.go.dev/github.com/lyft/flyteplugins/go/tasks/pluginmachinery/flytek8s/config) |
| configmap.remoteData.remoteData.region | string | `"us-east-1"` | |
Expand Down
1 change: 1 addition & 0 deletions charts/flyte-core/values-eks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ configmap:
- container
- sidecar
- k8s-array
- agent-service
# - sagemaker_hyperparameter_tuning
# - sagemaker_custom_training
# - sagemaker_training
Expand Down
1 change: 1 addition & 0 deletions charts/flyte-core/values-gcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ configmap:
- container
- sidecar
- k8s-array
- agent-service
default-for-task-types:
container: container
sidecar: sidecar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,7 @@ configmap:
- container
- sidecar
- k8s-array
- agent-service
default-for-task-types:
container: container
sidecar: sidecar
Expand Down
3 changes: 1 addition & 2 deletions charts/flyte-core/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -792,8 +792,7 @@ configmap:
- container
- sidecar
- k8s-array
# -- Uncomment to enable agent service
# - agent-service
- agent-service
default-for-task-types:
container: container
sidecar: sidecar
Expand Down
5 changes: 3 additions & 2 deletions deployment/eks/flyte_aws_scheduler_helm_generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,7 @@ data:
- container
- sidecar
- k8s-array
- agent-service
k8s.yaml: |
plugins:
k8s:
Expand Down Expand Up @@ -1267,7 +1268,7 @@ spec:
template:
metadata:
annotations:
configChecksum: "6f925c4627a6ae0040ea2073d2f5faca3fbfa82c90d90eae474819f23d52212"
configChecksum: "e03c74684e3570657bfe4736b326b2c14061258946ad20677b3186b9657f455"
labels:
app.kubernetes.io/name: flytepropeller
app.kubernetes.io/instance: flyte
Expand Down Expand Up @@ -1349,7 +1350,7 @@ spec:
app.kubernetes.io/name: flyte-pod-webhook
app.kubernetes.io/version: v1.11.0-b1
annotations:
configChecksum: "6f925c4627a6ae0040ea2073d2f5faca3fbfa82c90d90eae474819f23d52212"
configChecksum: "e03c74684e3570657bfe4736b326b2c14061258946ad20677b3186b9657f455"
spec:
securityContext:
fsGroup: 65534
Expand Down
5 changes: 3 additions & 2 deletions deployment/eks/flyte_helm_dataplane_generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ data:
- container
- sidecar
- k8s-array
- agent-service
k8s.yaml: |
plugins:
k8s:
Expand Down Expand Up @@ -427,7 +428,7 @@ spec:
template:
metadata:
annotations:
configChecksum: "6f925c4627a6ae0040ea2073d2f5faca3fbfa82c90d90eae474819f23d52212"
configChecksum: "e03c74684e3570657bfe4736b326b2c14061258946ad20677b3186b9657f455"
labels:
app.kubernetes.io/name: flytepropeller
app.kubernetes.io/instance: flyte
Expand Down Expand Up @@ -509,7 +510,7 @@ spec:
app.kubernetes.io/name: flyte-pod-webhook
app.kubernetes.io/version: v1.11.0-b1
annotations:
configChecksum: "6f925c4627a6ae0040ea2073d2f5faca3fbfa82c90d90eae474819f23d52212"
configChecksum: "e03c74684e3570657bfe4736b326b2c14061258946ad20677b3186b9657f455"
spec:
securityContext:
fsGroup: 65534
Expand Down
5 changes: 3 additions & 2 deletions deployment/eks/flyte_helm_generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,7 @@ data:
- container
- sidecar
- k8s-array
- agent-service
k8s.yaml: |
plugins:
k8s:
Expand Down Expand Up @@ -1397,7 +1398,7 @@ spec:
template:
metadata:
annotations:
configChecksum: "6f925c4627a6ae0040ea2073d2f5faca3fbfa82c90d90eae474819f23d52212"
configChecksum: "e03c74684e3570657bfe4736b326b2c14061258946ad20677b3186b9657f455"
labels:
app.kubernetes.io/name: flytepropeller
app.kubernetes.io/instance: flyte
Expand Down Expand Up @@ -1479,7 +1480,7 @@ spec:
app.kubernetes.io/name: flyte-pod-webhook
app.kubernetes.io/version: v1.11.0-b1
annotations:
configChecksum: "6f925c4627a6ae0040ea2073d2f5faca3fbfa82c90d90eae474819f23d52212"
configChecksum: "e03c74684e3570657bfe4736b326b2c14061258946ad20677b3186b9657f455"
spec:
securityContext:
fsGroup: 65534
Expand Down
5 changes: 3 additions & 2 deletions deployment/gcp/flyte_helm_dataplane_generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ data:
- container
- sidecar
- k8s-array
- agent-service
k8s.yaml: |
plugins:
k8s:
Expand Down Expand Up @@ -435,7 +436,7 @@ spec:
template:
metadata:
annotations:
configChecksum: "9c6856d58b3168a752486076eccbc6783bbb94d62b47139c6cab6e1fe12174c"
configChecksum: "9bc27a186f548894dceed907e428e5ff148a7bc709218fa0d828cade4598f1f"
labels:
app.kubernetes.io/name: flytepropeller
app.kubernetes.io/instance: flyte
Expand Down Expand Up @@ -516,7 +517,7 @@ spec:
app.kubernetes.io/name: flyte-pod-webhook
app.kubernetes.io/version: v1.11.0-b1
annotations:
configChecksum: "9c6856d58b3168a752486076eccbc6783bbb94d62b47139c6cab6e1fe12174c"
configChecksum: "9bc27a186f548894dceed907e428e5ff148a7bc709218fa0d828cade4598f1f"
spec:
securityContext:
fsGroup: 65534
Expand Down
5 changes: 3 additions & 2 deletions deployment/gcp/flyte_helm_generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,7 @@ data:
- container
- sidecar
- k8s-array
- agent-service
k8s.yaml: |
plugins:
k8s:
Expand Down Expand Up @@ -1420,7 +1421,7 @@ spec:
template:
metadata:
annotations:
configChecksum: "9c6856d58b3168a752486076eccbc6783bbb94d62b47139c6cab6e1fe12174c"
configChecksum: "9bc27a186f548894dceed907e428e5ff148a7bc709218fa0d828cade4598f1f"
labels:
app.kubernetes.io/name: flytepropeller
app.kubernetes.io/instance: flyte
Expand Down Expand Up @@ -1501,7 +1502,7 @@ spec:
app.kubernetes.io/name: flyte-pod-webhook
app.kubernetes.io/version: v1.11.0-b1
annotations:
configChecksum: "9c6856d58b3168a752486076eccbc6783bbb94d62b47139c6cab6e1fe12174c"
configChecksum: "9bc27a186f548894dceed907e428e5ff148a7bc709218fa0d828cade4598f1f"
spec:
securityContext:
fsGroup: 65534
Expand Down
4 changes: 2 additions & 2 deletions docker/sandbox-bundled/manifests/complete-agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ type: Opaque
---
apiVersion: v1
data:
haSharedSecret: UVdVTnB4cXBMVXMyRjhGUw==
haSharedSecret: ZVNtQlpWSTRkZnFtRVp0cw==
proxyPassword: ""
proxyUsername: ""
kind: Secret
Expand Down Expand Up @@ -1412,7 +1412,7 @@ spec:
metadata:
annotations:
checksum/config: 8f50e768255a87f078ba8b9879a0c174c3e045ffb46ac8723d2eedbe293c8d81
checksum/secret: 7dd7be244652f0c2d4d5651db7e9d879fb74fb3a4407a80c48cba3dcd7b74e53
checksum/secret: e540906f7530a7b8f9c9e7488bfe922999294201b1f0f75ab310162ef6441d96
labels:
app: docker-registry
release: flyte-sandbox
Expand Down
4 changes: 2 additions & 2 deletions docker/sandbox-bundled/manifests/complete.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@ type: Opaque
---
apiVersion: v1
data:
haSharedSecret: cnBScDd2Y3Y0a2JlcHlzVQ==
haSharedSecret: VnRRWDlOZXVWcXNmZFRXRQ==
proxyPassword: ""
proxyUsername: ""
kind: Secret
Expand Down Expand Up @@ -1360,7 +1360,7 @@ spec:
metadata:
annotations:
checksum/config: 8f50e768255a87f078ba8b9879a0c174c3e045ffb46ac8723d2eedbe293c8d81
checksum/secret: 459fe43b90e7be7fce10bc94020ba94037c1a21501b61d4e7121c84251f1b198
checksum/secret: 1a60b7cc9612c65c9a369c55629f6054dfed24c40b064269274d0fbb7c6d0823
labels:
app: docker-registry
release: flyte-sandbox
Expand Down
4 changes: 2 additions & 2 deletions docker/sandbox-bundled/manifests/dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ metadata:
---
apiVersion: v1
data:
haSharedSecret: NlJkVzYyZ1MzZmZIRE1nOA==
haSharedSecret: dlY1cWxrMFBJOU8yazFyZQ==
proxyPassword: ""
proxyUsername: ""
kind: Secret
Expand Down Expand Up @@ -934,7 +934,7 @@ spec:
metadata:
annotations:
checksum/config: 8f50e768255a87f078ba8b9879a0c174c3e045ffb46ac8723d2eedbe293c8d81
checksum/secret: 2e417b7dd337346d064d1cd4edf6b5624d335fce92ccfe22acd20485be450ec9
checksum/secret: b86db743a29c0ae883fd1fd39fb1a6e81288c8451f3ebac001c7f2f1893d3f2a
labels:
app: docker-registry
release: flyte-sandbox
Expand Down
3 changes: 3 additions & 0 deletions flyteplugins/go/tasks/plugins/webapi/agent/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ func getFinalContext(ctx context.Context, operation string, agent *Deployment) (
}

func initializeAgentRegistry(cs *ClientSet) (Registry, error) {
logger.Infof(context.Background(), "Initializing agent registry")
agentRegistry := make(Registry)
cfg := GetConfig()
var agentDeployments []*Deployment
Expand Down Expand Up @@ -156,6 +157,8 @@ func initializeAgentRegistry(cs *ClientSet) (Registry, error) {
}

func initializeClients(ctx context.Context) (*ClientSet, error) {
logger.Infof(ctx, "Initializing agent clients")

asyncAgentClients := make(map[string]service.AsyncAgentServiceClient)
syncAgentClients := make(map[string]service.SyncAgentServiceClient)
agentMetadataClients := make(map[string]service.AgentMetadataServiceClient)
Expand Down

0 comments on commit 04508c0

Please sign in to comment.