Skip to content

Commit

Permalink
https://github.com/kubernetes/ingress-nginx/issues/2724#issuecomment-…
Browse files Browse the repository at this point in the history
…593769295
  • Loading branch information
cahillsf committed Apr 3, 2022
1 parent 5c75d72 commit e9489b5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
18 changes: 12 additions & 6 deletions k8s-config/ingress/nginx-elb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ metadata:
namespace: ingress-nginx
data:
allow-snippet-annotations: 'true'
ssl-redirect: 'false'
server-snippet: |
listen 8000;
---
# Source: ingress-nginx/templates/clusterrole.yaml
apiVersion: rbac.authorization.k8s.io/v1
Expand Down Expand Up @@ -266,8 +269,8 @@ metadata:
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp
service.beta.kubernetes.io/aws-load-balancer-cross-zone-load-balancing-enabled: 'true'
service.beta.kubernetes.io/aws-load-balancer-type: nlb
# service.beta.kubernetes.io/aws-load-balancer-ssl-ports: '443'
# service.beta.kubernetes.io/aws-load-balancer-ssl-cert: arn:aws:acm:us-east-2:187286695231:certificate/ddd727c2-f2c3-4e44-b0c3-fe0651ea5f7b
service.beta.kubernetes.io/aws-load-balancer-ssl-ports: '443'
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: arn:aws:acm:us-east-2:187286695231:certificate/ddd727c2-f2c3-4e44-b0c3-fe0651ea5f7b
labels:
helm.sh/chart: ingress-nginx-4.0.15
app.kubernetes.io/name: ingress-nginx
Expand All @@ -292,10 +295,10 @@ spec:
- name: https
port: 443
protocol: TCP
targetPort: https
# targetPort: 80
appProtocol: https
# appProtocol: http
targetPort: special
# targetPort: https
# appProtocol: https

selector:
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/instance: ingress-nginx
Expand Down Expand Up @@ -395,6 +398,9 @@ spec:
- name: https
containerPort: 443
protocol: TCP
- name: special
containerPort: 8000
protocol: TCP
- name: webhook
containerPort: 8443
protocol: TCP
Expand Down
4 changes: 4 additions & 0 deletions k8s-config/ingress/vue-service-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ metadata:
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/server-snippet: |
if ( $server_port = 80 ) {
return 308 https://$host$request_uri;
}
# nginx.ingress.kubernetes.io/from-to-www-redirect: "true"
# nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
spec:
Expand Down

0 comments on commit e9489b5

Please sign in to comment.