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

Add gRPC probe for agent #4990

Merged
merged 7 commits into from
Mar 9, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
3 changes: 2 additions & 1 deletion charts/flyteagent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ A Helm chart for Flyte agent
| fullnameOverride | string | `""` | |
| image.pullPolicy | string | `"IfNotPresent"` | Docker image pull policy |
| image.repository | string | `"ghcr.io/flyteorg/flyteagent"` | Docker image for flyteagent deployment |
| image.tag | string | `"1.10.7"` | Docker image tag |
| image.tag | string | `"1.10.8b2"` | Docker image tag |
| nameOverride | string | `""` | |
| nodeSelector | object | `{}` | nodeSelector for flyteagent deployment |
| podAnnotations | object | `{}` | Annotations for flyteagent pods |
Expand All @@ -30,6 +30,7 @@ A Helm chart for Flyte agent
| ports.containerPort | int | `8000` | |
| ports.name | string | `"agent-grpc"` | |
| priorityClassName | string | `""` | Sets priorityClassName for datacatalog pod(s). |
| readinessProbe | object | `{"grpc":{"port":8000},"initialDelaySeconds":5}` | https://kubernetes.io/blog/2022/05/13/grpc-probes-now-in-beta/#trying-the-feature-out |
| replicaCount | int | `1` | Replicas count for flyteagent deployment |
| resources | object | `{"limits":{"cpu":"500m","ephemeral-storage":"200Mi","memory":"200Mi"},"requests":{"cpu":"500m","ephemeral-storage":"200Mi","memory":"200Mi"}}` | Default resources requests and limits for flyteagent deployment |
| securityContext | object | `{"allowPrivilegeEscalation":false}` | Security context for container |
Expand Down
4 changes: 4 additions & 0 deletions charts/flyteagent/templates/agent/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ spec:
ports:
- containerPort: {{ .Values.ports.containerPort }}
name: {{ .Values.ports.name }}
readinessProbe:
{{- with .Values.readinessProbe -}}
{{ tpl (toYaml .) $ | nindent 10 }}
{{- end }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
resources: {{- toYaml .Values.resources | nindent 10 }}
Expand Down
8 changes: 7 additions & 1 deletion charts/flyteagent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ image:
# -- Docker image for flyteagent deployment
repository: ghcr.io/flyteorg/flyteagent
# -- Docker image tag
tag: 1.10.7 # FLYTEAGENT_TAG
tag: 1.10.8b2 # FLYTEAGENT_TAG
# -- Docker image pull policy
pullPolicy: IfNotPresent
ports:
Expand Down Expand Up @@ -56,6 +56,12 @@ serviceAccount:
imagePullSecrets: []
# -- Security context for pod
podSecurityContext: {}
# -- Readiness probe for flyteagent. Use readinessProbe: {} if agent doesn't implement grpc-health-checking service.
# -- https://kubernetes.io/blog/2022/05/13/grpc-probes-now-in-beta/#trying-the-feature-out
readinessProbe:
grpc:
port: 8000
initialDelaySeconds: 5
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it that high? or why is it needed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

importing some python modules is very slow, especially airflow and spark.

# -- Security context for container
securityContext:
allowPrivilegeEscalation: false
Expand Down
6 changes: 5 additions & 1 deletion deployment/agent/flyte_agent_helm_generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ spec:
- pyflyte
- serve
- agent
image: "ghcr.io/flyteorg/flyteagent:1.10.7"
image: "ghcr.io/flyteorg/flyteagent:1.10.8b2"
pingsutw marked this conversation as resolved.
Show resolved Hide resolved
imagePullPolicy: "IfNotPresent"
name: flyteagent
volumeMounts:
Expand All @@ -87,6 +87,10 @@ spec:
ports:
- containerPort: 8000
name: agent-grpc
readinessProbe:
grpc:
port: 8000
initialDelaySeconds: 5
securityContext:
allowPrivilegeEscalation: false
resources:
Expand Down
10 changes: 7 additions & 3 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: YXFGVndTaXBySjFxWEIxNA==
haSharedSecret: MDZkcjZpSWtxQ0l1U3BkRg==
proxyPassword: ""
proxyUsername: ""
kind: Secret
Expand Down Expand Up @@ -1412,7 +1412,7 @@ spec:
metadata:
annotations:
checksum/config: 8f50e768255a87f078ba8b9879a0c174c3e045ffb46ac8723d2eedbe293c8d81
checksum/secret: f5132fa475eb2386265cbda64d4e6d56922b771a5f7f5e6e8e4536a712663e45
checksum/secret: 0e1cd1e2d9516f5d078a3175e0dca1176c488a2a1b26a520ffb5e8567b028371
labels:
app: docker-registry
release: flyte-sandbox
Expand Down Expand Up @@ -1755,12 +1755,16 @@ spec:
value: minio
- name: FLYTE_AWS_SECRET_ACCESS_KEY
value: miniostorage
image: ghcr.io/flyteorg/flyteagent:1.10.7
image: ghcr.io/flyteorg/flyteagent:1.10.8b2
imagePullPolicy: IfNotPresent
name: flyteagent
ports:
- containerPort: 8000
name: agent-grpc
readinessProbe:
grpc:
port: 8000
initialDelaySeconds: 5
resources:
limits:
cpu: 500m
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: QVo4T0pQZmZLcFZmNjIyNQ==
haSharedSecret: VmVKR1JscnRLS0NlcGR0aA==
proxyPassword: ""
proxyUsername: ""
kind: Secret
Expand Down Expand Up @@ -1360,7 +1360,7 @@ spec:
metadata:
annotations:
checksum/config: 8f50e768255a87f078ba8b9879a0c174c3e045ffb46ac8723d2eedbe293c8d81
checksum/secret: f5e2b9fbf28a7d7815a094f72366cac395bd0aacd7890faa07e80ec700770fc5
checksum/secret: a0053cd8b344fa27669b64ed7abc8d0579ecce282a81be07cd7d4c07734ac269
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: dktYanZDU0tsa0hTWlZmWA==
haSharedSecret: VFFoSGVGVXNlZG5HamZ0Vw==
proxyPassword: ""
proxyUsername: ""
kind: Secret
Expand Down Expand Up @@ -934,7 +934,7 @@ spec:
metadata:
annotations:
checksum/config: 8f50e768255a87f078ba8b9879a0c174c3e045ffb46ac8723d2eedbe293c8d81
checksum/secret: 7956909ef2268e1aad9b4b132d938c8b1a5775321bacfaf61aea7b73cdbcc85e
checksum/secret: ea52a66e2d5ced849a5c3de4e1877b5bb4f945e9240457b48bb5cdffa3c25b97
labels:
app: docker-registry
release: flyte-sandbox
Expand Down
Loading