Skip to content

Commit

Permalink
Istio: Fix conflicting name for LoadBalancer HttpCookie spotted by Win
Browse files Browse the repository at this point in the history
  • Loading branch information
Sgitario committed Nov 26, 2021
1 parent 77d9d74 commit 35a577d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
3 changes: 3 additions & 0 deletions extensions/istio/generator-v1alpha3/cmd/generate/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ func main() {
reflect.TypeOf(api_networking_v1alpha3.VirtualService{}): "io.fabric8.istio.api.networking.v1alpha3.VirtualServiceSpec",
reflect.TypeOf(api_networking_v1alpha3.WorkloadEntry{}): "io.fabric8.istio.api.networking.v1alpha3.WorkloadEntrySpec",
reflect.TypeOf(types.Value{}): "io.fabric8.istio.api.internal.protobuf.types.Value",

// Avoid same name for:
reflect.TypeOf(api_networking_v1alpha3.LoadBalancerSettings_ConsistentHashLB_HTTPCookie{}): "io.fabric8.istio.api.networking.v1alpha3.LoadBalancerSettingsConsistentHashLBHttpCookieValue",
},
CustomJavaNameRule: func(packageName *string, className *string) {
// remove underscores
Expand Down
3 changes: 3 additions & 0 deletions extensions/istio/generator-v1beta1/cmd/generate/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ func main() {
reflect.TypeOf(api_security_v1beta1.AuthorizationPolicy{}): "io.fabric8.istio.api.security.v1beta1.AuthorizationPolicySpec",
reflect.TypeOf(api_security_v1beta1.PeerAuthentication{}): "io.fabric8.istio.api.security.v1beta1.PeerAuthenticationSpec",
reflect.TypeOf(api_security_v1beta1.RequestAuthentication{}): "io.fabric8.istio.api.security.v1beta1.RequestAuthenticationSpec",

// Avoid same name for:
reflect.TypeOf(api_networking_v1beta1.LoadBalancerSettings_ConsistentHashLB_HTTPCookie{}): "io.fabric8.istio.api.networking.v1beta1.LoadBalancerSettingsConsistentHashLBHttpCookieValue",
},
CustomJavaNameRule: func(packageName *string, className *string) {
// remove underscores
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1518,7 +1518,7 @@
"existingJavaType": "java.lang.String"
}
},
"javaType": "io.fabric8.istio.api.networking.v1alpha3.LoadBalancerSettingsConsistentHashLBHTTPCookie",
"javaType": "io.fabric8.istio.api.networking.v1alpha3.LoadBalancerSettingsConsistentHashLBHttpCookieValue",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.KubernetesResource"
]
Expand All @@ -1528,7 +1528,7 @@
"properties": {
"httpCookie": {
"$ref": "#/definitions/istio_io_api_networking_v1alpha3_LoadBalancerSettings_ConsistentHashLB_HTTPCookie",
"existingJavaType": "io.fabric8.istio.api.networking.v1alpha3.LoadBalancerSettingsConsistentHashLBHTTPCookie"
"existingJavaType": "io.fabric8.istio.api.networking.v1alpha3.LoadBalancerSettingsConsistentHashLBHttpCookieValue"
}
},
"javaType": "io.fabric8.istio.api.networking.v1alpha3.LoadBalancerSettingsConsistentHashLBHttpCookie",
Expand Down Expand Up @@ -3201,7 +3201,7 @@
},
"istio_io_api_networking_v1alpha3_LoadBalancerSettings_ConsistentHashLB_HTTPCookie": {
"$ref": "#/definitions/istio_io_api_networking_v1alpha3_LoadBalancerSettings_ConsistentHashLB_HTTPCookie",
"existingJavaType": "io.fabric8.istio.api.networking.v1alpha3.LoadBalancerSettingsConsistentHashLBHTTPCookie"
"existingJavaType": "io.fabric8.istio.api.networking.v1alpha3.LoadBalancerSettingsConsistentHashLBHttpCookieValue"
},
"istio_io_api_networking_v1alpha3_LoadBalancerSettings_ConsistentHashLB_HttpCookie": {
"$ref": "#/definitions/istio_io_api_networking_v1alpha3_LoadBalancerSettings_ConsistentHashLB_HttpCookie",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,7 @@
"existingJavaType": "java.lang.String"
}
},
"javaType": "io.fabric8.istio.api.networking.v1beta1.LoadBalancerSettingsConsistentHashLBHTTPCookie",
"javaType": "io.fabric8.istio.api.networking.v1beta1.LoadBalancerSettingsConsistentHashLBHttpCookieValue",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.KubernetesResource"
]
Expand All @@ -939,7 +939,7 @@
"properties": {
"httpCookie": {
"$ref": "#/definitions/istio_io_api_networking_v1beta1_LoadBalancerSettings_ConsistentHashLB_HTTPCookie",
"existingJavaType": "io.fabric8.istio.api.networking.v1beta1.LoadBalancerSettingsConsistentHashLBHTTPCookie"
"existingJavaType": "io.fabric8.istio.api.networking.v1beta1.LoadBalancerSettingsConsistentHashLBHttpCookieValue"
}
},
"javaType": "io.fabric8.istio.api.networking.v1beta1.LoadBalancerSettingsConsistentHashLBHttpCookie",
Expand Down Expand Up @@ -3068,7 +3068,7 @@
},
"istio_io_api_networking_v1beta1_LoadBalancerSettings_ConsistentHashLB_HTTPCookie": {
"$ref": "#/definitions/istio_io_api_networking_v1beta1_LoadBalancerSettings_ConsistentHashLB_HTTPCookie",
"existingJavaType": "io.fabric8.istio.api.networking.v1beta1.LoadBalancerSettingsConsistentHashLBHTTPCookie"
"existingJavaType": "io.fabric8.istio.api.networking.v1beta1.LoadBalancerSettingsConsistentHashLBHttpCookieValue"
},
"istio_io_api_networking_v1beta1_LoadBalancerSettings_ConsistentHashLB_HttpCookie": {
"$ref": "#/definitions/istio_io_api_networking_v1beta1_LoadBalancerSettings_ConsistentHashLB_HttpCookie",
Expand Down

0 comments on commit 35a577d

Please sign in to comment.