Skip to content

Commit

Permalink
Add flinkPropertiesSecret for supporting secret properties
Browse files Browse the repository at this point in the history
Resolves GoogleCloudPlatform#383

Signed-off-by: Sunghoon Kang <[email protected]>
  • Loading branch information
devholic committed May 12, 2021
1 parent 0310df7 commit 2add80b
Show file tree
Hide file tree
Showing 11 changed files with 665 additions and 76 deletions.
9 changes: 6 additions & 3 deletions api/v1beta1/flinkcluster_default_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ func TestSetDefault(t *testing.T) {
},
SecurityContext: nil,
},
FlinkProperties: nil,
FlinkProperties: nil,
FlinkPropertiesSecret: nil,
HadoopConfig: &HadoopConfig{
MountPath: "/etc/hadoop/conf",
},
Expand Down Expand Up @@ -204,7 +205,8 @@ func TestSetNonDefault(t *testing.T) {
AfterJobCancelled: "KeepCluster",
},
},
FlinkProperties: nil,
FlinkProperties: nil,
FlinkPropertiesSecret: nil,
HadoopConfig: &HadoopConfig{
MountPath: "/opt/flink/hadoop/conf",
},
Expand Down Expand Up @@ -268,7 +270,8 @@ func TestSetNonDefault(t *testing.T) {
AfterJobCancelled: "KeepCluster",
},
},
FlinkProperties: nil,
FlinkProperties: nil,
FlinkPropertiesSecret: nil,
HadoopConfig: &HadoopConfig{
MountPath: "/opt/flink/hadoop/conf",
},
Expand Down
5 changes: 4 additions & 1 deletion api/v1beta1/flinkcluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -447,9 +447,12 @@ type FlinkClusterSpec struct {
// TaskManager and job containers.
EnvFrom []corev1.EnvFromSource `json:"envFrom,omitempty"`

// Flink properties which are appened to flink-conf.yaml.
// Flink properties which are appended to flink-conf.yaml.
FlinkProperties map[string]string `json:"flinkProperties,omitempty"`

// Secret source of Flink properties which will be appended to flink-conf.yaml.
FlinkPropertiesSecret *corev1.SecretEnvSource `json:"flinkPropertiesSecret,omitempty"`

// Config for Hadoop.
HadoopConfig *HadoopConfig `json:"hadoopConfig,omitempty"`

Expand Down
21 changes: 20 additions & 1 deletion api/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2add80b

Please sign in to comment.