Skip to content

Commit

Permalink
align the default config output
Browse files Browse the repository at this point in the history
Signed-off-by: terry.hung <[email protected]>
  • Loading branch information
Terryhung committed Oct 31, 2024
1 parent dcdd472 commit 8b4ead3
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 26 deletions.
11 changes: 0 additions & 11 deletions flytectl/pkg/configutil/configutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,6 @@ const (
console:
endpoint: {{.Console}}
{{- end}}
{{- if .DataConfig}}
# This is not a needed configuration, only useful if you want to explore the data in sandbox. For non sandbox, please
# do not use this configuration, instead prefer to use aws, gcs, azure sessions. Flytekit, should use fsspec to
# auto select the right backend to pull data as long as the sessions are configured. For Sandbox, this is special, as
# minio is s3 compatible and we ship with minio in sandbox.
storage:
connection:
endpoint: {{.DataConfig.Endpoint}}
access-key: {{.DataConfig.AccessKey}}
secret-key: {{.DataConfig.SecretKey}}
{{- end}}
`
)

Expand Down
9 changes: 0 additions & 9 deletions flytectl/pkg/configutil/configutil_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,6 @@ console:
# For GRPC endpoints you might want to use dns:///flyte.myexample.com
endpoint: dns:///admin.example.com
insecure: true
# This is not a needed configuration, only useful if you want to explore the data in sandbox. For non sandbox, please
# do not use this configuration, instead prefer to use aws, gcs, azure sessions. Flytekit, should use fsspec to
# auto select the right backend to pull data as long as the sessions are configured. For Sandbox, this is special, as
# minio is s3 compatible and we ship with minio in sandbox.
storage:
connection:
endpoint: http://localhost:9000
access-key: my-access-key
secret-key: my-secret-key
`
assert.Equal(t, expected, string(configBytes))

Expand Down
7 changes: 1 addition & 6 deletions flytectl/pkg/sandbox/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,8 @@ func startSandbox(ctx context.Context, cli docker.Docker, g github.GHRepoService
}

templateValues := configutil.ConfigTemplateSpec{
Host: "localhost:30080",
Host: "dns:///localhost:30080",
Insecure: true,
DataConfig: &configutil.DataConfig{
Endpoint: "http://localhost:30002",
AccessKey: "minio",
SecretKey: "miniostorage",
},
}
if err := configutil.SetupConfig(configutil.FlytectlConfig, configutil.GetTemplate(), templateValues); err != nil {
return nil, err
Expand Down

0 comments on commit 8b4ead3

Please sign in to comment.