Skip to content

Commit

Permalink
Fix config validator tags and remove redundant config values
Browse files Browse the repository at this point in the history
  • Loading branch information
deadlycoconuts committed Sep 20, 2024
1 parent a0eadc0 commit 728d5bd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
1 change: 0 additions & 1 deletion api/config-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,4 @@ OpenapiConfig:
ServingPath: /api-docs/

MlflowConfig:
TrackingURL: https://caraml.dev/mlflow
ArtifactServiceType: "nop"
6 changes: 3 additions & 3 deletions api/turing/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ type KanikoConfig struct {
// ResourceRequestsLimits is the resources required by Kaniko executor.
ResourceRequestsLimits ResourceRequestsLimits `validate:"required"`
// Kaniko push registry type
PushRegistryType string `validate:"required"`
PushRegistryType string `validate:"required,oneof=docker gcr"`
// Kaniko docker credential secret name for pushing to docker registries
DockerCredentialSecretName string
}
Expand Down Expand Up @@ -430,8 +430,8 @@ type MLPConfig struct {
}

type MlflowConfig struct {
TrackingURL string `validate:"required"`
ArtifactServiceType string `validate:"required"`
TrackingURL string `validate:"required_if=ArtifactServiceType gcs ArtifactServiceType s3"`
ArtifactServiceType string `validate:"required,oneof=nop gcs s3"`
}

// OpenapiConfig contains the settings for the OpenAPI specs used for validation and Swagger UI
Expand Down
1 change: 0 additions & 1 deletion api/turing/config/example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,6 @@ MLPConfig:
MLPEncryptionKey: secret

MlflowConfig:
TrackingURL: https://caraml.dev/mlflow
ArtifactServiceType: "nop"

# Turing UI configuration to set how the UI assets will be served
Expand Down
3 changes: 3 additions & 0 deletions infra/charts/turing/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ turing:
Limits:
CPU: "1"
Memory: 1Gi
PushRegistryType: docker
SparkAppConfig:
CorePerCPURequest: 1.5
CPURequestToCPULimit: 1.25
Expand All @@ -180,6 +181,8 @@ turing:
MaxOpenConns: 0
KubernetesLabelConfigs: {}
MLPConfig: {}
MlflowConfig:
ArtifactServiceType: "nop"
Sentry:
Enabled: false
RouterDefaults:
Expand Down

0 comments on commit 728d5bd

Please sign in to comment.