This repository has been archived by the owner on Oct 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Transition to Queue if the JobCondition is empty (#387)
Signed-off-by: Kevin Su <[email protected]>
- Loading branch information
Showing
11 changed files
with
240 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package common | ||
|
||
import ( | ||
"time" | ||
|
||
pluginsConfig "github.com/flyteorg/flyteplugins/go/tasks/config" | ||
"github.com/flyteorg/flytestdlib/config" | ||
) | ||
|
||
//go:generate pflags Config --default-var=defaultConfig | ||
|
||
var ( | ||
defaultConfig = Config{ | ||
Timeout: config.Duration{Duration: 1 * time.Minute}, | ||
} | ||
|
||
configSection = pluginsConfig.MustRegisterSubSection("kf-operator", &defaultConfig) | ||
) | ||
|
||
// Config is config for 'pytorch' plugin | ||
type Config struct { | ||
// If kubeflow operator doesn't update the status of the task after this timeout, the task will be considered failed. | ||
Timeout config.Duration `json:"timeout,omitempty"` | ||
} | ||
|
||
func GetConfig() *Config { | ||
return configSection.GetConfig().(*Config) | ||
} | ||
|
||
func SetConfig(cfg *Config) error { | ||
return configSection.SetConfig(cfg) | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
116 changes: 116 additions & 0 deletions
116
go/tasks/plugins/k8s/kfoperators/common/config_flags_test.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters