Skip to content

Commit

Permalink
Merge pull request #43 from protofy/fix/various_deploy_fixes
Browse files Browse the repository at this point in the history
Fix/various deploy fixes
  • Loading branch information
eviscares authored Apr 19, 2024
2 parents d0be366 + 8a53af1 commit 59acc10
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 29 deletions.
2 changes: 1 addition & 1 deletion charts/strapi/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,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: 0.1.2
version: 0.2.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
Expand Down
4 changes: 2 additions & 2 deletions charts/strapi/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# strapi

![Version: 0.1.2](https://img.shields.io/badge/Version-0.1.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.0](https://img.shields.io/badge/AppVersion-0.1.0-informational?style=flat-square)
![Version: 0.2.0](https://img.shields.io/badge/Version-0.2.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.0](https://img.shields.io/badge/AppVersion-0.1.0-informational?style=flat-square)

A Helm chart for Kubernetes

Expand All @@ -9,7 +9,7 @@ A Helm chart for Kubernetes
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | |
| autoscaling.enabled | bool | `true` | |
| autoscaling.enabled | bool | `false` | |
| autoscaling.maxReplicas | int | `4` | |
| autoscaling.minReplicas | int | `1` | |
| autoscaling.targetCPUUtilizationPercentage | int | `80` | |
Expand Down
62 changes: 37 additions & 25 deletions charts/strapi/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@ spec:
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
volumes:
{{- if .Values.persistence.enabled }}
- name: strapi-data
persistentVolumeClaim:
claimName: {{ .Values.persistence.existingClaim | default (include "strapi.fullname" .) }}
containers:
{{- end }}
initContainers:
- name: "{{ .Chart.Name }}-db-init"
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
Expand All @@ -52,7 +54,7 @@ spec:
valueFrom:
configMapKeyRef:
name: strapi-db-config
key: database.name
key: database.db_name
- name: PGHOST
valueFrom:
configMapKeyRef:
Expand All @@ -77,8 +79,8 @@ spec:
valueFrom:
configMapKeyRef:
name: strapi-db-config
key: database.schema
command: ["psql", "-f", "setup_script.sql"]
key: database.schema_name
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
Expand All @@ -88,13 +90,18 @@ spec:
- name: HOST
value: {{ .Values.strapi.host }}
- name: PORT
value: {{ .Values.service.port }}
value: "{{ .Values.service.port }}"
- name: DATABASE_CLIENT
valueFrom:
configMapKeyRef:
name: strapi-db-config
key: database.client
- name: DATABASE_NAME
valueFrom:
configMapKeyRef:
name: strapi-db-config
key: database.db_name
- name: DATABASE_SCHEMA
valueFrom:
configMapKeyRef:
name: strapi-db-config
Expand All @@ -119,48 +126,53 @@ spec:
secretKeyRef:
name: strapi-secrets
key: database.password
- name: INIT_ADMIN_ENABLED
valueFrom:
configMapKeyRef:
name: strapi-db-config
key: init_admin.enabled
- name: INIT_ADMIN_USERNAME
valueFrom:
secretKeyRef:
name: strapi-secrets
key: init.admin.username
configMapKeyRef:
name: strapi-db-config
key: init_admin.username
- name: INIT_ADMIN_PASSWORD
valueFrom:
secretKeyRef:
name: strapi-secrets
key: init.admin.password
key: init_admin.password
- name: INIT_ADMIN_FIRSTNAME
valueFrom:
secretKeyRef:
name: strapi-secrets
key: init.admin.firstname
configMapKeyRef:
name: strapi-db-config
key: init_admin.firstname
- name: INIT_ADMIN_EMAIL
valueFrom:
secretKeyRef:
name: strapi-secrets
key: init.admin.email
configMapKeyRef:
name: strapi-db-config
key: init_admin.email
- name: S3_ENABLED
value: {{ .Values.s3.enabled }}
value: "{{ .Values.s3.enabled }}"
- name: S3_ENDPOINT
valueFrom:
configMapKeyRef:
name: strapi-s3-config
name: strapi-db-config
key: s3.endpoint
- name: S3_BUCKET
valueFrom:
configMapKeyRef:
name: strapi-s3-config
name: strapi-db-config
key: s3.bucket
- name: S3_ACCESS_KEY
valueFrom:
secretKeyRef:
name: strapi-secrets
key: s3.access.key
key: s3.access_key
- name: S3_SECRET_KEY
valueFrom:
secretKeyRef:
name: strapi-secrets
key: s3.secret.key
key: s3.secret_key
- name: APP_KEYS
valueFrom:
secretKeyRef:
Expand Down Expand Up @@ -208,11 +220,11 @@ spec:
httpGet:
path: /
port: http
initial_delay_seconds: 10
period_seconds: 5
timeout_seconds: 5
success_threshold: 1
failure_threshold: 10
initialDelaySeconds: 10
periodSeconds: 5
timeoutSeconds: 5
successThreshold: 1
failureThreshold: 10
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
Expand Down
2 changes: 1 addition & 1 deletion charts/strapi/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ resources:
cpu: 100m
memory: 256Mi
autoscaling:
enabled: true
enabled: false
minReplicas: 1
maxReplicas: 4
targetCPUUtilizationPercentage: 80
Expand Down

0 comments on commit 59acc10

Please sign in to comment.