Merge pull request #7 from small-hack/proxied
Add embeded reverse proxy
This commit is contained in:
commit
babf8fabec
7 changed files with 104 additions and 3 deletions
|
@ -18,7 +18,7 @@ type: application
|
|||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 1.9.1
|
||||
version: 1.10.0
|
||||
|
||||
# renovate: image=docker.io/ghost
|
||||
appVersion: "6.0.10"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# ghost
|
||||
|
||||
  
|
||||
  
|
||||
|
||||
A Helm chart for deploying Ghost on Kubernetes
|
||||
|
||||
|
@ -110,6 +110,8 @@ A Helm chart for deploying Ghost on Kubernetes
|
|||
| podAnnotations | object | `{}` | This is for setting Kubernetes Annotations to a Pod. For more info checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ |
|
||||
| podLabels | object | `{}` | This is for setting Kubernetes Labels to a Pod. For more info checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ |
|
||||
| podSecurityContext | object | `{}` | Configure Pods Security Context ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod |
|
||||
| proxy | object | `{"enabled":true}` | Options for embedded nginx reverse-proxy |
|
||||
| proxy.enabled | bool | `true` | enable/disable the embedded proxy |
|
||||
| readinessProbe.httpGet.path | string | `"/"` | |
|
||||
| readinessProbe.httpGet.port | string | `"http"` | |
|
||||
| replicaCount | int | `1` | This will set the replicaset count more information can be found here: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/ |
|
||||
|
@ -127,4 +129,4 @@ A Helm chart for deploying Ghost on Kubernetes
|
|||
| volumes | list | `[]` | Additional volumes on the output Deployment definition. |
|
||||
|
||||
----------------------------------------------
|
||||
Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)
|
||||
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
|
||||
|
|
15
charts/ghost/files/nginx.conf
Normal file
15
charts/ghost/files/nginx.conf
Normal file
|
@ -0,0 +1,15 @@
|
|||
user nginx;
|
||||
worker_processes 1;
|
||||
events {
|
||||
worker_connections 10240;
|
||||
}
|
||||
http {
|
||||
server {
|
||||
listen 80;
|
||||
server_name 0.0.0.0;
|
||||
location / {
|
||||
root /usr/share/nginx/html; #Change this line
|
||||
index index.html index.htm;
|
||||
}
|
||||
}
|
||||
}
|
11
charts/ghost/templates/nginx-config.yaml
Normal file
11
charts/ghost/templates/nginx-config.yaml
Normal file
|
@ -0,0 +1,11 @@
|
|||
{{- if eq .Values.proxy.enabled true }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: nginx-conf
|
||||
data:
|
||||
nginx.conf: |
|
||||
{{- .Files.Get "files/nginx.conf" | nindent 4 }}
|
||||
{{- end }}
|
||||
|
50
charts/ghost/templates/proxy-deployment.yaml
Normal file
50
charts/ghost/templates/proxy-deployment.yaml
Normal file
|
@ -0,0 +1,50 @@
|
|||
{{- if .Values.proxy.enabled }}
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: ghost-nginx-proxy
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "ghost.selectorLabels" . | nindent 4 }}
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: ghost
|
||||
{{- include "ghost.labels" . | nindent 4 }}
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx
|
||||
image: nginx
|
||||
ports:
|
||||
- name: nginx
|
||||
containerPort: 80
|
||||
volumeMounts:
|
||||
- name: nginx-conf
|
||||
mountPath: /etc/nginx/nginx.conf
|
||||
subPath: nginx.conf
|
||||
readOnly: true
|
||||
resources:
|
||||
requests:
|
||||
memory: 100Mi
|
||||
cpu: 100m
|
||||
limits:
|
||||
memory: 256Mi
|
||||
cpu: 1000m
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 80
|
||||
httpHeaders: []
|
||||
initialDelaySeconds: 3
|
||||
periodSeconds: 3
|
||||
volumes:
|
||||
- name: nginx-conf
|
||||
configMap:
|
||||
name: nginx-conf
|
||||
items:
|
||||
- key: nginx.conf
|
||||
path: nginx.conf
|
||||
{{- end }}
|
18
charts/ghost/templates/proxy-service.yaml
Normal file
18
charts/ghost/templates/proxy-service.yaml
Normal file
|
@ -0,0 +1,18 @@
|
|||
{{- if .Values.proxy.enabled }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "ghost.fullname" . }}-proxy
|
||||
labels:
|
||||
app.kubernetes.io/component: ghost
|
||||
{{- include "ghost.labels" . | nindent 4 }}
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- name: nginx
|
||||
port: 80
|
||||
targetPort: 80
|
||||
protocol: TCP
|
||||
selector:
|
||||
{{- include "ghost.selectorLabels" . | nindent 4 }}
|
||||
{{- end }}
|
|
@ -353,3 +353,8 @@ activity_pub:
|
|||
# readOnlyRootFilesystem: true
|
||||
# runAsNonRoot: true
|
||||
# runAsUser: 1000
|
||||
|
||||
# -- Options for embedded nginx reverse-proxy
|
||||
proxy:
|
||||
# -- enable/disable the embedded proxy
|
||||
enabled: true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue