> Pull Request Template > > Use this template to quickly create a well written pull request. Delete all quotes before creating the pull request. > ## Description Reverting coz I squash merged the promotional pr. > > Please include a summary of the changes and which issue has been fixed. Please also include relevant motivation > and context. List any dependencies that are required for this change > > Links to Notion, Figma or any other documents that might be relevant to the PR > > #### PR fixes following issue(s) Fixes # (issue number) > if no issue exists, please create an issue and ask the maintainers about this first > > #### Media > A video or a GIF is preferred. when using Loom, don’t embed because it looks like it’s a GIF. instead, just link to the video > > #### Type of change > Please delete options that are not relevant. - Bug fix (non-breaking change which fixes an issue) - New feature (non-breaking change which adds functionality) - Breaking change (fix or feature that would cause existing functionality to not work as expected) - Chore (housekeeping or task changes that don't impact user perception) - This change requires a documentation update > > > ## Testing > #### How Has This Been Tested? > Please describe the tests that you ran to verify your changes. Also list any relevant details for your test configuration. > Delete anything that is not relevant - [ ] Manual - [ ] JUnit - [ ] Jest - [ ] Cypress > > #### Test Plan > Add Testsmith test cases links that relate to this PR > > #### Issues raised during DP testing > Link issues raised during DP testing for better visiblity and tracking (copy link from comments dropped on this PR) > > > ## Checklist: #### Dev activity - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] PR is being merged under a feature flag #### QA activity: - [ ] [Speedbreak features](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#speedbreakers-) have been covered - [ ] Test plan covers all impacted features and [areas of interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#areas-of-interest-) - [ ] Test plan has been peer reviewed by project stakeholders and other QA members - [ ] Manually tested functionality on DP - [ ] We had an implementation alignment call with stakeholders post QA Round 2 - [ ] Cypress test cases have been added and approved by SDET/manual QA - [ ] Added `Test Plan Approved` label after Cypress tests were reviewed - [ ] Added `Test Plan Approved` label after JUnit tests were reviewed
143 lines
5.3 KiB
YAML
143 lines
5.3 KiB
YAML
apiVersion: apps/v1
|
|
kind: StatefulSet
|
|
metadata:
|
|
name: {{ include "appsmith.fullname" . }}
|
|
namespace: {{ include "appsmith.namespace" . }}
|
|
labels:
|
|
{{- include "appsmith.labels" . | nindent 4 }}
|
|
spec:
|
|
replicas: 1
|
|
serviceName: {{ include "appsmith.fullname" . }}
|
|
updateStrategy:
|
|
type: {{ .Values.strategyType }}
|
|
selector:
|
|
matchLabels:
|
|
{{- include "appsmith.selectorLabels" . | nindent 6 }}
|
|
template:
|
|
metadata:
|
|
{{- with .Values.podAnnotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
labels:
|
|
{{- include "appsmith.selectorLabels" . | nindent 8 }}
|
|
{{- if .Values.podLabels }}
|
|
{{- toYaml .Values.podLabels | nindent 8 }}
|
|
{{- end }}
|
|
spec:
|
|
{{- if .Values.schedulerName }}
|
|
schedulerName: {{ .Values.schedulerName | quote }}
|
|
{{- end }}
|
|
serviceAccountName: {{ template "appsmith.serviceAccountName" . }}
|
|
securityContext:
|
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
|
{{- with .Values.nodeSelector }}
|
|
nodeSelector:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.affinity }}
|
|
affinity:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.tolerations }}
|
|
tolerations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
initContainers:
|
|
{{- if .Values.redis.enabled }}
|
|
- name: redis-init-container
|
|
{{- if ((.Values.initContainer.redis).image) }}
|
|
image: {{ .Values.initContainer.redis.image }}
|
|
{{- else }}
|
|
image: "docker.io/bitnami/redis:7.0.13-debian-11-r10"
|
|
{{- end }}
|
|
command: ['sh', '-c', "until redis-cli -h {{.Release.Name}}-redis-master.{{.Release.Namespace}}.svc.cluster.local ping ; do echo waiting for redis; sleep 2; done"]
|
|
{{- end }}
|
|
{{- if .Values.mongodb.enabled }}
|
|
- name: mongo-init-container
|
|
{{- if ((.Values.initContainer.mongodb).image) }}
|
|
image: {{ .Values.initContainer.mongodb.image }}
|
|
{{- else }}
|
|
image: "docker.io/bitnami/mongodb:5.0.21-debian-11-r5"
|
|
{{- end }}
|
|
command: ['sh', '-c', "until mongo --host appsmith-mongodb.{{.Release.Namespace}}.svc.cluster.local --eval 'db.runCommand({ping:1})' ; do echo waiting for mongo; sleep 2; done"]
|
|
{{- end }}
|
|
containers:
|
|
- name: {{ .Values.containerName }}
|
|
securityContext:
|
|
{{- toYaml .Values.securityContext | nindent 12 }}
|
|
image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
ports:
|
|
- name: http
|
|
containerPort: 80
|
|
protocol: TCP
|
|
- name: https
|
|
containerPort: 443
|
|
protocol: TCP
|
|
- name: supervisord
|
|
containerPort: 9001
|
|
protocol: TCP
|
|
{{- $probes := .Values.probes | default dict }}
|
|
startupProbe:
|
|
# The `livenessProbe` and `readinessProbe` will be disabled until the `startupProbe` is successful.
|
|
httpGet:
|
|
port: http
|
|
path: {{ dig "startupProbe" "api" "/api/v1/health" $probes }}
|
|
failureThreshold: {{ dig "startupProbe" "failureThreshold" 3 $probes }}
|
|
periodSeconds: {{ dig "startupProbe" "periodSeconds" 60 $probes }}
|
|
livenessProbe:
|
|
httpGet:
|
|
port: http
|
|
path: {{ dig "livenessProbe" "api" "/api/v1/health" $probes }}
|
|
failureThreshold: {{ dig "livenessProbe" "failureThreshold" 3 $probes }}
|
|
periodSeconds: {{ dig "livenessProbe" "periodSeconds" 60 $probes }}
|
|
readinessProbe:
|
|
httpGet:
|
|
port: http
|
|
path: {{ dig "readinessProbe" "api" "/api/v1/health" $probes }}
|
|
failureThreshold: {{ dig "readinessProbe" "failureThreshold" 3 $probes }}
|
|
periodSeconds: {{ dig "readinessProbe" "periodSeconds" 60 $probes }}
|
|
resources:
|
|
{{- toYaml .Values.resources | nindent 12 }}
|
|
volumeMounts:
|
|
- name: data
|
|
mountPath: /appsmith-stacks
|
|
env:
|
|
- name: APPSMITH_ENABLE_EMBEDDED_DB
|
|
value: "0"
|
|
envFrom:
|
|
- configMapRef:
|
|
name: {{ include "appsmith.fullname" . }}
|
|
{{- if .Values.secretName }}
|
|
- secretRef:
|
|
name: {{ .Values.secretName }}
|
|
{{- end }}
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
{{- if .Values.image.pullSecrets}}
|
|
imagePullSecrets:
|
|
- name: {{ .Values.image.pullSecrets }}
|
|
{{- end }}
|
|
volumes:
|
|
{{- if not .Values.persistence.enabled }}
|
|
- name: data
|
|
emptyDir: {}
|
|
{{- else }}
|
|
volumeClaimTemplates:
|
|
- metadata:
|
|
name: data
|
|
{{- if .Values.persistence.annotations }}
|
|
annotations: {{- include "tplvalues.render" (dict "value" .Values.persistence.annotations "context" $) | nindent 10 }}
|
|
{{- end }}
|
|
spec:
|
|
accessModes:
|
|
{{- range .Values.persistence.accessModes }}
|
|
- {{ . | quote }}
|
|
{{- end }}
|
|
resources:
|
|
requests:
|
|
storage: {{ .Values.persistence.size | quote }}
|
|
{{ include "storage.class" (dict "persistence" .Values.persistence "global" .Values.global) }}
|
|
{{- end }}
|