Skip to content

Commit

Permalink
Enable global access for VPC access scope (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
regadas authored Jun 17, 2021
1 parent 2588382 commit 2719b42
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion controllers/flinkcluster_converter.go
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,10 @@ func getDesiredJobManagerService(
case v1beta1.AccessScopeVPC:
jobManagerService.Spec.Type = corev1.ServiceTypeLoadBalancer
jobManagerService.Annotations =
map[string]string{"networking.gke.io/load-balancer-type": "Internal"}
map[string]string{
"networking.gke.io/load-balancer-type": "Internal",
"networking.gke.io/internal-load-balancer-allow-global-access": "true",
}
case v1beta1.AccessScopeExternal:
jobManagerService.Spec.Type = corev1.ServiceTypeLoadBalancer
case v1beta1.AccessScopeNodePort:
Expand Down
3 changes: 2 additions & 1 deletion controllers/flinkcluster_converter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,8 @@ func TestGetDesiredClusterState(t *testing.T) {
RevisionNameLabel: "flinkjobcluster-sample-85dc8f749",
},
Annotations: map[string]string{
"networking.gke.io/load-balancer-type": "Internal",
"networking.gke.io/load-balancer-type": "Internal",
"networking.gke.io/internal-load-balancer-allow-global-access": "true",
},
OwnerReferences: []metav1.OwnerReference{
{
Expand Down

0 comments on commit 2719b42

Please sign in to comment.