Skip to content

Commit

Permalink
Update helm chart
Browse files Browse the repository at this point in the history
  • Loading branch information
lots0logs committed Jun 10, 2020
1 parent eab7000 commit 4a61d2c
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 38 deletions.
2 changes: 1 addition & 1 deletion charts/cloud-server/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ maintainers:
- email: dustin@elegantthemes.com
name: Elegant Themes
name: cloud-server
version: 0.2.8
version: 0.2.9
92 changes: 55 additions & 37 deletions charts/cloud-server/templates/ingress.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,65 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: ingress-fcgi-params
namespace: cloud-server
name: ingress-fcgi-params
namespace: cloud-server
data:
SCRIPT_FILENAME: /srv/wordpress/$fastcgi_script_name
REDIRECT_STATUS: "200"
SCRIPT_FILENAME: /srv/wordpress$fastcgi_script_name
QUERY_STRING: $query_string
REQUEST_METHOD: $request_method
CONTENT_TYPE: $content_type
CONTENT_LENGTH: $content_length
SCRIPT_NAME: $fastcgi_script_name
REQUEST_URI: $request_uri
DOCUMENT_URI: $document_uri
DOCUMENT_ROOT: /srv/wordpress
SERVER_PROTOCOL: $server_protocol
REQUEST_SCHEME: $scheme
HTTPS: $https if_not_empty
GATEWAY_INTERFACE: CGI/1.1
SERVER_SOFTWARE: nginx/$nginx_version
REMOTE_ADDR: $remote_addr
REMOTE_PORT: $remote_port
SERVER_ADDR: $server_addr
SERVER_PORT: $server_port
SERVER_NAME: $server_name
REDIRECT_STATUS: "200"
---

apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: cloud-server
namespace: cloud-server
annotations:
cert-manager.io/cluster-issuer: letsencrypt
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/backend-protocol: FCGI
nginx.ingress.kubernetes.io/enable-cors: "true"
nginx.ingress.kubernetes.io/fastcgi-index: index.php
nginx.ingress.kubernetes.io/fastcgi-params-configmap: cloud-server/ingress-fcgi-params
nginx.ingress.kubernetes.io/limit-connections: "10"
nginx.ingress.kubernetes.io/limit-rps: "10"
nginx.ingress.kubernetes.io/rewrite-target: /$2
nginx.ingress.kubernetes.io/use-regex: "true"
name: cloud-server
namespace: cloud-server
annotations:
cert-manager.io/cluster-issuer: letsencrypt
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/backend-protocol: FCGI
nginx.ingress.kubernetes.io/enable-cors: "true"
nginx.ingress.kubernetes.io/fastcgi-index: index.php
nginx.ingress.kubernetes.io/fastcgi-params-configmap: cloud-server/ingress-fcgi-params
nginx.ingress.kubernetes.io/limit-connections: "10"
nginx.ingress.kubernetes.io/limit-rps: "10"
nginx.ingress.kubernetes.io/rewrite-target: /$2
nginx.ingress.kubernetes.io/use-regex: "true"
spec:
tls:
- hosts:
- {{ .Values.VIRTUAL_HOST }}
secretName: cloud-server-tls
rules:
- host: {{ .Values.VIRTUAL_HOST }}
http:
paths:
- path: /api(/[^/]+)?(/wp-.*)
backend:
serviceName: cloud-server
servicePort: fastcgi
- path: /api(/[^/]+)?(/.*\.php)
backend:
serviceName: cloud-server
servicePort: fastcgi
- path: /api(/|$)(.*)
backend:
serviceName: cloud-server
servicePort: fastcgi
tls:
- hosts:
- {{ .Values.VIRTUAL_HOST }}
secretName: cloud-server-tls
rules:
- host: {{ .Values.VIRTUAL_HOST }}
http:
paths:
- path: /api(/[^/]+)?(/wp-.*)
backend:
serviceName: cloud-server
servicePort: fastcgi
- path: /api(/[^/]+)?(/.*\.php)
backend:
serviceName: cloud-server
servicePort: fastcgi
- path: /api(/|$)(.*)
backend:
serviceName: cloud-server
servicePort: fastcgi

0 comments on commit 4a61d2c

Please sign in to comment.