185 lines
5.5 KiB
YAML
185 lines
5.5 KiB
YAML
apiVersion: apps/v1
|
|
kind: StatefulSet
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/component: mongodb
|
|
app.kubernetes.io/instance: release-name
|
|
app.kubernetes.io/managed-by: Helm
|
|
app.kubernetes.io/name: mongodb
|
|
helm.sh/chart: mongodb-12.1.16
|
|
name: appsmith-mongodb
|
|
namespace: appsmith
|
|
spec:
|
|
persistentVolumeClaimRetentionPolicy:
|
|
whenDeleted: Retain
|
|
whenScaled: Retain
|
|
podManagementPolicy: OrderedReady
|
|
replicas: 2
|
|
revisionHistoryLimit: 10
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/component: mongodb
|
|
app.kubernetes.io/instance: release-name
|
|
app.kubernetes.io/name: mongodb
|
|
serviceName: appsmith-mongodb
|
|
template:
|
|
metadata:
|
|
creationTimestamp: null
|
|
labels:
|
|
app.kubernetes.io/component: mongodb
|
|
app.kubernetes.io/instance: release-name
|
|
app.kubernetes.io/managed-by: Helm
|
|
app.kubernetes.io/name: mongodb
|
|
helm.sh/chart: mongodb-12.1.16
|
|
spec:
|
|
affinity:
|
|
nodeAffinity:
|
|
requiredDuringSchedulingIgnoredDuringExecution:
|
|
nodeSelectorTerms:
|
|
- matchExpressions:
|
|
- key: feature.node.kubernetes.io/cpu-cpuid.AVX
|
|
operator: In
|
|
values:
|
|
- "true"
|
|
podAntiAffinity:
|
|
preferredDuringSchedulingIgnoredDuringExecution:
|
|
- podAffinityTerm:
|
|
labelSelector:
|
|
matchLabels:
|
|
app.kubernetes.io/component: mongodb
|
|
app.kubernetes.io/instance: release-name
|
|
app.kubernetes.io/name: mongodb
|
|
namespaces:
|
|
- appsmith
|
|
topologyKey: kubernetes.io/hostname
|
|
weight: 1
|
|
containers:
|
|
- command:
|
|
- /scripts/setup.sh
|
|
env:
|
|
- name: BITNAMI_DEBUG
|
|
value: "false"
|
|
- name: MY_POD_NAME
|
|
valueFrom:
|
|
fieldRef:
|
|
apiVersion: v1
|
|
fieldPath: metadata.name
|
|
- name: MY_POD_NAMESPACE
|
|
valueFrom:
|
|
fieldRef:
|
|
apiVersion: v1
|
|
fieldPath: metadata.namespace
|
|
- name: MY_POD_HOST_IP
|
|
valueFrom:
|
|
fieldRef:
|
|
apiVersion: v1
|
|
fieldPath: status.hostIP
|
|
- name: K8S_SERVICE_NAME
|
|
value: appsmith-mongodb
|
|
- name: MONGODB_INITIAL_PRIMARY_HOST
|
|
value: appsmith-mongodb-0.$(K8S_SERVICE_NAME).$(MY_POD_NAMESPACE).svc.cluster.local
|
|
- name: MONGODB_REPLICA_SET_NAME
|
|
value: rs0
|
|
- name: MONGODB_ADVERTISED_HOSTNAME
|
|
value: $(MY_POD_NAME).$(K8S_SERVICE_NAME).$(MY_POD_NAMESPACE).svc.cluster.local
|
|
- name: MONGODB_ROOT_USER
|
|
value: root
|
|
- name: MONGODB_ROOT_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
key: mongodb-root-password
|
|
name: appsmith-mongodb
|
|
- name: MONGODB_REPLICA_SET_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
key: mongodb-replica-set-key
|
|
name: appsmith-mongodb
|
|
- name: ALLOW_EMPTY_PASSWORD
|
|
value: "no"
|
|
- name: MONGODB_SYSTEM_LOG_VERBOSITY
|
|
value: "0"
|
|
- name: MONGODB_DISABLE_SYSTEM_LOG
|
|
value: "no"
|
|
- name: MONGODB_DISABLE_JAVASCRIPT
|
|
value: "no"
|
|
- name: MONGODB_ENABLE_JOURNAL
|
|
value: "yes"
|
|
- name: MONGODB_PORT_NUMBER
|
|
value: "27017"
|
|
- name: MONGODB_ENABLE_IPV6
|
|
value: "no"
|
|
- name: MONGODB_ENABLE_DIRECTORY_PER_DB
|
|
value: "no"
|
|
image: docker.io/bitnamilegacy/mongodb:6.0.13
|
|
imagePullPolicy: IfNotPresent
|
|
livenessProbe:
|
|
exec:
|
|
command:
|
|
- /bitnami/scripts/ping-mongodb.sh
|
|
failureThreshold: 6
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 20
|
|
successThreshold: 1
|
|
timeoutSeconds: 10
|
|
name: mongodb
|
|
ports:
|
|
- containerPort: 27017
|
|
name: mongodb
|
|
protocol: TCP
|
|
readinessProbe:
|
|
exec:
|
|
command:
|
|
- /bitnami/scripts/readiness-probe.sh
|
|
failureThreshold: 6
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|
|
successThreshold: 1
|
|
timeoutSeconds: 5
|
|
securityContext:
|
|
runAsNonRoot: true
|
|
runAsUser: 1001
|
|
terminationMessagePath: /dev/termination-log
|
|
terminationMessagePolicy: File
|
|
volumeMounts:
|
|
- mountPath: /bitnami/mongodb
|
|
name: datadir
|
|
- mountPath: /bitnami/scripts
|
|
name: common-scripts
|
|
- mountPath: /scripts/setup.sh
|
|
name: scripts
|
|
subPath: setup.sh
|
|
dnsPolicy: ClusterFirst
|
|
restartPolicy: Always
|
|
schedulerName: default-scheduler
|
|
securityContext:
|
|
fsGroup: 1001
|
|
serviceAccount: appsmith-mongodb
|
|
serviceAccountName: appsmith-mongodb
|
|
terminationGracePeriodSeconds: 30
|
|
volumes:
|
|
- configMap:
|
|
defaultMode: 360
|
|
name: appsmith-mongodb-common-scripts
|
|
name: common-scripts
|
|
- configMap:
|
|
defaultMode: 493
|
|
name: appsmith-mongodb-scripts
|
|
name: scripts
|
|
updateStrategy:
|
|
type: RollingUpdate
|
|
volumeClaimTemplates:
|
|
- apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
creationTimestamp: null
|
|
name: datadir
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
resources:
|
|
requests:
|
|
storage: 8Gi
|
|
storageClassName: longhorn-fast
|
|
volumeMode: Filesystem
|
|
status:
|
|
phase: Pending
|