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

Flyte Add Enable/Disable Options for Agent Services #4041

Merged
merged 17 commits into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from 5 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: 1 addition & 2 deletions charts/flyte-binary/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -382,8 +382,7 @@ enabled_plugins:
- 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: 5 additions & 0 deletions docker/sandbox-bundled/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ flyte:
manifests:
mkdir -p manifests
helm dependency update ../../charts/flyte-sandbox
helm dependency update ../../charts/flyteagent
kustomize build \
--enable-helm \
--load-restrictor=LoadRestrictionsNone \
Expand All @@ -27,6 +28,10 @@ manifests:
--enable-helm \
--load-restrictor=LoadRestrictionsNone \
kustomize/dev > manifests/dev.yaml
kustomize build \
--enable-helm \
--load-restrictor=LoadRestrictionsNone \
kustomize/complete-agent > manifests/complete-agent.yaml

.PHONY: build
build: flyte manifests
Expand Down
15 changes: 11 additions & 4 deletions docker/sandbox-bundled/bootstrap/cmd/bootstrap/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@ const (
clusterResourceTemplatesConfigMapName = "flyte-sandbox-extra-cluster-resource-templates"
deploymentName = "flyte-sandbox"
devModeEnvVar = "FLYTE_DEV"
completeAgentModeEnvVar = "FLYTE_COMPLETE_AGENT"
dockerHost = "host.docker.internal"
namespace = "flyte"

// Template paths
devTemplatePath = "/var/lib/rancher/k3s/server/manifests-staging/dev.yaml"
fullTemplatePath = "/var/lib/rancher/k3s/server/manifests-staging/complete.yaml"
renderedManifestPath = "/var/lib/rancher/k3s/server/manifests/flyte.yaml"
devTemplatePath = "/var/lib/rancher/k3s/server/manifests-staging/dev.yaml"
fullTemplatePath = "/var/lib/rancher/k3s/server/manifests-staging/complete.yaml"
fullAgentTemplatePath = "/var/lib/rancher/k3s/server/manifests-staging/complete-agent.yaml"
renderedManifestPath = "/var/lib/rancher/k3s/server/manifests/flyte.yaml"
)

func main() {
Expand All @@ -35,7 +37,12 @@ func main() {
} else {
// If we are not running in dev mode, look for user-specified configuration
// to load into the sandbox deployment
tmplPath = fullTemplatePath
if os.Getenv(completeAgentModeEnvVar) == "True" {
tmplPath = fullAgentTemplatePath
} else {
tmplPath = fullTemplatePath
}

cOpts := config.LoaderOpts{
ConfigurationConfigMapName: configurationConfigMapName,
ClusterResourceTemplatesConfigMapName: clusterResourceTemplatesConfigMapName,
Expand Down
12 changes: 12 additions & 0 deletions docker/sandbox-bundled/kustomize/complete-agent/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
helmGlobals:
chartHome: ../../../../charts
helmCharts:
- name: flyte-sandbox
releaseName: flyte-sandbox
namespace: flyte
- name: flyteagent
releaseName: flyteagent
namespace: flyte
namespace: flyte
resources:
- ../namespace.yaml
Loading
Loading