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
4 changes: 4 additions & 0 deletions docker/sandbox-bundled/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,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-sandbo x
pingsutw marked this conversation as resolved.
Show resolved Hide resolved
releaseName: flyte-sandbox
namespace: flyte
- name: flyteagent
releaseName: flyteagent
namespace: flyte
namespace: flyte
resources:
- ../namespace.yaml
Loading
Loading