Skip to content

Chart: Implement HTTP2 appProtocol. #10171

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions charts/ingress-nginx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@ As of version `1.26.0` of this chart, by simply not providing any clusterIP valu
| controller.service.annotations | object | `{}` | |
| controller.service.appProtocol | bool | `true` | If enabled is adding an appProtocol option for Kubernetes service. An appProtocol field replacing annotations that were using for setting a backend protocol. Here is an example for AWS: service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http It allows choosing the protocol for each backend specified in the Kubernetes service. See the following GitHub issue for more details about the purpose: https://github.com/kubernetes/kubernetes/issues/40244 Will be ignored for Kubernetes versions older than 1.20 # |
| controller.service.enableHttp | bool | `true` | |
| controller.service.enableHttp2 | bool | `false` | |
| controller.service.enableHttps | bool | `true` | |
| controller.service.enabled | bool | `true` | |
| controller.service.external.enabled | bool | `true` | |
Expand Down
6 changes: 5 additions & 1 deletion charts/ingress-nginx/templates/controller-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,18 @@ spec:
nodePort: {{ .Values.controller.service.nodePorts.http }}
{{- end }}
{{- end }}
{{- if .Values.controller.service.enableHttps }}
{{- if or (.Values.controller.service.enableHttps) (.Values.controller.service.enableHttp2) }}
- name: https
port: {{ .Values.controller.service.ports.https }}
protocol: TCP
targetPort: {{ .Values.controller.service.targetPorts.https }}
{{- if and (semverCompare ">=1.20" .Capabilities.KubeVersion.Version) (.Values.controller.service.appProtocol) }}
{{- if (.Values.controller.service.enableHttp2) }}
appProtocol: http2
{{- else }}
appProtocol: https
{{- end }}
{{- end }}
{{- if (and $setNodePorts (not (empty .Values.controller.service.nodePorts.https))) }}
nodePort: {{ .Values.controller.service.nodePorts.https }}
{{- end }}
Expand Down
1 change: 1 addition & 0 deletions charts/ingress-nginx/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,7 @@ controller:
loadBalancerClass: ""
enableHttp: true
enableHttps: true
enableHttp2: false
## Set external traffic policy to: "Local" to preserve source IP on providers supporting it.
## Ref: https://kubernetes.io/docs/tutorials/services/source-ip/#source-ip-for-services-with-typeloadbalancer
# externalTrafficPolicy: ""
Expand Down
1 change: 1 addition & 0 deletions magefiles/helm.go
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ type IngressChartValue struct {
LoadBalancerSourceRanges []interface{} `yaml:"loadBalancerSourceRanges"`
EnableHTTP bool `yaml:"enableHttp"`
EnableHTTPS bool `yaml:"enableHttps"`
EnableHTTP2 bool `yaml:"enableHttp2"`
IPFamilyPolicy string `yaml:"ipFamilyPolicy"`
IPFamilies []string `yaml:"ipFamilies"`
Ports struct {
Expand Down