diff --git a/charts/cloud-server/Chart.yaml b/charts/cloud-server/Chart.yaml index 27e20df..d63c823 100644 --- a/charts/cloud-server/Chart.yaml +++ b/charts/cloud-server/Chart.yaml @@ -6,4 +6,4 @@ maintainers: - email: dustin@elegantthemes.com name: Elegant Themes name: cloud-server -version: 0.2.8 +version: 0.2.9 diff --git a/charts/cloud-server/templates/ingress.yml b/charts/cloud-server/templates/ingress.yml index 1d5058b..093f212 100644 --- a/charts/cloud-server/templates/ingress.yml +++ b/charts/cloud-server/templates/ingress.yml @@ -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