Skip to content

Commit

Permalink
removed skipFlinkClusterDefault flag and resource defaulting.
Browse files Browse the repository at this point in the history
  • Loading branch information
rayhaanbhikha committed May 25, 2022
1 parent 39bb245 commit 4667618
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
11 changes: 5 additions & 6 deletions pkg/flink/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,11 @@ import (

// Config ... Flink-specific configs
type Config struct {
DefaultFlinkCluster flinkOp.FlinkCluster `json:"defaultFlinkCluster"`
SkipFlinkClusterDefaults bool `json:"skipFlinkClusterDefaults"`
FlinkPropertiesOverride map[string]string `json:"flinkPropertiesOverride" pflag:",Key value pairs of flink properties to be overridden in every FlinkJob"`
LogConfig logs.LogConfig `json:"logs"`
GeneratedNameMaxLength *int `json:"generatedNameMaxLength" pflag:"Specifies the length of TaskExecutionID generated name. default: 50"`
RemoteClusterConfig ClusterConfig `json:"remoteClusterConfig" pflag:"Configuration of remote K8s cluster for array jobs"`
DefaultFlinkCluster flinkOp.FlinkCluster `json:"defaultFlinkCluster"`
FlinkPropertiesOverride map[string]string `json:"flinkPropertiesOverride" pflag:",Key value pairs of flink properties to be overridden in every FlinkJob"`
LogConfig logs.LogConfig `json:"logs"`
GeneratedNameMaxLength *int `json:"generatedNameMaxLength" pflag:"Specifies the length of TaskExecutionID generated name. default: 50"`
RemoteClusterConfig ClusterConfig `json:"remoteClusterConfig" pflag:"Configuration of remote K8s cluster for array jobs"`
}

func GetFlinkConfig() *Config {
Expand Down
3 changes: 0 additions & 3 deletions pkg/flink/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,6 @@ func NewFlinkCluster(config *Config, taskCtx FlinkTaskContext) (*flinkOp.FlinkCl

// fill in defaults
resource := flinkOp.FlinkCluster(cluster)
if !config.SkipFlinkClusterDefaults {
resource.Default()
}

return &resource, nil
}
Expand Down
4 changes: 1 addition & 3 deletions pkg/flink/resources_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,7 @@ func TestPartialFlinkCluster(t *testing.T) {
},
}

config := &Config{
SkipFlinkClusterDefaults: true,
}
config := &Config{}

flinkCtx := FlinkTaskContext{
ClusterName: ClusterName("generated-name"),
Expand Down

0 comments on commit 4667618

Please sign in to comment.