Skip to content

Commit

Permalink
Add Service appProtocol for GKE Gateway support as backend (#751)
Browse files Browse the repository at this point in the history
### Description
Adding `spec.port.0.appProtocol: "HTTPS"` for compliance with GKE gateways
cf : https://cloud.google.com/kubernetes-engine/docs/how-to/secure-gateway#load-balancer-tls

### Issues Resolved
Fixes #751

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and
signing off your commits, please check
[here](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin).

---------

Signed-off-by: Damien HARDY <[email protected]>
Signed-off-by: dhardy <[email protected]>
  • Loading branch information
dhardy committed Apr 2, 2024
1 parent fb50c19 commit c63e628
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions opensearch-operator/pkg/builders/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,7 @@ func NewServiceForCR(cr *opsterv1.OpenSearchCluster) *corev1.Service {
labels := map[string]string{
helpers.ClusterLabel: cr.Name,
}
httpsProtocol := "HTTPS"
return &corev1.Service{
TypeMeta: metav1.TypeMeta{
Kind: "Service",
Expand All @@ -650,6 +651,7 @@ func NewServiceForCR(cr *opsterv1.OpenSearchCluster) *corev1.Service {
{
Name: "http",
Protocol: "TCP",
AppProtocol: &httpsProtocol,
Port: cr.Spec.General.HttpPort,
TargetPort: intstr.IntOrString{
IntVal: cr.Spec.General.HttpPort,
Expand Down

0 comments on commit c63e628

Please sign in to comment.