Skip to content
Open
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
5 changes: 5 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
2. Run `composer update shopsys/deployment`
3. Check files in mentioned pull requests and if you have any of them extended in your project, apply changes manually

## Upgrade from v5.3.0 to v5.4.0

- added Gotenberg service for gift voucher PDF rendering ([#83](https://github.com/shopsys/deployment/pull/83))
- if you override the `continuous-deploy`, `first-deploy` or `first-deploy-with-demo-data` kustomizations in your project, add the `gotenberg` deployment and service references to them manually

## Upgrade from v5.2.0 to v5.3.0

- set `MCP_IP_WHITELIST` to a comma-separated list of VPN egress IP addresses or CIDR ranges to restrict access to the MCP ingress; an empty value preserves the current publicly reachable MCP ingress
Expand Down
8 changes: 7 additions & 1 deletion deploy/parts/kubernetes-variables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,18 @@ assertVariable "CONFIGURATION_TARGET_PATH"
assertVariable "S3_ENDPOINT"
assertVariable "PROJECT_NAME"

if [ -z ${REDIS_VERSION} ]; then
if [ -z "${REDIS_VERSION}" ]; then
REDIS_VERSION='redis:7.4-alpine'
fi

VARS+=(REDIS_VERSION)

if [ -z "${GOTENBERG_VERSION}" ]; then
GOTENBERG_VERSION='gotenberg/gotenberg:8'
fi

VARS+=(GOTENBERG_VERSION)

if [ -z ${ADMIN_URL} ]; then
ADMIN_URL='admin'
fi
Expand Down
44 changes: 44 additions & 0 deletions kubernetes/deployments/gotenberg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: gotenberg
spec:
replicas: 1
selector:
matchLabels:
app: gotenberg
template:
metadata:
annotations:
logging/enabled: "false"
project/app: "gotenberg"
project/environment: "{{PROJECT_ENVIRONMENT}}"
project/name: "{{NAME_OF_PROJECT}}"
labels:
app: gotenberg
spec:
containers:
- name: gotenberg
image: "{{GOTENBERG_VERSION}}"
ports:
- name: http
containerPort: 3000
protocol: TCP
livenessProbe:
initialDelaySeconds: 10
timeoutSeconds: 5
httpGet:
path: /health
port: 3000
readinessProbe:
initialDelaySeconds: 5
timeoutSeconds: 5
httpGet:
path: /health
port: 3000
resources:
limits:
memory: "1Gi"
requests:
cpu: "50m"
memory: "512Mi"
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ resources:
- ../../../configmap/redis-health.yaml
- ../../../deployments/rabbitmq.yaml
- ../../../services/rabbitmq.yaml
- ../../../deployments/gotenberg.yaml
- ../../../services/gotenberg.yaml
- ./migrate-application.yaml
namespace: "{{PROJECT_NAME}}"
configMapGenerator:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ resources:
- ../../../configmap/redis-health.yaml
- ../../../deployments/rabbitmq.yaml
- ../../../services/rabbitmq.yaml
- ../../../deployments/gotenberg.yaml
- ../../../services/gotenberg.yaml
- ./migrate-application.yaml
namespace: "{{PROJECT_NAME}}"
configMapGenerator:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ resources:
- ../../../configmap/redis-health.yaml
- ../../../deployments/rabbitmq.yaml
- ../../../services/rabbitmq.yaml
- ../../../deployments/gotenberg.yaml
- ../../../services/gotenberg.yaml
- ./migrate-application.yaml
namespace: "{{PROJECT_NAME}}"
configMapGenerator:
Expand Down
13 changes: 13 additions & 0 deletions kubernetes/services/gotenberg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: gotenberg
labels:
app: gotenberg
spec:
selector:
app: gotenberg
ports:
- name: http
port: 3000
targetPort: 3000
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,21 @@ metadata:
---
apiVersion: v1
kind: Service
metadata:
labels:
app: gotenberg
name: gotenberg
namespace: myproject-production
spec:
ports:
- name: http
port: 3000
targetPort: 3000
selector:
app: gotenberg
---
apiVersion: v1
kind: Service
metadata:
labels:
app: rabbitmq
Expand Down Expand Up @@ -217,6 +232,52 @@ spec:
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: gotenberg
namespace: myproject-production
spec:
replicas: 1
selector:
matchLabels:
app: gotenberg
template:
metadata:
annotations:
logging/enabled: "false"
project/app: gotenberg
project/environment: production
project/name: myproject
labels:
app: gotenberg
spec:
containers:
- image: gotenberg/gotenberg:8
livenessProbe:
httpGet:
path: /health
port: 3000
initialDelaySeconds: 10
timeoutSeconds: 5
name: gotenberg
ports:
- containerPort: 3000
name: http
protocol: TCP
readinessProbe:
httpGet:
path: /health
port: 3000
initialDelaySeconds: 5
timeoutSeconds: 5
resources:
limits:
memory: 1Gi
requests:
cpu: 50m
memory: 512Mi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: redis
namespace: myproject-production
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,21 @@ metadata:
---
apiVersion: v1
kind: Service
metadata:
labels:
app: gotenberg
name: gotenberg
namespace: myproject-production
spec:
ports:
- name: http
port: 3000
targetPort: 3000
selector:
app: gotenberg
---
apiVersion: v1
kind: Service
metadata:
labels:
app: rabbitmq
Expand Down Expand Up @@ -217,6 +232,52 @@ spec:
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: gotenberg
namespace: myproject-production
spec:
replicas: 1
selector:
matchLabels:
app: gotenberg
template:
metadata:
annotations:
logging/enabled: "false"
project/app: gotenberg
project/environment: production
project/name: myproject
labels:
app: gotenberg
spec:
containers:
- image: gotenberg/gotenberg:8
livenessProbe:
httpGet:
path: /health
port: 3000
initialDelaySeconds: 10
timeoutSeconds: 5
name: gotenberg
ports:
- containerPort: 3000
name: http
protocol: TCP
readinessProbe:
httpGet:
path: /health
port: 3000
initialDelaySeconds: 5
timeoutSeconds: 5
resources:
limits:
memory: 1Gi
requests:
cpu: 50m
memory: 512Mi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: redis
namespace: myproject-production
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,21 @@ metadata:
---
apiVersion: v1
kind: Service
metadata:
labels:
app: gotenberg
name: gotenberg
namespace: myproject-production
spec:
ports:
- name: http
port: 3000
targetPort: 3000
selector:
app: gotenberg
---
apiVersion: v1
kind: Service
metadata:
labels:
app: rabbitmq
Expand Down Expand Up @@ -217,6 +232,52 @@ spec:
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: gotenberg
namespace: myproject-production
spec:
replicas: 1
selector:
matchLabels:
app: gotenberg
template:
metadata:
annotations:
logging/enabled: "false"
project/app: gotenberg
project/environment: production
project/name: myproject
labels:
app: gotenberg
spec:
containers:
- image: gotenberg/gotenberg:8
livenessProbe:
httpGet:
path: /health
port: 3000
initialDelaySeconds: 10
timeoutSeconds: 5
name: gotenberg
ports:
- containerPort: 3000
name: http
protocol: TCP
readinessProbe:
httpGet:
path: /health
port: 3000
initialDelaySeconds: 5
timeoutSeconds: 5
resources:
limits:
memory: 1Gi
requests:
cpu: 50m
memory: 512Mi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: redis
namespace: myproject-production
Expand Down
Loading
Loading