Skip to content

Commit

Permalink
feat(provider/google): added Session Affinity value to the view
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksandrov authored and maggieneterval committed Oct 15, 2019
1 parent a1fd0ca commit 685ec69
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,11 @@ class GoogleLoadBalancerProvider implements LoadBalancerProvider<GoogleLoadBalan

String instancePort
String loadBalancerPort
String sessionAffinity
switch (view.loadBalancerType) {
case GoogleLoadBalancerType.NETWORK:
GoogleNetworkLoadBalancer.View nlbView = view as GoogleNetworkLoadBalancer.View
sessionAffinity = nlbView.sessionAffinity
instancePort = Utils.derivePortOrPortRange(view.portRange)
loadBalancerPort = Utils.derivePortOrPortRange(view.portRange)
break
Expand Down Expand Up @@ -303,6 +306,7 @@ class GoogleLoadBalancerProvider implements LoadBalancerProvider<GoogleLoadBalan
createdTime: view.createdTime,
dnsname: view.ipAddress,
ipAddress: view.ipAddress,
sessionAffinity: sessionAffinity,
healthCheck: (view.hasProperty("healthCheck") && view.healthCheck) ? view.healthCheck : null,
backendServiceHealthChecks: backendServiceHealthChecks ?: null,
listenerDescriptions: [[
Expand Down Expand Up @@ -367,6 +371,7 @@ class GoogleLoadBalancerProvider implements LoadBalancerProvider<GoogleLoadBalan
String loadBalancerName
GoogleLoadBalancerType loadBalancerType
GoogleHealthCheck.View healthCheck
String sessionAffinity
Map<String, GoogleHealthCheck.View> backendServiceHealthChecks = [:]
// TODO(ttomsu): Bizarre nesting of data. Necessary?
List<Map<String, ListenerDescription>> listenerDescriptions = []
Expand Down

0 comments on commit 685ec69

Please sign in to comment.