diff --git a/charts/strapi/Chart.yaml b/charts/strapi/Chart.yaml index e74e40f..284d997 100644 --- a/charts/strapi/Chart.yaml +++ b/charts/strapi/Chart.yaml @@ -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. diff --git a/charts/strapi/README.md b/charts/strapi/README.md index 85cd11b..bf28464 100644 --- a/charts/strapi/README.md +++ b/charts/strapi/README.md @@ -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 @@ -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` | | diff --git a/charts/strapi/templates/deployment.yaml b/charts/strapi/templates/deployment.yaml index 58b40b6..eb2d2a0 100644 --- a/charts/strapi/templates/deployment.yaml +++ b/charts/strapi/templates/deployment.yaml @@ -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 }} @@ -52,7 +54,7 @@ spec: valueFrom: configMapKeyRef: name: strapi-db-config - key: database.name + key: database.db_name - name: PGHOST valueFrom: configMapKeyRef: @@ -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 }} @@ -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 @@ -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: @@ -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 }} diff --git a/charts/strapi/values.yaml b/charts/strapi/values.yaml index 0f44b9a..fa85dc9 100644 --- a/charts/strapi/values.yaml +++ b/charts/strapi/values.yaml @@ -74,7 +74,7 @@ resources: cpu: 100m memory: 256Mi autoscaling: - enabled: true + enabled: false minReplicas: 1 maxReplicas: 4 targetCPUUtilizationPercentage: 80