mirror of
https://github.com/jlengrand/engine.git
synced 2026-03-10 08:11:21 +00:00
wip: support app storage
wip: support PostgreSQL with local storage
This commit is contained in:
541
lib/digitalocean/chart_values/mongodb/values.j2.yaml
Normal file
541
lib/digitalocean/chart_values/mongodb/values.j2.yaml
Normal file
@@ -0,0 +1,541 @@
|
||||
## Global Docker image parameters
|
||||
## Please, note that this will override the image parameters, including dependencies, configured to use the global value
|
||||
## Current available global Docker image parameters: imageRegistry and imagePullSecrets
|
||||
##
|
||||
# global:
|
||||
# imageRegistry: myRegistryName
|
||||
# imagePullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
# storageClass: myStorageClass
|
||||
## Override the namespace for resource deployed by the chart, but can itself be overridden by the local namespaceOverride
|
||||
# namespaceOverride: my-global-namespace
|
||||
|
||||
image:
|
||||
## Bitnami MongoDB registry
|
||||
##
|
||||
registry: quay.io
|
||||
## Bitnami MongoDB image name
|
||||
##
|
||||
repository: bitnami/mongodb
|
||||
## Bitnami MongoDB image tag
|
||||
## ref: https://hub.docker.com/r/bitnami/mongodb/tags/
|
||||
##
|
||||
tag: "{{ version }}"
|
||||
## Specify a imagePullPolicy
|
||||
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
##
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets.
|
||||
## Secrets must be manually created in the namespace.
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
|
||||
## Set to true if you would like to see extra information on logs
|
||||
## It turns on Bitnami debugging in minideb-extras-base
|
||||
## ref: https://github.com/bitnami/minideb-extras-base
|
||||
debug: true
|
||||
|
||||
## String to partially override mongodb.fullname template (will maintain the release name)
|
||||
##
|
||||
# nameOverride:
|
||||
nameOverride: {{ name }}
|
||||
|
||||
## String to fully override mongodb.fullname template
|
||||
##
|
||||
# fullnameOverride:
|
||||
fullnameOverride: {{ name }}
|
||||
|
||||
serviceAccount:
|
||||
# Specifies whether a ServiceAccount should be created
|
||||
create: true
|
||||
# The name of the ServiceAccount to use.
|
||||
# If not set and create is true, a name is generated using the fullname template
|
||||
name:
|
||||
|
||||
# Add custom extra environment variables to all the MongoDB containers
|
||||
# extraEnvVars:
|
||||
|
||||
## Init containers parameters:
|
||||
## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section.
|
||||
##
|
||||
volumePermissions:
|
||||
enabled: false
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/minideb
|
||||
tag: buster
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets.
|
||||
## Secrets must be manually created in the namespace.
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
resources:
|
||||
limits: {}
|
||||
requests:
|
||||
cpu: "{{ total_cpus }}"
|
||||
memory: "{{ total_ram_in_mib }}Mi"
|
||||
|
||||
## Enable authentication
|
||||
## ref: https://docs.mongodb.com/manual/tutorial/enable-authentication/
|
||||
#
|
||||
usePassword: true
|
||||
# existingSecret: name-of-existing-secret
|
||||
|
||||
## MongoDB admin password
|
||||
## ref: https://github.com/bitnami/bitnami-docker-mongodb/blob/master/README.md#setting-the-root-password-on-first-run
|
||||
##
|
||||
mongodbRootPassword: {{ database_password }}
|
||||
|
||||
## MongoDB custom user and database
|
||||
## ref: https://github.com/bitnami/bitnami-docker-mongodb/blob/master/README.md#creating-a-user-and-database-on-first-run
|
||||
##
|
||||
mongodbUsername: {{ database_login }}
|
||||
mongodbPassword: {{ database_password }}
|
||||
mongodbDatabase: {{ name }}
|
||||
|
||||
## Whether enable/disable IPv6 on MongoDB
|
||||
## ref: https://github.com/bitnami/bitnami-docker-mongodb/blob/master/README.md#enabling/disabling-ipv6
|
||||
##
|
||||
mongodbEnableIPv6: false
|
||||
|
||||
## Whether enable/disable DirectoryPerDB on MongoDB
|
||||
## ref: https://github.com/bitnami/bitnami-docker-mongodb/blob/master/README.md#enabling/disabling-directoryperdb
|
||||
##
|
||||
mongodbDirectoryPerDB: false
|
||||
|
||||
## MongoDB System Log configuration
|
||||
## ref: https://github.com/bitnami/bitnami-docker-mongodb#configuring-system-log-verbosity-level
|
||||
##
|
||||
mongodbSystemLogVerbosity: 0
|
||||
mongodbDisableSystemLog: false
|
||||
|
||||
## MongoDB additional command line flags
|
||||
##
|
||||
## Can be used to specify command line flags, for example:
|
||||
##
|
||||
## mongodbExtraFlags:
|
||||
## - "--wiredTigerCacheSizeGB=2"
|
||||
mongodbExtraFlags: []
|
||||
|
||||
## Pod Security Context
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
|
||||
##
|
||||
securityContext:
|
||||
enabled: true
|
||||
fsGroup: 1001
|
||||
runAsUser: 1001
|
||||
|
||||
## Kubernetes Cluster Domain
|
||||
clusterDomain: cluster.local
|
||||
|
||||
## Kubernetes service type
|
||||
service:
|
||||
## Specify an explicit service name.
|
||||
# name: svc-mongo
|
||||
## Provide any additional annotations which may be required.
|
||||
## The value is evaluated as a template, so, for example, the value can depend on .Release or .Chart
|
||||
annotations:
|
||||
service.beta.kubernetes.io/do-loadbalancer-protocol: "tcp"
|
||||
service.beta.kubernetes.io/do-loadbalancer-size-slug: "lb-small"
|
||||
external-dns.alpha.kubernetes.io/hostname: "{{ fqdn }}"
|
||||
external-dns.alpha.kubernetes.io/ttl: "300"
|
||||
|
||||
type: LoadBalancer
|
||||
# clusterIP: None
|
||||
port: {{ private_port }}
|
||||
|
||||
## Specify the nodePort value for the LoadBalancer and NodePort service types.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
|
||||
##
|
||||
# nodePort:
|
||||
## Specify the externalIP value ClusterIP service type.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#external-ips
|
||||
# externalIPs: []
|
||||
## Specify the loadBalancerIP value for LoadBalancer service types.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer
|
||||
##
|
||||
# loadBalancerIP:
|
||||
## Specify the loadBalancerSourceRanges value for LoadBalancer service types.
|
||||
## ref: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
|
||||
##
|
||||
# loadBalancerSourceRanges: []
|
||||
|
||||
## Use StatefulSet instead of Deployment when deploying standalone
|
||||
useStatefulSet: true
|
||||
|
||||
## Setting up replication
|
||||
## ref: https://github.com/bitnami/bitnami-docker-mongodb#setting-up-a-replication
|
||||
#
|
||||
replicaSet:
|
||||
## Whether to create a MongoDB replica set for high availability or not
|
||||
enabled: false
|
||||
useHostnames: true
|
||||
|
||||
## Name of the replica set
|
||||
##
|
||||
name: rs0
|
||||
|
||||
## Key used for replica set authentication
|
||||
##
|
||||
# key: key
|
||||
|
||||
## Number of replicas per each node type
|
||||
##
|
||||
replicas:
|
||||
secondary: 1
|
||||
arbiter: 1
|
||||
|
||||
## Pod Disruption Budget
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/pods/disruptions/
|
||||
pdb:
|
||||
enabled: true
|
||||
minAvailable:
|
||||
secondary: 1
|
||||
arbiter: 1
|
||||
# maxUnavailable:
|
||||
# secondary: 1
|
||||
# arbiter: 1
|
||||
|
||||
# Annotations to be added to the deployment or statefulsets
|
||||
annotations: {}
|
||||
|
||||
# Additional abels to apply to the deployment or statefulsets
|
||||
labels:
|
||||
ownerId: {{ owner_id }}
|
||||
envId: {{ environment_id }}
|
||||
databaseId: {{ id }}
|
||||
databaseName: {{ name }}
|
||||
|
||||
# Annotations to be added to MongoDB pods
|
||||
podAnnotations: {}
|
||||
|
||||
# Additional pod labels to apply
|
||||
podLabels: {}
|
||||
|
||||
## Use an alternate scheduler, e.g. "stork".
|
||||
## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
|
||||
##
|
||||
# schedulerName:
|
||||
|
||||
## Configure resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources: {}
|
||||
# Define separate resources per arbiter, which are less then primary or secondary
|
||||
# used only when replica set is enabled
|
||||
resourcesArbiter: {}
|
||||
# limits:
|
||||
# cpu: 500m
|
||||
# memory: 512Mi
|
||||
# requests:
|
||||
# cpu: 100m
|
||||
# memory: 256Mi
|
||||
|
||||
## Pod priority
|
||||
## https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
|
||||
# priorityClassName: ""
|
||||
|
||||
## Node selector
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector
|
||||
nodeSelector: {}
|
||||
|
||||
## Define Separate nodeSelector for secondaries
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector
|
||||
nodeSelectorSecondary: {}
|
||||
|
||||
## Define Separate nodeSelector for arbiter
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector
|
||||
nodeSelectorArbiter: {}
|
||||
|
||||
## Affinity
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
affinity: {}
|
||||
# Define separate affinity for arbiter pod
|
||||
affinityArbiter: {}
|
||||
|
||||
## Tolerations
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
|
||||
tolerations: []
|
||||
|
||||
## Add sidecars to the pod
|
||||
##
|
||||
## For example:
|
||||
## sidecars:
|
||||
## - name: your-image-name
|
||||
## image: your-image
|
||||
## imagePullPolicy: Always
|
||||
## ports:
|
||||
## - name: portname
|
||||
## containerPort: 1234
|
||||
sidecars: []
|
||||
## Array to add extra volumes
|
||||
##
|
||||
extraVolumes: []
|
||||
## Array to add extra mounts (normally used with extraVolumes)
|
||||
##
|
||||
extraVolumeMounts: []
|
||||
|
||||
## Add sidecars to the arbiter pod
|
||||
# used only when replica set is enabled
|
||||
##
|
||||
## For example:
|
||||
## sidecars:
|
||||
## - name: your-image-name
|
||||
## image: your-image
|
||||
## imagePullPolicy: Always
|
||||
## ports:
|
||||
## - name: portname
|
||||
## containerPort: 1234
|
||||
sidecarsArbiter: []
|
||||
## Array to add extra volumes to the arbiter
|
||||
# used only when replica set is enabled
|
||||
##
|
||||
extraVolumesArbiter: []
|
||||
## Array to add extra mounts (normally used with extraVolumes) to the arbiter
|
||||
# used only when replica set is enabled
|
||||
##
|
||||
extraVolumeMountsArbiter: []
|
||||
|
||||
## updateStrategy for MongoDB Primary, Secondary and Arbitrer statefulsets
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies
|
||||
updateStrategy:
|
||||
type: RollingUpdate
|
||||
|
||||
## Enable persistence using Persistent Volume Claims
|
||||
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
|
||||
##
|
||||
persistence:
|
||||
enabled: true
|
||||
## A manually managed Persistent Volume and Claim
|
||||
## Requires persistence.enabled: true
|
||||
## If defined, PVC must be created manually before volume will be bound
|
||||
##
|
||||
# existingClaim:
|
||||
|
||||
## The path the volume will be mounted at, useful when using different
|
||||
## MongoDB images.
|
||||
##
|
||||
mountPath: /bitnami/mongodb
|
||||
|
||||
## The subdirectory of the volume to mount to, useful in dev environments
|
||||
## and one PV for multiple services.
|
||||
##
|
||||
subPath: ""
|
||||
|
||||
## mongodb data Persistent Volume Storage Class
|
||||
## If defined, storageClassName: <storageClass>
|
||||
## If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||
## If undefined (the default) or set to null, no storageClassName spec is
|
||||
## set, choosing the default provisioner. (gp2 on AWS, standard on
|
||||
## GKE, AWS & OpenStack)
|
||||
##
|
||||
# storageClass: "-"
|
||||
# storageClassSecondary: "-"
|
||||
storageClass: "do-block-storage"
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
size: {{ database_disk_size_in_gib }}Gi
|
||||
annotations:
|
||||
ownerId: {{ owner_id }}
|
||||
envId: {{ environment_id }}
|
||||
databaseId: {{ id }}
|
||||
databaseName: {{ name }}
|
||||
|
||||
## Configure the ingress resource that allows you to access the
|
||||
## MongoDB installation. Set up the URL
|
||||
## ref: http://kubernetes.io/docs/user-guide/ingress/
|
||||
##
|
||||
ingress:
|
||||
## Set to true to enable ingress record generation
|
||||
enabled: false
|
||||
|
||||
## Set this to true in order to add the corresponding annotations for cert-manager
|
||||
certManager: false
|
||||
|
||||
## Ingress annotations done as key:value pairs
|
||||
## For a full list of possible ingress annotations, please see
|
||||
## ref: https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md
|
||||
##
|
||||
## If tls is set to true, annotation ingress.kubernetes.io/secure-backends: "true" will automatically be set
|
||||
## If certManager is set to true, annotation kubernetes.io/tls-acme: "true" will automatically be set
|
||||
annotations:
|
||||
# kubernetes.io/ingress.class: nginx
|
||||
|
||||
## The list of hostnames to be covered with this ingress record.
|
||||
## Most likely this will be just one host, but in the event more hosts are needed, this is an array
|
||||
hosts:
|
||||
- name: mongodb.local
|
||||
path: /
|
||||
|
||||
## The tls configuration for the ingress
|
||||
## see: https://kubernetes.io/docs/concepts/services-networking/ingress/#tls
|
||||
tls:
|
||||
- hosts:
|
||||
- mongodb.local
|
||||
secretName: mongodb.local-tls
|
||||
|
||||
secrets:
|
||||
## If you're providing your own certificates, please use this to add the certificates as secrets
|
||||
## key and certificate should start with -----BEGIN CERTIFICATE----- or
|
||||
## -----BEGIN RSA PRIVATE KEY-----
|
||||
##
|
||||
## name should line up with a tlsSecret set further up
|
||||
## If you're using cert-manager, this is unneeded, as it will create the secret for you if it is not set
|
||||
##
|
||||
## It is also possible to create and manage the certificates outside of this helm chart
|
||||
## Please see README.md for more information
|
||||
# - name: airflow.local-tls
|
||||
# key:
|
||||
# certificate:
|
||||
|
||||
## Configure the options for init containers to be run before the main app containers
|
||||
## are started. All init containers are run sequentially and must exit without errors
|
||||
## for the next one to be started.
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
|
||||
# extraInitContainers: |
|
||||
# - name: do-something
|
||||
# image: busybox
|
||||
# command: ['do', 'something']
|
||||
|
||||
## Configure extra options for liveness and readiness probes
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes)
|
||||
livenessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 6
|
||||
successThreshold: 1
|
||||
readinessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 6
|
||||
successThreshold: 1
|
||||
|
||||
# Define custom config map with init scripts
|
||||
initConfigMap: {}
|
||||
# name: "init-config-map"
|
||||
|
||||
## Entries for the MongoDB config file. For documentation of all options, see:
|
||||
## http://docs.mongodb.org/manual/reference/configuration-options/
|
||||
##
|
||||
configmap:
|
||||
# # where and how to store data.
|
||||
# storage:
|
||||
# dbPath: /bitnami/mongodb/data/db
|
||||
# journal:
|
||||
# enabled: true
|
||||
# directoryPerDB: false
|
||||
# # where to write logging data.
|
||||
# systemLog:
|
||||
# destination: file
|
||||
# quiet: false
|
||||
# logAppend: true
|
||||
# logRotate: reopen
|
||||
# path: /opt/bitnami/mongodb/logs/mongodb.log
|
||||
# verbosity: 0
|
||||
# # network interfaces
|
||||
# net:
|
||||
# port: 27017
|
||||
# unixDomainSocket:
|
||||
# enabled: true
|
||||
# pathPrefix: /opt/bitnami/mongodb/tmp
|
||||
# ipv6: false
|
||||
# bindIpAll: true
|
||||
# # replica set options
|
||||
# #replication:
|
||||
# #replSetName: replicaset
|
||||
# #enableMajorityReadConcern: true
|
||||
# # process management options
|
||||
# processManagement:
|
||||
# fork: false
|
||||
# pidFilePath: /opt/bitnami/mongodb/tmp/mongodb.pid
|
||||
# # set parameter options
|
||||
# setParameter:
|
||||
# enableLocalhostAuthBypass: true
|
||||
# # security options
|
||||
# security:
|
||||
# authorization: disabled
|
||||
# #keyFile: /opt/bitnami/mongodb/conf/keyfile
|
||||
|
||||
## Prometheus Exporter / Metrics
|
||||
##
|
||||
metrics:
|
||||
enabled: false
|
||||
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/mongodb-exporter
|
||||
tag: 0.11.0-debian-10-r45
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets.
|
||||
## Secrets must be manually created in the namespace.
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
|
||||
## String with extra arguments to the metrics exporter
|
||||
## ref: https://github.com/percona/mongodb_exporter/blob/master/mongodb_exporter.go
|
||||
extraArgs: ""
|
||||
|
||||
## Metrics exporter resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
# resources: {}
|
||||
|
||||
## Metrics exporter liveness and readiness probes
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes)
|
||||
livenessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 15
|
||||
periodSeconds: 5
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 3
|
||||
successThreshold: 1
|
||||
readinessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
timeoutSeconds: 1
|
||||
failureThreshold: 3
|
||||
successThreshold: 1
|
||||
|
||||
## Metrics exporter pod Annotation
|
||||
podAnnotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "9216"
|
||||
|
||||
## Prometheus Service Monitor
|
||||
## ref: https://github.com/coreos/prometheus-operator
|
||||
## https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md
|
||||
serviceMonitor:
|
||||
## If the operator is installed in your cluster, set to true to create a Service Monitor Entry
|
||||
enabled: false
|
||||
|
||||
## Specify a namespace if needed
|
||||
# namespace: monitoring
|
||||
|
||||
## Used to pass Labels that are used by the Prometheus installed in your cluster to select Service Monitors to work with
|
||||
## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#prometheusspec
|
||||
additionalLabels: {}
|
||||
|
||||
## Specify Metric Relabellings to add to the scrape endpoint
|
||||
## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint
|
||||
# relabellings:
|
||||
|
||||
alerting:
|
||||
## Define individual alerting rules as required
|
||||
## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#rulegroup
|
||||
## https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/
|
||||
rules: {}
|
||||
|
||||
## Used to pass Labels that are used by the Prometheus installed in your cluster to select Prometheus Rules to work with
|
||||
## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#prometheusspec
|
||||
additionalLabels: {}
|
||||
601
lib/digitalocean/chart_values/mysql/values.j2.yaml
Normal file
601
lib/digitalocean/chart_values/mysql/values.j2.yaml
Normal file
@@ -0,0 +1,601 @@
|
||||
## Global Docker image parameters
|
||||
## Please, note that this will override the image parameters, including dependencies, configured to use the global value
|
||||
## Current available global Docker image parameters: imageRegistry and imagePullSecrets
|
||||
##
|
||||
# global:
|
||||
# imageRegistry: myRegistryName
|
||||
# imagePullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
# storageClass: myStorageClass
|
||||
|
||||
## Bitnami MySQL image
|
||||
## ref: https://hub.docker.com/r/bitnami/mysql/tags/
|
||||
##
|
||||
image:
|
||||
debug: false
|
||||
registry: quay.io
|
||||
repository: bitnami/mysql
|
||||
tag: "{{ version }}"
|
||||
|
||||
## Specify a imagePullPolicy
|
||||
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
##
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets.
|
||||
## Secrets must be manually created in the namespace.
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
|
||||
## String to partially override mysql.fullname template (will maintain the release name)
|
||||
##
|
||||
# nameOverride:
|
||||
nameOverride: {{ name }}
|
||||
|
||||
## String to fully override mysql.fullname template
|
||||
##
|
||||
# fullnameOverride:
|
||||
fullnameOverride: {{ name }}
|
||||
|
||||
## Cluster domain
|
||||
##
|
||||
clusterDomain: cluster.local
|
||||
|
||||
labels:
|
||||
ownerId: {{ owner_id }}
|
||||
envId: {{ environment_id }}
|
||||
databaseId: {{ id }}
|
||||
databaseName: {{ name }}
|
||||
|
||||
## Init containers parameters:
|
||||
## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section.
|
||||
##
|
||||
volumePermissions:
|
||||
enabled: false
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/minideb
|
||||
tag: buster
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets.
|
||||
## Secrets must be manually created in the namespace.
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
## Init container' resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
limits: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
requests:
|
||||
cpu: "{{ database_total_cpus }}"
|
||||
memory: "{{ database_ram_size_in_mib }}Mi"
|
||||
|
||||
## Use existing secret (ignores root, db and replication passwords)
|
||||
##
|
||||
# existingSecret:
|
||||
|
||||
## Admin (root) credentials
|
||||
##
|
||||
root:
|
||||
## MySQL admin password
|
||||
## ref: https://github.com/bitnami/bitnami-docker-mysql#setting-the-root-password-on-first-run
|
||||
##
|
||||
password: {{ database_password }}
|
||||
## Option to force users to specify a password. That is required for 'helm upgrade' to work properly.
|
||||
## If it is not force, a random password will be generated.
|
||||
##
|
||||
forcePassword: true
|
||||
## Mount admin password as a file instead of using an environment variable
|
||||
##
|
||||
injectSecretsAsVolume: true
|
||||
|
||||
## Custom user/db credentials
|
||||
##
|
||||
db:
|
||||
## MySQL username and password
|
||||
## ref: https://github.com/bitnami/bitnami-docker-mysql#creating-a-database-user-on-first-run
|
||||
## Note that this user should be different from the MySQL replication user (replication.user)
|
||||
##
|
||||
user: {{ database_login }}
|
||||
password: {{ database_password }}
|
||||
## Database to create
|
||||
## ref: https://github.com/bitnami/bitnami-docker-mysql#creating-a-database-on-first-run
|
||||
##
|
||||
name: {{ name }}
|
||||
## Option to force users to specify a password. That is required for 'helm upgrade' to work properly.
|
||||
## If it is not force, a random password will be generated.
|
||||
##
|
||||
forcePassword: true
|
||||
## Mount replication user password as a file instead of using an environment variable
|
||||
##
|
||||
injectSecretsAsVolume: true
|
||||
|
||||
## Replication configuration
|
||||
##
|
||||
replication:
|
||||
## Enable replication. This enables the creation of replicas of MySQL. If false, only a
|
||||
## master deployment would be created
|
||||
##
|
||||
enabled: false
|
||||
##
|
||||
## MySQL replication user
|
||||
## ref: https://github.com/bitnami/bitnami-docker-mysql#setting-up-a-replication-cluster
|
||||
## Note that this user should be different from the MySQL user (db.user)
|
||||
##
|
||||
user: replicator
|
||||
## MySQL replication user password
|
||||
## ref: https://github.com/bitnami/bitnami-docker-mysql#setting-up-a-replication-cluster
|
||||
##
|
||||
password:
|
||||
## Option to force users to specify a password. That is required for 'helm upgrade' to work properly.
|
||||
## If it is not force, a random password will be generated.
|
||||
##
|
||||
forcePassword: true
|
||||
## Mount replication user password as a file instead of using an environment variable
|
||||
##
|
||||
injectSecretsAsVolume: false
|
||||
|
||||
## initdb scripts
|
||||
## Specify dictionary of scripts to be run at first boot
|
||||
## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory
|
||||
##
|
||||
# initdbScripts:
|
||||
# my_init_script.sh: |
|
||||
# #!/bin/sh
|
||||
# echo "Do something."
|
||||
#
|
||||
## ConfigMap with scripts to be run at first boot
|
||||
## Note: This will override initdbScripts
|
||||
# initdbScriptsConfigMap:
|
||||
|
||||
serviceAccount:
|
||||
create: true
|
||||
## Specify the name of the service account created/used
|
||||
# name:
|
||||
|
||||
## Master nodes parameters
|
||||
##
|
||||
master:
|
||||
## Configure MySQL with a custom my.cnf file
|
||||
## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file
|
||||
##
|
||||
config: |-
|
||||
[mysqld]
|
||||
default_authentication_plugin=mysql_native_password
|
||||
skip-name-resolve
|
||||
explicit_defaults_for_timestamp
|
||||
basedir=/opt/bitnami/mysql
|
||||
plugin_dir=/opt/bitnami/mysql/plugin
|
||||
port=3306
|
||||
socket=/opt/bitnami/mysql/tmp/mysql.sock
|
||||
datadir=/bitnami/mysql/data
|
||||
tmpdir=/opt/bitnami/mysql/tmp
|
||||
max_allowed_packet=16M
|
||||
bind-address=0.0.0.0
|
||||
pid-file=/opt/bitnami/mysql/tmp/mysqld.pid
|
||||
log-error=/opt/bitnami/mysql/logs/mysqld.log
|
||||
character-set-server=UTF8
|
||||
collation-server=utf8_general_ci
|
||||
|
||||
[client]
|
||||
port=3306
|
||||
socket=/opt/bitnami/mysql/tmp/mysql.sock
|
||||
default-character-set=UTF8
|
||||
plugin_dir=/opt/bitnami/mysql/plugin
|
||||
|
||||
[manager]
|
||||
port=3306
|
||||
socket=/opt/bitnami/mysql/tmp/mysql.sock
|
||||
pid-file=/opt/bitnami/mysql/tmp/mysqld.pid
|
||||
|
||||
## updateStrategy for master nodes
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies
|
||||
##
|
||||
updateStrategy:
|
||||
type: RollingUpdate
|
||||
|
||||
## Pod annotations
|
||||
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
|
||||
##
|
||||
podAnnotations: {}
|
||||
|
||||
## Affinity for pod assignment
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
##
|
||||
affinity: {}
|
||||
|
||||
## Node labels for pod assignment. Evaluated as a template.
|
||||
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
|
||||
##
|
||||
nodeSelector: {}
|
||||
|
||||
## An array to add extra environment variables
|
||||
## For example:
|
||||
## extraEnvVars:
|
||||
## - name: TZ
|
||||
## value: "Europe/Paris"
|
||||
##
|
||||
extraEnvVars:
|
||||
|
||||
## ConfigMap with extra env vars:
|
||||
##
|
||||
extraEnvVarsCM:
|
||||
|
||||
## Secret with extra env vars:
|
||||
##
|
||||
extraEnvVarsSecret:
|
||||
|
||||
## Tolerations for pod assignment
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
|
||||
##
|
||||
tolerations: []
|
||||
|
||||
## MySQL master pods' Security Context
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
|
||||
##
|
||||
securityContext:
|
||||
enabled: true
|
||||
fsGroup: 1001
|
||||
runAsUser: 1001
|
||||
|
||||
## MySQL master containers' Security Context
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
|
||||
## Example:
|
||||
## containerSecurityContext:
|
||||
## capabilities:
|
||||
## drop: ["NET_RAW"]
|
||||
## readOnlyRootFilesystem: true
|
||||
##
|
||||
containerSecurityContext: {}
|
||||
|
||||
## MySQL master containers' resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
limits: {}
|
||||
# cpu: 250m
|
||||
# memory: 256Mi
|
||||
requests: {}
|
||||
# cpu: 250m
|
||||
# memory: 256Mi
|
||||
|
||||
## MySQL master containers' liveness and readiness probes
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
|
||||
##
|
||||
livenessProbe:
|
||||
enabled: true
|
||||
## Initializing the database could take some time
|
||||
##
|
||||
initialDelaySeconds: 120
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 1
|
||||
successThreshold: 1
|
||||
failureThreshold: 3
|
||||
readinessProbe:
|
||||
enabled: true
|
||||
## Initializing the database could take some time
|
||||
##
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 1
|
||||
successThreshold: 1
|
||||
failureThreshold: 3
|
||||
|
||||
## Enable persistence using PVCs on master nodes
|
||||
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
|
||||
##
|
||||
persistence:
|
||||
## If true, use a Persistent Volume Claim, If false, use emptyDir
|
||||
##
|
||||
enabled: true
|
||||
mountPath: /bitnami/mysql
|
||||
## Persistent Volume Storage Class
|
||||
## If defined, storageClassName: <storageClass>
|
||||
## If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||
## If undefined (the default) or set to null, no storageClassName spec is
|
||||
## set, choosing the default provisioner. (gp2 on AWS, standard on
|
||||
## GKE, AWS & OpenStack)
|
||||
##
|
||||
# storageClass: "-"
|
||||
storageClass: "do-block-storage"
|
||||
## PVC annotations
|
||||
##
|
||||
annotations:
|
||||
ownerId: {{ owner_id }}
|
||||
envId: {{ environment_id }}
|
||||
databaseId: {{ id }}
|
||||
databaseName: {{ name }}
|
||||
|
||||
## Persistent Volume Access Mode
|
||||
##
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
## Persistent Volume size
|
||||
##
|
||||
size: {{ database_disk_size_in_gib }}Gi
|
||||
## Use an existing PVC
|
||||
##
|
||||
# existingClaim:
|
||||
|
||||
## Slave nodes parameters
|
||||
##
|
||||
slave:
|
||||
## Number of slave replicas
|
||||
##
|
||||
replicas: 2
|
||||
|
||||
## Configure MySQL slave with a custom my.cnf file
|
||||
## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file
|
||||
##
|
||||
config: |-
|
||||
[mysqld]
|
||||
default_authentication_plugin=mysql_native_password
|
||||
skip-name-resolve
|
||||
explicit_defaults_for_timestamp
|
||||
basedir=/opt/bitnami/mysql
|
||||
port=3306
|
||||
socket=/opt/bitnami/mysql/tmp/mysql.sock
|
||||
datadir=/bitnami/mysql/data
|
||||
tmpdir=/opt/bitnami/mysql/tmp
|
||||
max_allowed_packet=16M
|
||||
bind-address=0.0.0.0
|
||||
pid-file=/opt/bitnami/mysql/tmp/mysqld.pid
|
||||
log-error=/opt/bitnami/mysql/logs/mysqld.log
|
||||
character-set-server=UTF8
|
||||
collation-server=utf8_general_ci
|
||||
|
||||
[client]
|
||||
port=3306
|
||||
socket=/opt/bitnami/mysql/tmp/mysql.sock
|
||||
default-character-set=UTF8
|
||||
|
||||
[manager]
|
||||
port=3306
|
||||
socket=/opt/bitnami/mysql/tmp/mysql.sock
|
||||
pid-file=/opt/bitnami/mysql/tmp/mysqld.pid
|
||||
|
||||
## updateStrategy for slave nodes
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies
|
||||
##
|
||||
updateStrategy:
|
||||
type: RollingUpdate
|
||||
|
||||
## Pod annotations
|
||||
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
|
||||
##
|
||||
podAnnotations: {}
|
||||
|
||||
## Affinity for pod assignment
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
##
|
||||
affinity: {}
|
||||
|
||||
## Node labels for pod assignment. Evaluated as a template.
|
||||
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
|
||||
##
|
||||
nodeSelector: {}
|
||||
|
||||
## An array to add extra environment variables
|
||||
## For example:
|
||||
## extraEnvVars:
|
||||
## - name: TZ
|
||||
## value: "Europe/Paris"
|
||||
##
|
||||
extraEnvVars:
|
||||
|
||||
## ConfigMap with extra env vars:
|
||||
##
|
||||
extraEnvVarsCM:
|
||||
|
||||
## Secret with extra env vars:
|
||||
##
|
||||
extraEnvVarsSecret:
|
||||
|
||||
## Tolerations for pod assignment
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
|
||||
##
|
||||
tolerations: []
|
||||
|
||||
## MySQL slave pods' Security Context
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
|
||||
##
|
||||
securityContext:
|
||||
enabled: true
|
||||
fsGroup: 1001
|
||||
runAsUser: 1001
|
||||
|
||||
## MySQL slave containers' Security Context
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
|
||||
## Example:
|
||||
## containerSecurityContext:
|
||||
## capabilities:
|
||||
## drop: ["NET_RAW"]
|
||||
## readOnlyRootFilesystem: true
|
||||
##
|
||||
containerSecurityContext: {}
|
||||
|
||||
## MySQL slave containers' resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
limits: {}
|
||||
# cpu: 250m
|
||||
# memory: 256Mi
|
||||
requests: {}
|
||||
# cpu: 250m
|
||||
# memory: 256Mi
|
||||
|
||||
## MySQL slave containers' liveness and readiness probes
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
|
||||
##
|
||||
livenessProbe:
|
||||
enabled: true
|
||||
## Initializing the database could take some time
|
||||
##
|
||||
initialDelaySeconds: 120
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 1
|
||||
successThreshold: 1
|
||||
failureThreshold: 3
|
||||
readinessProbe:
|
||||
enabled: true
|
||||
## Initializing the database could take some time
|
||||
##
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 1
|
||||
successThreshold: 1
|
||||
failureThreshold: 3
|
||||
|
||||
## Enable persistence using PVCs on slave nodes
|
||||
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
|
||||
##
|
||||
persistence:
|
||||
## If true, use a Persistent Volume Claim, If false, use emptyDir
|
||||
##
|
||||
enabled: true
|
||||
mountPath: /bitnami/mysql
|
||||
## Persistent Volume Storage Class
|
||||
## If defined, storageClassName: <storageClass>
|
||||
## If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||
## If undefined (the default) or set to null, no storageClassName spec is
|
||||
## set, choosing the default provisioner. (gp2 on AWS, standard on
|
||||
## GKE, AWS & OpenStack)
|
||||
##
|
||||
# storageClass: "-"
|
||||
## PVC annotations
|
||||
##
|
||||
annotations: {}
|
||||
## Persistent Volume Access Mode
|
||||
##
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
## Persistent Volume size
|
||||
##
|
||||
size: {{ database_disk_size_in_gib }}Gi
|
||||
## Use an existing PVC
|
||||
##
|
||||
# existingClaim:
|
||||
|
||||
## MySQL Service properties
|
||||
##
|
||||
service:
|
||||
## MySQL Service type
|
||||
##
|
||||
type: LoadBalancer
|
||||
|
||||
## MySQL Service port
|
||||
##
|
||||
port: 3306
|
||||
|
||||
## Specify the nodePort value for the LoadBalancer and NodePort service types.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
|
||||
##
|
||||
nodePort:
|
||||
master:
|
||||
slave:
|
||||
|
||||
## Provide any additional annotations which may be required. This can be used to
|
||||
## set the LoadBalancer service type to internal only.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
##
|
||||
annotations:
|
||||
service.beta.kubernetes.io/do-loadbalancer-protocol: "tcp"
|
||||
service.beta.kubernetes.io/do-loadbalancer-size-slug: "lb-small"
|
||||
external-dns.alpha.kubernetes.io/hostname: "{{ fqdn }}"
|
||||
external-dns.alpha.kubernetes.io/ttl: "300"
|
||||
|
||||
## loadBalancerIP for the PrestaShop Service (optional, cloud specific)
|
||||
## ref: http://kubernetes.io/docs/user-guide/services/#type-loadbalancer
|
||||
##
|
||||
## loadBalancerIP for the MySQL Service (optional, cloud specific)
|
||||
## ref: http://kubernetes.io/docs/user-guide/services/#type-loadbalancer
|
||||
##
|
||||
# loadBalancerIP:
|
||||
# master:
|
||||
# slave:
|
||||
|
||||
## MySQL prometheus metrics parameters
|
||||
## ref: https://docs.influxdata.com/influxdb/v1.7/administration/server_monitoring/#influxdb-metrics-http-endpoint
|
||||
##
|
||||
metrics:
|
||||
enabled: false
|
||||
## Bitnami MySQL Prometheus exporter image
|
||||
## ref: https://hub.docker.com/r/bitnami/mysqld-exporter/tags/
|
||||
##
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/mysqld-exporter
|
||||
tag: 0.12.1-debian-10-r127
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets.
|
||||
## Secrets must be manually created in the namespace.
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
## MySQL Prometheus exporter containers' resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
limits: {}
|
||||
# cpu: 0.5
|
||||
# memory: 256Mi
|
||||
requests: {}
|
||||
# cpu: 0.5
|
||||
# memory: 256Mi
|
||||
|
||||
## MySQL Prometheus exporter service parameters
|
||||
##
|
||||
service:
|
||||
type: ClusterIP
|
||||
port: 9104
|
||||
annotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "9104"
|
||||
|
||||
## Prometheus Operator ServiceMonitor configuration
|
||||
##
|
||||
serviceMonitor:
|
||||
enabled: false
|
||||
## Namespace in which Prometheus is running
|
||||
##
|
||||
# namespace: monitoring
|
||||
|
||||
## Interval at which metrics should be scraped.
|
||||
## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint
|
||||
##
|
||||
# interval: 10s
|
||||
|
||||
## Timeout after which the scrape is ended
|
||||
## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint
|
||||
##
|
||||
# scrapeTimeout: 10s
|
||||
|
||||
## ServiceMonitor selector labels
|
||||
## ref: https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-configuration
|
||||
##
|
||||
# selector:
|
||||
# prometheus: my-prometheus
|
||||
@@ -0,0 +1,572 @@
|
||||
## nginx configuration
|
||||
## Ref: https://github.com/kubernetes/ingress/blob/master/controllers/nginx/configuration.md
|
||||
##
|
||||
controller:
|
||||
name: controller
|
||||
image:
|
||||
repository: quay.io/kubernetes-ingress-controller/nginx-ingress-controller
|
||||
tag: "0.30.0"
|
||||
pullPolicy: IfNotPresent
|
||||
# www-data -> uid 101
|
||||
runAsUser: 101
|
||||
allowPrivilegeEscalation: true
|
||||
|
||||
# This will fix the issue of HPA not being able to read the metrics.
|
||||
# Note that if you enable it for existing deployments, it won't work as the labels are immutable.
|
||||
# We recommend setting this to true for new deployments.
|
||||
useComponentLabel: true
|
||||
|
||||
# Configures the ports the nginx-controller listens on
|
||||
containerPort:
|
||||
http: 80
|
||||
https: 443
|
||||
|
||||
# Will add custom configuration options to Nginx https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/
|
||||
config:
|
||||
client_max_body_size: 100m
|
||||
proxy-body-size: 100m
|
||||
server-tokens: "false"
|
||||
|
||||
# Maxmind license key to download GeoLite2 Databases
|
||||
# https://blog.maxmind.com/2019/12/18/significant-changes-to-accessing-and-using-geolite2-databases
|
||||
maxmindLicenseKey: ""
|
||||
|
||||
# Will add custom headers before sending traffic to backends according to https://github.com/kubernetes/ingress-nginx/tree/master/docs/examples/customization/custom-headers
|
||||
proxySetHeaders: {}
|
||||
|
||||
# Will add custom headers before sending response traffic to the client according to: https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/#add-headers
|
||||
addHeaders: {}
|
||||
|
||||
# Required for use with CNI based kubernetes installations (such as ones set up by kubeadm),
|
||||
# since CNI and hostport don't mix yet. Can be deprecated once https://github.com/kubernetes/kubernetes/issues/23920
|
||||
# is merged
|
||||
hostNetwork: false
|
||||
|
||||
# Optionally customize the pod dnsConfig.
|
||||
dnsConfig: {}
|
||||
|
||||
# Optionally change this to ClusterFirstWithHostNet in case you have 'hostNetwork: true'.
|
||||
# By default, while using host network, name resolution uses the host's DNS. If you wish nginx-controller
|
||||
# to keep resolving names inside the k8s network, use ClusterFirstWithHostNet.
|
||||
dnsPolicy: ClusterFirst
|
||||
|
||||
# Bare-metal considerations via the host network https://kubernetes.github.io/ingress-nginx/deploy/baremetal/#via-the-host-network
|
||||
# Ingress status was blank because there is no Service exposing the NGINX Ingress controller in a configuration using the host network, the default --publish-service flag used in standard cloud setups does not apply
|
||||
reportNodeInternalIp: false
|
||||
|
||||
## Use host ports 80 and 443
|
||||
daemonset:
|
||||
useHostPort: false
|
||||
hostPorts:
|
||||
http: 80
|
||||
https: 443
|
||||
|
||||
## Required only if defaultBackend.enabled = false
|
||||
## Must be <namespace>/<service_name>
|
||||
##
|
||||
defaultBackendService: ""
|
||||
|
||||
## Election ID to use for status update
|
||||
##
|
||||
electionID: ingress-controller-leader-{{ id }}
|
||||
|
||||
## Name of the ingress class to route through this controller
|
||||
##
|
||||
ingressClass: "{{ id }}"
|
||||
|
||||
# labels to add to the pod container metadata
|
||||
podLabels: {}
|
||||
# key: value
|
||||
|
||||
## Security Context policies for controller pods
|
||||
## See https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/ for
|
||||
## notes on enabling and using sysctls
|
||||
##
|
||||
podSecurityContext: {}
|
||||
|
||||
## Allows customization of the external service
|
||||
## the ingress will be bound to via DNS
|
||||
publishService:
|
||||
enabled: false
|
||||
## Allows overriding of the publish service to bind to
|
||||
## Must be <namespace>/<service_name>
|
||||
##
|
||||
pathOverride: ""
|
||||
|
||||
## Limit the scope of the controller
|
||||
##
|
||||
scope:
|
||||
enabled: true
|
||||
namespace: "{{ namespace }}" # defaults to .Release.Namespace
|
||||
|
||||
## Allows customization of the configmap / nginx-configmap namespace
|
||||
##
|
||||
configMapNamespace: "" # defaults to .Release.Namespace
|
||||
|
||||
## Allows customization of the tcp-services-configmap namespace
|
||||
##
|
||||
tcp:
|
||||
configMapNamespace: "" # defaults to .Release.Namespace
|
||||
|
||||
## Allows customization of the udp-services-configmap namespace
|
||||
##
|
||||
udp:
|
||||
configMapNamespace: "" # defaults to .Release.Namespace
|
||||
|
||||
## Additional command line arguments to pass to nginx-ingress-controller
|
||||
## E.g. to specify the default SSL certificate you can use
|
||||
## extraArgs:
|
||||
## default-ssl-certificate: "<namespace>/<secret_name>"
|
||||
extraArgs: {}
|
||||
|
||||
## Additional environment variables to set
|
||||
extraEnvs: []
|
||||
# extraEnvs:
|
||||
# - name: FOO
|
||||
# valueFrom:
|
||||
# secretKeyRef:
|
||||
# key: FOO
|
||||
# name: secret-resource
|
||||
|
||||
## DaemonSet or Deployment
|
||||
##
|
||||
kind: Deployment
|
||||
|
||||
## Annotations to be added to the controller deployment
|
||||
##
|
||||
deploymentAnnotations: {}
|
||||
|
||||
# The update strategy to apply to the Deployment or DaemonSet
|
||||
##
|
||||
updateStrategy:
|
||||
rollingUpdate:
|
||||
maxUnavailable: 1
|
||||
|
||||
# minReadySeconds to avoid killing pods before we are ready
|
||||
##
|
||||
minReadySeconds: 0
|
||||
|
||||
## Node tolerations for server scheduling to nodes with taints
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
|
||||
##
|
||||
tolerations: []
|
||||
# - key: "key"
|
||||
# operator: "Equal|Exists"
|
||||
# value: "value"
|
||||
# effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)"
|
||||
|
||||
## Affinity and anti-affinity
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
##
|
||||
affinity: {}
|
||||
# # An example of preferred pod anti-affinity, weight is in the range 1-100
|
||||
# podAntiAffinity:
|
||||
# preferredDuringSchedulingIgnoredDuringExecution:
|
||||
# - weight: 100
|
||||
# podAffinityTerm:
|
||||
# labelSelector:
|
||||
# matchExpressions:
|
||||
# - key: app
|
||||
# operator: In
|
||||
# values:
|
||||
# - nginx-ingress
|
||||
# topologyKey: kubernetes.io/hostname
|
||||
|
||||
# # An example of required pod anti-affinity
|
||||
# podAntiAffinity:
|
||||
# requiredDuringSchedulingIgnoredDuringExecution:
|
||||
# - labelSelector:
|
||||
# matchExpressions:
|
||||
# - key: app
|
||||
# operator: In
|
||||
# values:
|
||||
# - nginx-ingress
|
||||
# topologyKey: "kubernetes.io/hostname"
|
||||
|
||||
## terminationGracePeriodSeconds
|
||||
##
|
||||
terminationGracePeriodSeconds: 60
|
||||
|
||||
## Node labels for controller pod assignment
|
||||
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
|
||||
##
|
||||
nodeSelector: {}
|
||||
|
||||
## Liveness and readiness probe values
|
||||
## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
|
||||
##
|
||||
livenessProbe:
|
||||
failureThreshold: 3
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 1
|
||||
port: 10254
|
||||
readinessProbe:
|
||||
failureThreshold: 3
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 1
|
||||
port: 10254
|
||||
|
||||
## Annotations to be added to controller pods
|
||||
##
|
||||
podAnnotations: {}
|
||||
|
||||
replicaCount: 1
|
||||
|
||||
minAvailable: 1
|
||||
|
||||
resources: {}
|
||||
# limits:
|
||||
# cpu: 100m
|
||||
# memory: 64Mi
|
||||
# requests:
|
||||
# cpu: 100m
|
||||
# memory: 64Mi
|
||||
|
||||
autoscaling:
|
||||
enabled: true
|
||||
minReplicas: 2
|
||||
maxReplicas: 11
|
||||
targetCPUUtilizationPercentage: 50
|
||||
targetMemoryUtilizationPercentage: 50
|
||||
|
||||
## Override NGINX template
|
||||
customTemplate:
|
||||
configMapName: ""
|
||||
configMapKey: ""
|
||||
|
||||
service:
|
||||
enabled: true
|
||||
|
||||
annotations:
|
||||
service.beta.kubernetes.io/aws-load-balancer-type: nlb
|
||||
labels:
|
||||
app_id : "{{ id }}"
|
||||
|
||||
## Deprecated, instead simply do not provide a clusterIP value
|
||||
omitClusterIP: false
|
||||
# clusterIP: ""
|
||||
|
||||
## List of IP addresses at which the controller services are available
|
||||
## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips
|
||||
##
|
||||
externalIPs: []
|
||||
|
||||
loadBalancerIP: ""
|
||||
loadBalancerSourceRanges: []
|
||||
|
||||
enableHttp: true
|
||||
enableHttps: true
|
||||
|
||||
## Set external traffic policy to: "Local" to preserve source IP on
|
||||
## providers supporting it
|
||||
## Ref: https://kubernetes.io/docs/tutorials/services/source-ip/#source-ip-for-services-with-typeloadbalancer
|
||||
externalTrafficPolicy: "Local"
|
||||
|
||||
# Must be either "None" or "ClientIP" if set. Kubernetes will default to "None".
|
||||
# Ref: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
|
||||
sessionAffinity: ""
|
||||
|
||||
healthCheckNodePort: 0
|
||||
|
||||
ports:
|
||||
http: 80
|
||||
https: 443
|
||||
|
||||
targetPorts:
|
||||
http: http
|
||||
https: https
|
||||
|
||||
type: LoadBalancer
|
||||
|
||||
# type: NodePort
|
||||
# nodePorts:
|
||||
# http: 32080
|
||||
# https: 32443
|
||||
# tcp:
|
||||
# 8080: 32808
|
||||
nodePorts:
|
||||
http: ""
|
||||
https: ""
|
||||
tcp: {}
|
||||
udp: {}
|
||||
|
||||
extraContainers: []
|
||||
## Additional containers to be added to the controller pod.
|
||||
## See https://github.com/lemonldap-ng-controller/lemonldap-ng-controller as example.
|
||||
# - name: my-sidecar
|
||||
# image: nginx:latest
|
||||
# - name: lemonldap-ng-controller
|
||||
# image: lemonldapng/lemonldap-ng-controller:0.2.0
|
||||
# args:
|
||||
# - /lemonldap-ng-controller
|
||||
# - --alsologtostderr
|
||||
# - --configmap=$(POD_NAMESPACE)/lemonldap-ng-configuration
|
||||
# env:
|
||||
# - name: POD_NAME
|
||||
# valueFrom:
|
||||
# fieldRef:
|
||||
# fieldPath: metadata.name
|
||||
# - name: POD_NAMESPACE
|
||||
# valueFrom:
|
||||
# fieldRef:
|
||||
# fieldPath: metadata.namespace
|
||||
# volumeMounts:
|
||||
# - name: copy-portal-skins
|
||||
# mountPath: /srv/var/lib/lemonldap-ng/portal/skins
|
||||
|
||||
extraVolumeMounts: []
|
||||
## Additional volumeMounts to the controller main container.
|
||||
# - name: copy-portal-skins
|
||||
# mountPath: /var/lib/lemonldap-ng/portal/skins
|
||||
|
||||
extraVolumes: []
|
||||
## Additional volumes to the controller pod.
|
||||
# - name: copy-portal-skins
|
||||
# emptyDir: {}
|
||||
|
||||
extraInitContainers: []
|
||||
## Containers, which are run before the app containers are started.
|
||||
# - name: init-myservice
|
||||
# image: busybox
|
||||
# command: ['sh', '-c', 'until nslookup myservice; do echo waiting for myservice; sleep 2; done;']
|
||||
|
||||
admissionWebhooks:
|
||||
enabled: false
|
||||
failurePolicy: Fail
|
||||
port: 8443
|
||||
|
||||
service:
|
||||
annotations: {}
|
||||
## Deprecated, instead simply do not provide a clusterIP value
|
||||
omitClusterIP: false
|
||||
# clusterIP: ""
|
||||
externalIPs: []
|
||||
loadBalancerIP: ""
|
||||
loadBalancerSourceRanges: []
|
||||
servicePort: 443
|
||||
type: ClusterIP
|
||||
|
||||
patch:
|
||||
enabled: true
|
||||
image:
|
||||
repository: jettech/kube-webhook-certgen
|
||||
tag: v1.0.0
|
||||
pullPolicy: IfNotPresent
|
||||
## Provide a priority class name to the webhook patching job
|
||||
##
|
||||
priorityClassName: ""
|
||||
podAnnotations: {}
|
||||
nodeSelector: {}
|
||||
|
||||
metrics:
|
||||
port: 10254
|
||||
# if this port is changed, change healthz-port: in extraArgs: accordingly
|
||||
enabled: false
|
||||
|
||||
service:
|
||||
annotations: {}
|
||||
# prometheus.io/scrape: "true"
|
||||
# prometheus.io/port: "10254"
|
||||
|
||||
## Deprecated, instead simply do not provide a clusterIP value
|
||||
omitClusterIP: false
|
||||
# clusterIP: ""
|
||||
|
||||
## List of IP addresses at which the stats-exporter service is available
|
||||
## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips
|
||||
##
|
||||
externalIPs: []
|
||||
|
||||
loadBalancerIP: ""
|
||||
loadBalancerSourceRanges: []
|
||||
servicePort: 9913
|
||||
type: ClusterIP
|
||||
|
||||
serviceMonitor:
|
||||
enabled: false
|
||||
additionalLabels: {}
|
||||
namespace: ""
|
||||
namespaceSelector: {}
|
||||
# Default: scrape .Release.Namespace only
|
||||
# To scrape all, use the following:
|
||||
# namespaceSelector:
|
||||
# any: true
|
||||
scrapeInterval: 30s
|
||||
# honorLabels: true
|
||||
|
||||
prometheusRule:
|
||||
enabled: false
|
||||
additionalLabels: {}
|
||||
namespace: ""
|
||||
rules: []
|
||||
# # These are just examples rules, please adapt them to your needs
|
||||
# - alert: TooMany500s
|
||||
# expr: 100 * ( sum( nginx_ingress_controller_requests{status=~"5.+"} ) / sum(nginx_ingress_controller_requests) ) > 5
|
||||
# for: 1m
|
||||
# labels:
|
||||
# severity: critical
|
||||
# annotations:
|
||||
# description: Too many 5XXs
|
||||
# summary: More than 5% of the all requests did return 5XX, this require your attention
|
||||
# - alert: TooMany400s
|
||||
# expr: 100 * ( sum( nginx_ingress_controller_requests{status=~"4.+"} ) / sum(nginx_ingress_controller_requests) ) > 5
|
||||
# for: 1m
|
||||
# labels:
|
||||
# severity: critical
|
||||
# annotations:
|
||||
# description: Too many 4XXs
|
||||
# summary: More than 5% of the all requests did return 4XX, this require your attention
|
||||
|
||||
|
||||
lifecycle: {}
|
||||
|
||||
priorityClassName: ""
|
||||
|
||||
## Rollback limit
|
||||
##
|
||||
revisionHistoryLimit: 10
|
||||
|
||||
## Default 404 backend
|
||||
##
|
||||
defaultBackend:
|
||||
|
||||
## If false, controller.defaultBackendService must be provided
|
||||
##
|
||||
enabled: true
|
||||
|
||||
name: default-backend
|
||||
image:
|
||||
repository: k8s.gcr.io/defaultbackend-amd64
|
||||
tag: "1.5"
|
||||
pullPolicy: IfNotPresent
|
||||
# nobody user -> uid 65534
|
||||
runAsUser: 65534
|
||||
|
||||
# This will fix the issue of HPA not being able to read the metrics.
|
||||
# Note that if you enable it for existing deployments, it won't work as the labels are immutable.
|
||||
# We recommend setting this to true for new deployments.
|
||||
useComponentLabel: false
|
||||
|
||||
extraArgs: {}
|
||||
|
||||
serviceAccount:
|
||||
create: true
|
||||
name:
|
||||
## Additional environment variables to set for defaultBackend pods
|
||||
extraEnvs: []
|
||||
|
||||
port: 8080
|
||||
|
||||
## Readiness and liveness probes for default backend
|
||||
## Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/
|
||||
##
|
||||
livenessProbe:
|
||||
failureThreshold: 3
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 10
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 5
|
||||
readinessProbe:
|
||||
failureThreshold: 6
|
||||
initialDelaySeconds: 0
|
||||
periodSeconds: 5
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 5
|
||||
|
||||
## Node tolerations for server scheduling to nodes with taints
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
|
||||
##
|
||||
tolerations: []
|
||||
# - key: "key"
|
||||
# operator: "Equal|Exists"
|
||||
# value: "value"
|
||||
# effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)"
|
||||
|
||||
affinity: {}
|
||||
|
||||
## Security Context policies for controller pods
|
||||
## See https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/ for
|
||||
## notes on enabling and using sysctls
|
||||
##
|
||||
podSecurityContext: {}
|
||||
|
||||
# labels to add to the pod container metadata
|
||||
podLabels: {}
|
||||
# key: value
|
||||
|
||||
## Node labels for default backend pod assignment
|
||||
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
|
||||
##
|
||||
nodeSelector: {}
|
||||
|
||||
## Annotations to be added to default backend pods
|
||||
##
|
||||
podAnnotations: {}
|
||||
|
||||
replicaCount: 1
|
||||
|
||||
minAvailable: 1
|
||||
|
||||
resources: {}
|
||||
# limits:
|
||||
# cpu: 10m
|
||||
# memory: 20Mi
|
||||
# requests:
|
||||
# cpu: 10m
|
||||
# memory: 20Mi
|
||||
|
||||
service:
|
||||
annotations: {}
|
||||
## Deprecated, instead simply do not provide a clusterIP value
|
||||
omitClusterIP: false
|
||||
# clusterIP: ""
|
||||
|
||||
## List of IP addresses at which the default backend service is available
|
||||
## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips
|
||||
##
|
||||
externalIPs: []
|
||||
|
||||
loadBalancerIP: ""
|
||||
loadBalancerSourceRanges: []
|
||||
servicePort: 80
|
||||
type: ClusterIP
|
||||
|
||||
priorityClassName: ""
|
||||
|
||||
# If provided, the value will be used as the `release` label instead of .Release.Name
|
||||
releaseLabelOverride: ""
|
||||
|
||||
## Enable RBAC as per https://github.com/kubernetes/ingress/tree/master/examples/rbac/nginx and https://github.com/kubernetes/ingress/issues/266
|
||||
rbac:
|
||||
create: true
|
||||
scope: true
|
||||
|
||||
# If true, create & use Pod Security Policy resources
|
||||
# https://kubernetes.io/docs/concepts/policy/pod-security-policy/
|
||||
podSecurityPolicy:
|
||||
enabled: false
|
||||
|
||||
serviceAccount:
|
||||
create: true
|
||||
name:
|
||||
|
||||
## Optional array of imagePullSecrets containing private registry credentials
|
||||
## Ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
imagePullSecrets: []
|
||||
# - name: secretName
|
||||
|
||||
# TCP service key:value pairs
|
||||
# Ref: https://github.com/kubernetes/contrib/tree/master/ingress/controllers/nginx/examples/tcp
|
||||
##
|
||||
tcp: {}
|
||||
# 8080: "default/example-tcp-svc:9000"
|
||||
|
||||
# UDP service key:value pairs
|
||||
# Ref: https://github.com/kubernetes/contrib/tree/master/ingress/controllers/nginx/examples/udp
|
||||
##
|
||||
udp: {}
|
||||
# 53: "kube-system/kube-dns:53"
|
||||
563
lib/digitalocean/chart_values/postgresql/values.j2.yaml
Normal file
563
lib/digitalocean/chart_values/postgresql/values.j2.yaml
Normal file
@@ -0,0 +1,563 @@
|
||||
## Global Docker image parameters
|
||||
## Please, note that this will override the image parameters, including dependencies, configured to use the global value
|
||||
## Current available global Docker image parameters: imageRegistry and imagePullSecrets
|
||||
##
|
||||
global:
|
||||
postgresql: {}
|
||||
# imageRegistry: myRegistryName
|
||||
# imagePullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
# storageClass: myStorageClass
|
||||
|
||||
## Bitnami PostgreSQL image version
|
||||
## ref: https://hub.docker.com/r/bitnami/postgresql/tags/
|
||||
##
|
||||
image:
|
||||
registry: quay.io
|
||||
repository: bitnami/postgresql
|
||||
tag: "{{ version }}"
|
||||
## Specify a imagePullPolicy
|
||||
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
##
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets.
|
||||
## Secrets must be manually created in the namespace.
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
|
||||
## Set to true if you would like to see extra information on logs
|
||||
## It turns BASH and NAMI debugging in minideb
|
||||
## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging
|
||||
debug: false
|
||||
|
||||
## String to partially override postgresql.fullname template (will maintain the release name)
|
||||
##
|
||||
nameOverride: {{ name }}
|
||||
|
||||
## String to fully override postgresql.fullname template
|
||||
##
|
||||
fullnameOverride: {{ name }}
|
||||
|
||||
##
|
||||
## Init containers parameters:
|
||||
## volumePermissions: Change the owner of the persist volume mountpoint to RunAsUser:fsGroup
|
||||
##
|
||||
volumePermissions:
|
||||
enabled: true
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/minideb
|
||||
tag: buster
|
||||
## Specify a imagePullPolicy
|
||||
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
##
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets.
|
||||
## Secrets must be manually created in the namespace.
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
## Init container Security Context
|
||||
## Note: the chown of the data folder is done to securityContext.runAsUser
|
||||
## and not the below volumePermissions.securityContext.runAsUser
|
||||
## When runAsUser is set to special value "auto", init container will try to chwon the
|
||||
## data folder to autodetermined user&group, using commands: `id -u`:`id -G | cut -d" " -f2`
|
||||
## "auto" is especially useful for OpenShift which has scc with dynamic userids (and 0 is not allowed).
|
||||
## You may want to use this volumePermissions.securityContext.runAsUser="auto" in combination with
|
||||
## pod securityContext.enabled=false and shmVolume.chmod.enabled=false
|
||||
##
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
|
||||
## Use an alternate scheduler, e.g. "stork".
|
||||
## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
|
||||
##
|
||||
# schedulerName:
|
||||
|
||||
|
||||
## Pod Security Context
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
|
||||
##
|
||||
securityContext:
|
||||
enabled: true
|
||||
fsGroup: 1001
|
||||
runAsUser: 1001
|
||||
|
||||
## Pod Service Account
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
|
||||
serviceAccount:
|
||||
enabled: false
|
||||
## Name of an already existing service account. Setting this value disables the automatic service account creation.
|
||||
# name:
|
||||
|
||||
## Pod Security Policy
|
||||
## ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/
|
||||
psp:
|
||||
create: false
|
||||
|
||||
## Creates role for ServiceAccount
|
||||
## Required for PSP
|
||||
rbac:
|
||||
create: true
|
||||
|
||||
replication:
|
||||
enabled: false
|
||||
user: repl_user
|
||||
password: repl_password
|
||||
slaveReplicas: 1
|
||||
## Set synchronous commit mode: on, off, remote_apply, remote_write and local
|
||||
## ref: https://www.postgresql.org/docs/9.6/runtime-config-wal.html#GUC-WAL-LEVEL
|
||||
synchronousCommit: "off"
|
||||
## From the number of `slaveReplicas` defined above, set the number of those that will have synchronous replication
|
||||
## NOTE: It cannot be > slaveReplicas
|
||||
numSynchronousReplicas: 0
|
||||
## Replication Cluster application name. Useful for defining multiple replication policies
|
||||
applicationName: my_application
|
||||
|
||||
## PostgreSQL admin password (used when `postgresqlUsername` is not `postgres`)
|
||||
## ref: https://github.com/bitnami/bitnami-docker-postgresql/blob/master/README.md#creating-a-database-user-on-first-run (see note!)
|
||||
postgresqlPostgresPassword: {{ database_password }}
|
||||
|
||||
## PostgreSQL user (has superuser privileges if username is `postgres`)
|
||||
## ref: https://github.com/bitnami/bitnami-docker-postgresql/blob/master/README.md#setting-the-root-password-on-first-run
|
||||
postgresqlUsername: {{ database_login }}
|
||||
|
||||
## PostgreSQL password
|
||||
## ref: https://github.com/bitnami/bitnami-docker-postgresql/blob/master/README.md#setting-the-root-password-on-first-run
|
||||
##
|
||||
postgresqlPassword: {{ database_password }}
|
||||
|
||||
## PostgreSQL password using existing secret
|
||||
## existingSecret: secret
|
||||
|
||||
## Mount PostgreSQL secret as a file instead of passing environment variable
|
||||
# usePasswordFile: false
|
||||
|
||||
## Create a database
|
||||
## ref: https://github.com/bitnami/bitnami-docker-postgresql/blob/master/README.md#creating-a-database-on-first-run
|
||||
##
|
||||
postgresqlDatabase: {{ name }}
|
||||
|
||||
## PostgreSQL data dir
|
||||
## ref: https://github.com/bitnami/bitnami-docker-postgresql/blob/master/README.md
|
||||
##
|
||||
postgresqlDataDir: /bitnami/postgresql/data
|
||||
|
||||
## An array to add extra environment variables
|
||||
## For example:
|
||||
## extraEnv:
|
||||
## - name: FOO
|
||||
## value: "bar"
|
||||
##
|
||||
# extraEnv:
|
||||
extraEnv: []
|
||||
|
||||
## Name of a ConfigMap containing extra env vars
|
||||
##
|
||||
# extraEnvVarsCM:
|
||||
|
||||
## Specify extra initdb args
|
||||
## ref: https://github.com/bitnami/bitnami-docker-postgresql/blob/master/README.md
|
||||
##
|
||||
# postgresqlInitdbArgs:
|
||||
|
||||
## Specify a custom location for the PostgreSQL transaction log
|
||||
## ref: https://github.com/bitnami/bitnami-docker-postgresql/blob/master/README.md
|
||||
##
|
||||
# postgresqlInitdbWalDir:
|
||||
|
||||
## PostgreSQL configuration
|
||||
## Specify runtime configuration parameters as a dict, using camelCase, e.g.
|
||||
## {"sharedBuffers": "500MB"}
|
||||
## Alternatively, you can put your postgresql.conf under the files/ directory
|
||||
## ref: https://www.postgresql.org/docs/current/static/runtime-config.html
|
||||
##
|
||||
# postgresqlConfiguration:
|
||||
|
||||
## PostgreSQL extended configuration
|
||||
## As above, but _appended_ to the main configuration
|
||||
## Alternatively, you can put your *.conf under the files/conf.d/ directory
|
||||
## https://github.com/bitnami/bitnami-docker-postgresql#allow-settings-to-be-loaded-from-files-other-than-the-default-postgresqlconf
|
||||
##
|
||||
# postgresqlExtendedConf:
|
||||
|
||||
## PostgreSQL client authentication configuration
|
||||
## Specify content for pg_hba.conf
|
||||
## Default: do not create pg_hba.conf
|
||||
## Alternatively, you can put your pg_hba.conf under the files/ directory
|
||||
# pgHbaConfiguration: |-
|
||||
# local all all trust
|
||||
# host all all localhost trust
|
||||
# host mydatabase mysuser 192.168.0.0/24 md5
|
||||
|
||||
## ConfigMap with PostgreSQL configuration
|
||||
## NOTE: This will override postgresqlConfiguration and pgHbaConfiguration
|
||||
# configurationConfigMap:
|
||||
|
||||
## ConfigMap with PostgreSQL extended configuration
|
||||
# extendedConfConfigMap:
|
||||
|
||||
## initdb scripts
|
||||
## Specify dictionary of scripts to be run at first boot
|
||||
## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory
|
||||
##
|
||||
# initdbScripts:
|
||||
# my_init_script.sh: |
|
||||
# #!/bin/sh
|
||||
# echo "Do something."
|
||||
|
||||
## ConfigMap with scripts to be run at first boot
|
||||
## NOTE: This will override initdbScripts
|
||||
# initdbScriptsConfigMap:
|
||||
|
||||
## Secret with scripts to be run at first boot (in case it contains sensitive information)
|
||||
## NOTE: This can work along initdbScripts or initdbScriptsConfigMap
|
||||
# initdbScriptsSecret:
|
||||
|
||||
## Specify the PostgreSQL username and password to execute the initdb scripts
|
||||
initdbUser: postgres
|
||||
initdbPassword: {{ database_password }}
|
||||
|
||||
## Optional duration in seconds the pod needs to terminate gracefully.
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods
|
||||
##
|
||||
# terminationGracePeriodSeconds: 30
|
||||
|
||||
## LDAP configuration
|
||||
##
|
||||
ldap:
|
||||
enabled: false
|
||||
url: ""
|
||||
server: ""
|
||||
port: ""
|
||||
prefix: ""
|
||||
suffix: ""
|
||||
baseDN: ""
|
||||
bindDN: ""
|
||||
bind_password:
|
||||
search_attr: ""
|
||||
search_filter: ""
|
||||
scheme: ""
|
||||
tls: false
|
||||
|
||||
## PostgreSQL service configuration
|
||||
service:
|
||||
## PosgresSQL service type
|
||||
type: LoadBalancer
|
||||
# clusterIP: None
|
||||
port: 5432
|
||||
|
||||
## Specify the nodePort value for the LoadBalancer and NodePort service types.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
|
||||
##
|
||||
# nodePort:
|
||||
|
||||
## Provide any additional annotations which may be required. Evaluated as a template.
|
||||
##
|
||||
annotations:
|
||||
service.beta.kubernetes.io/do-loadbalancer-protocol: "tcp"
|
||||
service.beta.kubernetes.io/do-loadbalancer-size-slug: "lb-small"
|
||||
external-dns.alpha.kubernetes.io/hostname: "{{ fqdn }}"
|
||||
external-dns.alpha.kubernetes.io/ttl: "300"
|
||||
|
||||
## Set the LoadBalancer service type to internal only.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
##
|
||||
# loadBalancerIP:
|
||||
|
||||
## Load Balancer sources. Evaluated as a template.
|
||||
## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
|
||||
##
|
||||
# loadBalancerSourceRanges:
|
||||
# - 10.10.10.0/24
|
||||
|
||||
## Start master and slave(s) pod(s) without limitations on shm memory.
|
||||
## By default docker and containerd (and possibly other container runtimes)
|
||||
## limit `/dev/shm` to `64M` (see e.g. the
|
||||
## [docker issue](https://github.com/docker-library/postgres/issues/416) and the
|
||||
## [containerd issue](https://github.com/containerd/containerd/issues/3654),
|
||||
## which could be not enough if PostgreSQL uses parallel workers heavily.
|
||||
##
|
||||
shmVolume:
|
||||
## Set `shmVolume.enabled` to `true` to mount a new tmpfs volume to remove
|
||||
## this limitation.
|
||||
##
|
||||
enabled: true
|
||||
## Set to `true` to `chmod 777 /dev/shm` on a initContainer.
|
||||
## This option is ingored if `volumePermissions.enabled` is `false`
|
||||
##
|
||||
chmod:
|
||||
enabled: true
|
||||
|
||||
## PostgreSQL data Persistent Volume Storage Class
|
||||
## If defined, storageClassName: <storageClass>
|
||||
## If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||
## If undefined (the default) or set to null, no storageClassName spec is
|
||||
## set, choosing the default provisioner. (gp2 on AWS, standard on
|
||||
## GKE, AWS & OpenStack)
|
||||
##
|
||||
persistence:
|
||||
enabled: true
|
||||
## A manually managed Persistent Volume and Claim
|
||||
## If defined, PVC must be created manually before volume will be bound
|
||||
## The value is evaluated as a template, so, for example, the name can depend on .Release or .Chart
|
||||
##
|
||||
# existingClaim:
|
||||
|
||||
## The path the volume will be mounted at, useful when using different
|
||||
## PostgreSQL images.
|
||||
##
|
||||
mountPath: /bitnami/postgresql
|
||||
|
||||
## The subdirectory of the volume to mount to, useful in dev environments
|
||||
## and one PV for multiple services.
|
||||
##
|
||||
subPath: ""
|
||||
|
||||
storageClass: "do-block-storage"
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
size: {{ database_disk_size_in_gib }}Gi
|
||||
annotations:
|
||||
ownerId: {{ owner_id }}
|
||||
envId: {{ environment_id }}
|
||||
databaseId: {{ id }}
|
||||
databaseName: {{ name }}
|
||||
|
||||
## updateStrategy for PostgreSQL StatefulSet and its slaves StatefulSets
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies
|
||||
updateStrategy:
|
||||
type: RollingUpdate
|
||||
|
||||
##
|
||||
## PostgreSQL Master parameters
|
||||
##
|
||||
master:
|
||||
## Node, affinity, tolerations, and priorityclass settings for pod assignment
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#taints-and-tolerations-beta-feature
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption
|
||||
nodeSelector: {}
|
||||
affinity: {}
|
||||
tolerations: []
|
||||
labels:
|
||||
ownerId: {{ owner_id }}
|
||||
envId: {{ environment_id }}
|
||||
databaseId: {{ name }}
|
||||
annotations: {}
|
||||
podLabels: {}
|
||||
podAnnotations: {}
|
||||
priorityClassName: ""
|
||||
## Extra init containers
|
||||
## Example
|
||||
##
|
||||
## extraInitContainers:
|
||||
## - name: do-something
|
||||
## image: busybox
|
||||
## command: ['do', 'something']
|
||||
extraInitContainers: []
|
||||
|
||||
## Additional PostgreSQL Master Volume mounts
|
||||
##
|
||||
extraVolumeMounts: []
|
||||
## Additional PostgreSQL Master Volumes
|
||||
##
|
||||
extraVolumes: []
|
||||
## Add sidecars to the pod
|
||||
##
|
||||
## For example:
|
||||
## sidecars:
|
||||
## - name: your-image-name
|
||||
## image: your-image
|
||||
## imagePullPolicy: Always
|
||||
## ports:
|
||||
## - name: portname
|
||||
## containerPort: 1234
|
||||
sidecars: []
|
||||
|
||||
## Override the service configuration for master
|
||||
##
|
||||
service: {}
|
||||
# type:
|
||||
# nodePort:
|
||||
# clusterIP:
|
||||
|
||||
##
|
||||
## PostgreSQL Slave parameters
|
||||
##
|
||||
slave:
|
||||
## Node, affinity, tolerations, and priorityclass settings for pod assignment
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#taints-and-tolerations-beta-feature
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption
|
||||
nodeSelector: {}
|
||||
affinity: {}
|
||||
tolerations: []
|
||||
labels: {}
|
||||
annotations: {}
|
||||
podLabels: {}
|
||||
podAnnotations: {}
|
||||
priorityClassName: ""
|
||||
extraInitContainers: |
|
||||
# - name: do-something
|
||||
# image: busybox
|
||||
# command: ['do', 'something']
|
||||
## Additional PostgreSQL Slave Volume mounts
|
||||
##
|
||||
extraVolumeMounts: []
|
||||
## Additional PostgreSQL Slave Volumes
|
||||
##
|
||||
extraVolumes: []
|
||||
## Add sidecars to the pod
|
||||
##
|
||||
## For example:
|
||||
## sidecars:
|
||||
## - name: your-image-name
|
||||
## image: your-image
|
||||
## imagePullPolicy: Always
|
||||
## ports:
|
||||
## - name: portname
|
||||
## containerPort: 1234
|
||||
sidecars: []
|
||||
|
||||
## Override the service configuration for slave
|
||||
##
|
||||
service: {}
|
||||
# type:
|
||||
# nodePort:
|
||||
# clusterIP:
|
||||
|
||||
## Configure resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
requests:
|
||||
memory: "{{ database_ram_size_in_mib }}Mi" # TODO customizable?
|
||||
cpu: "{{ database_total_cpus }}"
|
||||
|
||||
## Add annotations to all the deployed resources
|
||||
##
|
||||
commonAnnotiations: {}
|
||||
|
||||
networkPolicy:
|
||||
## Enable creation of NetworkPolicy resources. Only Ingress traffic is filtered for now.
|
||||
##
|
||||
enabled: false
|
||||
|
||||
## The Policy model to apply. When set to false, only pods with the correct
|
||||
## client label will have network access to the port PostgreSQL is listening
|
||||
## on. When true, PostgreSQL will accept connections from any source
|
||||
## (with the correct destination port).
|
||||
##
|
||||
allowExternal: true
|
||||
|
||||
## if explicitNamespacesSelector is missing or set to {}, only client Pods that are in the networkPolicy's namespace
|
||||
## and that match other criteria, the ones that have the good label, can reach the DB.
|
||||
## But sometimes, we want the DB to be accessible to clients from other namespaces, in this case, we can use this
|
||||
## LabelSelector to select these namespaces, note that the networkPolicy's namespace should also be explicitly added.
|
||||
##
|
||||
## Example:
|
||||
## explicitNamespacesSelector:
|
||||
## matchLabels:
|
||||
## role: frontend
|
||||
## matchExpressions:
|
||||
## - {key: role, operator: In, values: [frontend]}
|
||||
explicitNamespacesSelector: {}
|
||||
|
||||
## Configure extra options for liveness and readiness probes
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes)
|
||||
livenessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 6
|
||||
successThreshold: 1
|
||||
|
||||
readinessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 6
|
||||
successThreshold: 1
|
||||
|
||||
## Configure metrics exporter
|
||||
##
|
||||
metrics:
|
||||
enabled: false
|
||||
# resources: {}
|
||||
service:
|
||||
type: ClusterIP
|
||||
annotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "9187"
|
||||
loadBalancerIP:
|
||||
serviceMonitor:
|
||||
enabled: false
|
||||
additionalLabels: {}
|
||||
# namespace: monitoring
|
||||
# interval: 30s
|
||||
# scrapeTimeout: 10s
|
||||
## Custom PrometheusRule to be defined
|
||||
## The value is evaluated as a template, so, for example, the value can depend on .Release or .Chart
|
||||
## ref: https://github.com/coreos/prometheus-operator#customresourcedefinitions
|
||||
prometheusRule:
|
||||
enabled: false
|
||||
additionalLabels: {}
|
||||
namespace: ""
|
||||
rules: []
|
||||
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/postgres-exporter
|
||||
tag: 0.8.0-debian-10-r116
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets.
|
||||
## Secrets must be manually created in the namespace.
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
## Define additional custom metrics
|
||||
## ref: https://github.com/wrouesnel/postgres_exporter#adding-new-metrics-via-a-config-file
|
||||
# customMetrics:
|
||||
# pg_database:
|
||||
# query: "SELECT d.datname AS name, CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') THEN pg_catalog.pg_database_size(d.datname) ELSE 0 END AS size FROM pg_catalog.pg_database d where datname not in ('template0', 'template1', 'postgres')"
|
||||
# metrics:
|
||||
# - name:
|
||||
# usage: "LABEL"
|
||||
# description: "Name of the database"
|
||||
# - size_bytes:
|
||||
# usage: "GAUGE"
|
||||
# description: "Size of the database in bytes"
|
||||
## Pod Security Context
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
|
||||
##
|
||||
securityContext:
|
||||
enabled: false
|
||||
runAsUser: 1001
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes)
|
||||
## Configure extra options for liveness and readiness probes
|
||||
livenessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 6
|
||||
successThreshold: 1
|
||||
|
||||
readinessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 6
|
||||
successThreshold: 1
|
||||
777
lib/digitalocean/chart_values/redis/values.j2.yaml
Normal file
777
lib/digitalocean/chart_values/redis/values.j2.yaml
Normal file
@@ -0,0 +1,777 @@
|
||||
## Global Docker image parameters
|
||||
## Please, note that this will override the image parameters, including dependencies, configured to use the global value
|
||||
## Current available global Docker image parameters: imageRegistry and imagePullSecrets
|
||||
##
|
||||
global:
|
||||
# imageRegistry: myRegistryName
|
||||
# imagePullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
# storageClass: myStorageClass
|
||||
redis: {}
|
||||
|
||||
## Bitnami Redis image version
|
||||
## ref: https://hub.docker.com/r/bitnami/redis/tags/
|
||||
##
|
||||
image:
|
||||
registry: quay.io
|
||||
repository: bitnami/redis
|
||||
## Bitnami Redis image tag
|
||||
## ref: https://github.com/bitnami/bitnami-docker-redis#supported-tags-and-respective-dockerfile-links
|
||||
##
|
||||
tag: "{{ version }}"
|
||||
## Specify a imagePullPolicy
|
||||
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
##
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets.
|
||||
## Secrets must be manually created in the namespace.
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
|
||||
## String to partially override redis.fullname template (will maintain the release name)
|
||||
##
|
||||
nameOverride: {{ name }}
|
||||
|
||||
## String to fully override redis.fullname template
|
||||
##
|
||||
fullnameOverride: {{ name }}
|
||||
|
||||
## Cluster settings
|
||||
cluster:
|
||||
enabled: false
|
||||
slaveCount: 3
|
||||
|
||||
## Use redis sentinel in the redis pod. This will disable the master and slave services and
|
||||
## create one redis service with ports to the sentinel and the redis instances
|
||||
sentinel:
|
||||
enabled: false
|
||||
## Require password authentication on the sentinel itself
|
||||
## ref: https://redis.io/topics/sentinel
|
||||
usePassword: true
|
||||
## Bitnami Redis Sentintel image version
|
||||
## ref: https://hub.docker.com/r/bitnami/redis-sentinel/tags/
|
||||
##
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/redis-sentinel
|
||||
## Bitnami Redis image tag
|
||||
## ref: https://github.com/bitnami/bitnami-docker-redis-sentinel#supported-tags-and-respective-dockerfile-links
|
||||
##
|
||||
tag: {{ version }}
|
||||
## Specify a imagePullPolicy
|
||||
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
##
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets.
|
||||
## Secrets must be manually created in the namespace.
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
masterSet: mymaster
|
||||
initialCheckTimeout: 5
|
||||
quorum: 2
|
||||
downAfterMilliseconds: 60000
|
||||
failoverTimeout: 18000
|
||||
parallelSyncs: 1
|
||||
port: 26379
|
||||
## Additional Redis configuration for the sentinel nodes
|
||||
## ref: https://redis.io/topics/config
|
||||
##
|
||||
configmap:
|
||||
## Enable or disable static sentinel IDs for each replicas
|
||||
## If disabled each sentinel will generate a random id at startup
|
||||
## If enabled, each replicas will have a constant ID on each start-up
|
||||
##
|
||||
staticID: false
|
||||
## Configure extra options for Redis Sentinel liveness and readiness probes
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes)
|
||||
##
|
||||
livenessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
timeoutSeconds: 5
|
||||
successThreshold: 1
|
||||
failureThreshold: 5
|
||||
readinessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
timeoutSeconds: 1
|
||||
successThreshold: 1
|
||||
failureThreshold: 5
|
||||
customLivenessProbe: {}
|
||||
customReadinessProbe: {}
|
||||
## Redis Sentinel resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
# resources:
|
||||
# requests:
|
||||
# memory: 256Mi
|
||||
# cpu: 100m
|
||||
## Redis Sentinel Service properties
|
||||
service:
|
||||
## Redis Sentinel Service type
|
||||
type: ClusterIP
|
||||
sentinelPort: 26379
|
||||
redisPort: 6379
|
||||
|
||||
## Specify the nodePort value for the LoadBalancer and NodePort service types.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
|
||||
##
|
||||
# sentinelNodePort:
|
||||
# redisNodePort:
|
||||
|
||||
## Provide any additional annotations which may be required. This can be used to
|
||||
## set the LoadBalancer service type to internal only.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
##
|
||||
annotations: {}
|
||||
labels: {}
|
||||
loadBalancerIP:
|
||||
|
||||
## Specifies the Kubernetes Cluster's Domain Name.
|
||||
##
|
||||
clusterDomain: cluster.local
|
||||
|
||||
networkPolicy:
|
||||
## Specifies whether a NetworkPolicy should be created
|
||||
##
|
||||
enabled: false
|
||||
|
||||
## The Policy model to apply. When set to false, only pods with the correct
|
||||
## client label will have network access to the port Redis is listening
|
||||
## on. When true, Redis will accept connections from any source
|
||||
## (with the correct destination port).
|
||||
##
|
||||
allowExternal: true
|
||||
|
||||
## Allow connections from other namespaces. Just set label for namespace and set label for pods (optional).
|
||||
##
|
||||
ingressNSMatchLabels: {}
|
||||
ingressNSPodMatchLabels: {}
|
||||
|
||||
serviceAccount:
|
||||
## Specifies whether a ServiceAccount should be created
|
||||
##
|
||||
create: false
|
||||
## The name of the ServiceAccount to use.
|
||||
## If not set and create is true, a name is generated using the fullname template
|
||||
name:
|
||||
|
||||
rbac:
|
||||
## Specifies whether RBAC resources should be created
|
||||
##
|
||||
create: true
|
||||
|
||||
role:
|
||||
## Rules to create. It follows the role specification
|
||||
# rules:
|
||||
# - apiGroups:
|
||||
# - extensions
|
||||
# resources:
|
||||
# - podsecuritypolicies
|
||||
# verbs:
|
||||
# - use
|
||||
# resourceNames:
|
||||
# - gce.unprivileged
|
||||
rules: []
|
||||
|
||||
## Redis pod Security Context
|
||||
securityContext:
|
||||
enabled: true
|
||||
fsGroup: 1001
|
||||
## sysctl settings for master and slave pods
|
||||
##
|
||||
## Uncomment the setting below to increase the net.core.somaxconn value
|
||||
##
|
||||
# sysctls:
|
||||
# - name: net.core.somaxconn
|
||||
# value: "10000"
|
||||
|
||||
## Container Security Context
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
|
||||
##
|
||||
containerSecurityContext:
|
||||
enabled: true
|
||||
runAsUser: 1001
|
||||
|
||||
## Use password authentication
|
||||
usePassword: true
|
||||
## Redis password (both master and slave)
|
||||
## Defaults to a random 10-character alphanumeric string if not set and usePassword is true
|
||||
## ref: https://github.com/bitnami/bitnami-docker-redis#setting-the-server-password-on-first-run
|
||||
##
|
||||
password: "{{ database_password }}"
|
||||
## Use existing secret (ignores previous password)
|
||||
# existingSecret:
|
||||
## Password key to be retrieved from Redis secret
|
||||
##
|
||||
# existingSecretPasswordKey:
|
||||
|
||||
## Mount secrets as files instead of environment variables
|
||||
usePasswordFile: false
|
||||
|
||||
## Persist data to a persistent volume (Redis Master)
|
||||
persistence:
|
||||
## A manually managed Persistent Volume and Claim
|
||||
## Requires persistence.enabled: true
|
||||
## If defined, PVC must be created manually before volume will be bound
|
||||
existingClaim:
|
||||
|
||||
# Redis port
|
||||
redisPort: 6379
|
||||
|
||||
##
|
||||
## TLS configuration
|
||||
##
|
||||
tls:
|
||||
# Enable TLS traffic
|
||||
enabled: false
|
||||
#
|
||||
# Whether to require clients to authenticate or not.
|
||||
authClients: true
|
||||
#
|
||||
# Name of the Secret that contains the certificates
|
||||
certificatesSecret:
|
||||
#
|
||||
# Certificate filename
|
||||
certFilename:
|
||||
#
|
||||
# Certificate Key filename
|
||||
certKeyFilename:
|
||||
#
|
||||
# CA Certificate filename
|
||||
certCAFilename:
|
||||
#
|
||||
# File containing DH params (in order to support DH based ciphers)
|
||||
# dhParamsFilename:
|
||||
|
||||
##
|
||||
## Redis Master parameters
|
||||
##
|
||||
master:
|
||||
## Redis command arguments
|
||||
##
|
||||
## Can be used to specify command line arguments, for example:
|
||||
## Note `exec` is prepended to command
|
||||
##
|
||||
command: "/run.sh"
|
||||
## Additional commands to run prior to starting Redis
|
||||
##
|
||||
preExecCmds: ""
|
||||
## Additional Redis configuration for the master nodes
|
||||
## ref: https://redis.io/topics/config
|
||||
##
|
||||
configmap:
|
||||
## Redis additional command line flags
|
||||
##
|
||||
## Can be used to specify command line flags, for example:
|
||||
## extraFlags:
|
||||
## - "--maxmemory-policy volatile-ttl"
|
||||
## - "--repl-backlog-size 1024mb"
|
||||
extraFlags: []
|
||||
## Comma-separated list of Redis commands to disable
|
||||
##
|
||||
## Can be used to disable Redis commands for security reasons.
|
||||
## Commands will be completely disabled by renaming each to an empty string.
|
||||
## ref: https://redis.io/topics/security#disabling-of-specific-commands
|
||||
##
|
||||
disableCommands:
|
||||
- FLUSHDB
|
||||
- FLUSHALL
|
||||
|
||||
## Redis Master additional pod labels and annotations
|
||||
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
|
||||
podLabels:
|
||||
ownerId: {{ owner_id }}
|
||||
envId: {{ environment_id }}
|
||||
databaseId: {{ id }}
|
||||
databaseName: {{ name }}
|
||||
podAnnotations: {}
|
||||
|
||||
## Redis Master resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
# resources:
|
||||
# requests:
|
||||
# memory: 256Mi
|
||||
# cpu: 100m
|
||||
## Use an alternate scheduler, e.g. "stork".
|
||||
## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
|
||||
##
|
||||
# schedulerName:
|
||||
|
||||
# Enable shared process namespace in a pod.
|
||||
# If set to false (default), each container will run in separate namespace, redis will have PID=1.
|
||||
# If set to true, the /pause will run as init process and will reap any zombie PIDs,
|
||||
# for example, generated by a custom exec probe running longer than a probe timeoutSeconds.
|
||||
# Enable this only if customLivenessProbe or customReadinessProbe is used and zombie PIDs are accumulating.
|
||||
# Ref: https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/
|
||||
shareProcessNamespace: false
|
||||
## Configure extra options for Redis Master liveness and readiness probes
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes)
|
||||
##
|
||||
livenessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
timeoutSeconds: 5
|
||||
successThreshold: 1
|
||||
failureThreshold: 5
|
||||
readinessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
timeoutSeconds: 1
|
||||
successThreshold: 1
|
||||
failureThreshold: 5
|
||||
|
||||
## Configure custom probes for images other images like
|
||||
## rhscl/redis-32-rhel7 rhscl/redis-5-rhel7
|
||||
## Only used if readinessProbe.enabled: false / livenessProbe.enabled: false
|
||||
##
|
||||
# customLivenessProbe:
|
||||
# tcpSocket:
|
||||
# port: 6379
|
||||
# initialDelaySeconds: 10
|
||||
# periodSeconds: 5
|
||||
# customReadinessProbe:
|
||||
# initialDelaySeconds: 30
|
||||
# periodSeconds: 10
|
||||
# timeoutSeconds: 5
|
||||
# exec:
|
||||
# command:
|
||||
# - "container-entrypoint"
|
||||
# - "bash"
|
||||
# - "-c"
|
||||
# - "redis-cli set liveness-probe \"`date`\" | grep OK"
|
||||
customLivenessProbe: {}
|
||||
customReadinessProbe: {}
|
||||
|
||||
## Redis Master Node selectors and tolerations for pod assignment
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#taints-and-tolerations-beta-feature
|
||||
##
|
||||
# nodeSelector: {"beta.kubernetes.io/arch": "amd64"}
|
||||
# tolerations: []
|
||||
## Redis Master pod/node affinity/anti-affinity
|
||||
##
|
||||
affinity: {}
|
||||
|
||||
## Redis Master Service properties
|
||||
service:
|
||||
## Redis Master Service type
|
||||
type: LoadBalancer
|
||||
port: 6379
|
||||
|
||||
## Specify the nodePort value for the LoadBalancer and NodePort service types.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
|
||||
##
|
||||
# nodePort:
|
||||
|
||||
## Provide any additional annotations which may be required. This can be used to
|
||||
## set the LoadBalancer service type to internal only.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
##
|
||||
annotations:
|
||||
service.beta.kubernetes.io/do-loadbalancer-protocol: "tcp"
|
||||
service.beta.kubernetes.io/do-loadbalancer-size-slug: "lb-small"
|
||||
external-dns.alpha.kubernetes.io/hostname: "{{ fqdn }}"
|
||||
external-dns.alpha.kubernetes.io/ttl: "300"
|
||||
labels: {}
|
||||
loadBalancerIP:
|
||||
# loadBalancerSourceRanges: ["10.0.0.0/8"]
|
||||
|
||||
## Enable persistence using Persistent Volume Claims
|
||||
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
|
||||
##
|
||||
persistence:
|
||||
enabled: true
|
||||
## The path the volume will be mounted at, useful when using different
|
||||
## Redis images.
|
||||
path: /data
|
||||
## The subdirectory of the volume to mount to, useful in dev environments
|
||||
## and one PV for multiple services.
|
||||
subPath: ""
|
||||
## redis data Persistent Volume Storage Class
|
||||
## If defined, storageClassName: <storageClass>
|
||||
## If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||
## If undefined (the default) or set to null, no storageClassName spec is
|
||||
## set, choosing the default provisioner. (gp2 on AWS, standard on
|
||||
## GKE, AWS & OpenStack)
|
||||
##
|
||||
storageClass: "do-block-storage"
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
size: {{ database_disk_size_in_gib }}Gi
|
||||
## Persistent Volume selectors
|
||||
## https://kubernetes.io/docs/concepts/storage/persistent-volumes/#selector
|
||||
matchLabels: {}
|
||||
matchExpressions: {}
|
||||
|
||||
## Update strategy, can be set to RollingUpdate or onDelete by default.
|
||||
## https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/#updating-statefulsets
|
||||
statefulset:
|
||||
labels: {}
|
||||
updateStrategy: RollingUpdate
|
||||
## Partition update strategy
|
||||
## https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#partitions
|
||||
# rollingUpdatePartition:
|
||||
|
||||
## Redis Master pod priorityClassName
|
||||
##
|
||||
priorityClassName: ''
|
||||
|
||||
## An array to add extra env vars
|
||||
## For example:
|
||||
## extraEnvVars:
|
||||
## - name: name
|
||||
## value: value
|
||||
## - name: other_name
|
||||
## valueFrom:
|
||||
## fieldRef:
|
||||
## fieldPath: fieldPath
|
||||
##
|
||||
extraEnvVars: []
|
||||
|
||||
## ConfigMap with extra env vars:
|
||||
##
|
||||
extraEnvVarsCM: []
|
||||
|
||||
## Secret with extra env vars:
|
||||
##
|
||||
extraEnvVarsSecret: []
|
||||
|
||||
##
|
||||
## Redis Slave properties
|
||||
## Note: service.type is a mandatory parameter
|
||||
## The rest of the parameters are either optional or, if undefined, will inherit those declared in Redis Master
|
||||
##
|
||||
slave:
|
||||
## Slave Service properties
|
||||
service:
|
||||
## Redis Slave Service type
|
||||
type: ClusterIP
|
||||
## Redis port
|
||||
port: 6379
|
||||
## Specify the nodePort value for the LoadBalancer and NodePort service types.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
|
||||
##
|
||||
# nodePort:
|
||||
|
||||
## Provide any additional annotations which may be required. This can be used to
|
||||
## set the LoadBalancer service type to internal only.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
##
|
||||
annotations: {}
|
||||
labels: {}
|
||||
loadBalancerIP:
|
||||
# loadBalancerSourceRanges: ["10.0.0.0/8"]
|
||||
|
||||
## Redis slave port
|
||||
port: 6379
|
||||
## Can be used to specify command line arguments, for example:
|
||||
## Note `exec` is prepended to command
|
||||
##
|
||||
command: "/run.sh"
|
||||
## Additional commands to run prior to starting Redis
|
||||
##
|
||||
preExecCmds: ""
|
||||
## Additional Redis configuration for the slave nodes
|
||||
## ref: https://redis.io/topics/config
|
||||
##
|
||||
configmap:
|
||||
## Redis extra flags
|
||||
extraFlags: []
|
||||
## List of Redis commands to disable
|
||||
disableCommands:
|
||||
- FLUSHDB
|
||||
- FLUSHALL
|
||||
|
||||
## Redis Slave pod/node affinity/anti-affinity
|
||||
##
|
||||
affinity: {}
|
||||
|
||||
## Kubernetes Spread Constraints for pod assignment
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/
|
||||
##
|
||||
# - maxSkew: 1
|
||||
# topologyKey: node
|
||||
# whenUnsatisfiable: DoNotSchedule
|
||||
spreadConstraints: {}
|
||||
|
||||
# Enable shared process namespace in a pod.
|
||||
# If set to false (default), each container will run in separate namespace, redis will have PID=1.
|
||||
# If set to true, the /pause will run as init process and will reap any zombie PIDs,
|
||||
# for example, generated by a custom exec probe running longer than a probe timeoutSeconds.
|
||||
# Enable this only if customLivenessProbe or customReadinessProbe is used and zombie PIDs are accumulating.
|
||||
# Ref: https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/
|
||||
shareProcessNamespace: false
|
||||
## Configure extra options for Redis Slave liveness and readiness probes
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes)
|
||||
##
|
||||
livenessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
successThreshold: 1
|
||||
failureThreshold: 5
|
||||
readinessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 10
|
||||
successThreshold: 1
|
||||
failureThreshold: 5
|
||||
|
||||
## Configure custom probes for images other images like
|
||||
## rhscl/redis-32-rhel7 rhscl/redis-5-rhel7
|
||||
## Only used if readinessProbe.enabled: false / livenessProbe.enabled: false
|
||||
##
|
||||
# customLivenessProbe:
|
||||
# tcpSocket:
|
||||
# port: 6379
|
||||
# initialDelaySeconds: 10
|
||||
# periodSeconds: 5
|
||||
# customReadinessProbe:
|
||||
# initialDelaySeconds: 30
|
||||
# periodSeconds: 10
|
||||
# timeoutSeconds: 5
|
||||
# exec:
|
||||
# command:
|
||||
# - "container-entrypoint"
|
||||
# - "bash"
|
||||
# - "-c"
|
||||
# - "redis-cli set liveness-probe \"`date`\" | grep OK"
|
||||
customLivenessProbe: {}
|
||||
customReadinessProbe: {}
|
||||
|
||||
## Redis slave Resource
|
||||
# resources:
|
||||
# requests:
|
||||
# memory: 256Mi
|
||||
# cpu: 100m
|
||||
|
||||
## Redis slave selectors and tolerations for pod assignment
|
||||
# nodeSelector: {"beta.kubernetes.io/arch": "amd64"}
|
||||
# tolerations: []
|
||||
|
||||
## Use an alternate scheduler, e.g. "stork".
|
||||
## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
|
||||
##
|
||||
# schedulerName:
|
||||
|
||||
## Redis slave pod Annotation and Labels
|
||||
podLabels: {}
|
||||
podAnnotations: {}
|
||||
|
||||
## Redis slave pod priorityClassName
|
||||
# priorityClassName: ''
|
||||
|
||||
## Enable persistence using Persistent Volume Claims
|
||||
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
|
||||
##
|
||||
persistence:
|
||||
enabled: true
|
||||
## The path the volume will be mounted at, useful when using different
|
||||
## Redis images.
|
||||
path: /data
|
||||
## The subdirectory of the volume to mount to, useful in dev environments
|
||||
## and one PV for multiple services.
|
||||
subPath: ""
|
||||
## redis data Persistent Volume Storage Class
|
||||
## If defined, storageClassName: <storageClass>
|
||||
## If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||
## If undefined (the default) or set to null, no storageClassName spec is
|
||||
## set, choosing the default provisioner. (gp2 on AWS, standard on
|
||||
## GKE, AWS & OpenStack)
|
||||
##
|
||||
# storageClass: "-"
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
size: 8Gi
|
||||
## Persistent Volume selectors
|
||||
## https://kubernetes.io/docs/concepts/storage/persistent-volumes/#selector
|
||||
matchLabels: {}
|
||||
matchExpressions: {}
|
||||
|
||||
## Update strategy, can be set to RollingUpdate or onDelete by default.
|
||||
## https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/#updating-statefulsets
|
||||
statefulset:
|
||||
labels: {}
|
||||
updateStrategy: RollingUpdate
|
||||
## Partition update strategy
|
||||
## https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#partitions
|
||||
# rollingUpdatePartition:
|
||||
|
||||
## An array to add extra env vars
|
||||
## For example:
|
||||
## extraEnvVars:
|
||||
## - name: name
|
||||
## value: value
|
||||
## - name: other_name
|
||||
## valueFrom:
|
||||
## fieldRef:
|
||||
## fieldPath: fieldPath
|
||||
##
|
||||
extraEnvVars: []
|
||||
|
||||
## ConfigMap with extra env vars:
|
||||
##
|
||||
extraEnvVarsCM: []
|
||||
|
||||
## Secret with extra env vars:
|
||||
##
|
||||
extraEnvVarsSecret: []
|
||||
|
||||
## Prometheus Exporter / Metrics
|
||||
##
|
||||
metrics:
|
||||
enabled: false
|
||||
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/redis-exporter
|
||||
tag: 1.13.1-debian-10-r6
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets.
|
||||
## Secrets must be manually created in the namespace.
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
|
||||
## Metrics exporter resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
# resources: {}
|
||||
|
||||
## Extra arguments for Metrics exporter, for example:
|
||||
## extraArgs:
|
||||
## check-keys: myKey,myOtherKey
|
||||
# extraArgs: {}
|
||||
|
||||
## Metrics exporter pod Annotation and Labels
|
||||
podAnnotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "9121"
|
||||
# podLabels: {}
|
||||
|
||||
# Enable this if you're using https://github.com/coreos/prometheus-operator
|
||||
serviceMonitor:
|
||||
enabled: false
|
||||
## Specify a namespace if needed
|
||||
# namespace: monitoring
|
||||
# fallback to the prometheus default unless specified
|
||||
# interval: 10s
|
||||
## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#tldr)
|
||||
## [Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-operator-1)
|
||||
## [Kube Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#exporters)
|
||||
selector:
|
||||
prometheus: kube-prometheus
|
||||
|
||||
## Custom PrometheusRule to be defined
|
||||
## The value is evaluated as a template, so, for example, the value can depend on .Release or .Chart
|
||||
## ref: https://github.com/coreos/prometheus-operator#customresourcedefinitions
|
||||
prometheusRule:
|
||||
enabled: false
|
||||
additionalLabels: {}
|
||||
namespace: ""
|
||||
rules: []
|
||||
|
||||
## Metrics exporter pod priorityClassName
|
||||
# priorityClassName: ''
|
||||
service:
|
||||
type: ClusterIP
|
||||
## Use serviceLoadBalancerIP to request a specific static IP,
|
||||
## otherwise leave blank
|
||||
# loadBalancerIP:
|
||||
annotations: {}
|
||||
labels: {}
|
||||
|
||||
##
|
||||
## Init containers parameters:
|
||||
## volumePermissions: Change the owner of the persist volume mountpoint to RunAsUser:fsGroup
|
||||
##
|
||||
volumePermissions:
|
||||
enabled: true
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/minideb
|
||||
tag: buster
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets.
|
||||
## Secrets must be manually created in the namespace.
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
resources: {}
|
||||
# resources:
|
||||
# requests:
|
||||
# memory: 128Mi
|
||||
# cpu: 100m
|
||||
|
||||
## Init container Security Context
|
||||
## Note: the chown of the data folder is done to containerSecurityContext.runAsUser
|
||||
## and not the below volumePermissions.securityContext.runAsUser
|
||||
## When runAsUser is set to special value "auto", init container will try to chwon the
|
||||
## data folder to autodetermined user&group, using commands: `id -u`:`id -G | cut -d" " -f2`
|
||||
## "auto" is especially useful for OpenShift which has scc with dynamic userids (and 0 is not allowed).
|
||||
## You may want to use this volumePermissions.securityContext.runAsUser="auto" in combination with
|
||||
## podSecurityContext.enabled=false,containerSecurityContext.enabled=false
|
||||
##
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
|
||||
## Redis config file
|
||||
## ref: https://redis.io/topics/config
|
||||
##
|
||||
configmap: |-
|
||||
# Enable AOF https://redis.io/topics/persistence#append-only-file
|
||||
appendonly yes
|
||||
# Disable RDB persistence, AOF persistence already enabled.
|
||||
save ""
|
||||
|
||||
## Sysctl InitContainer
|
||||
## used to perform sysctl operation to modify Kernel settings (needed sometimes to avoid warnings)
|
||||
sysctlImage:
|
||||
enabled: false
|
||||
command: []
|
||||
registry: docker.io
|
||||
repository: bitnami/minideb
|
||||
tag: buster
|
||||
pullPolicy: Always
|
||||
## Optionally specify an array of imagePullSecrets.
|
||||
## Secrets must be manually created in the namespace.
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
mountHostSys: false
|
||||
resources: {}
|
||||
# resources:
|
||||
# requests:
|
||||
# memory: 128Mi
|
||||
# cpu: 100m
|
||||
|
||||
## PodSecurityPolicy configuration
|
||||
## ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/
|
||||
##
|
||||
podSecurityPolicy:
|
||||
## Specifies whether a PodSecurityPolicy should be created
|
||||
##
|
||||
create: false
|
||||
|
||||
## Define a disruption budget
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/pods/disruptions/
|
||||
##
|
||||
podDisruptionBudget:
|
||||
enabled: false
|
||||
minAvailable: 1
|
||||
# maxUnavailable: 1
|
||||
@@ -0,0 +1,121 @@
|
||||
{%- if is_storage %}
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: {{ name }}
|
||||
namespace: {{ namespace }}
|
||||
labels:
|
||||
ownerId: {{ owner_id }}
|
||||
envId: {{ environment_id }}
|
||||
appId: {{ id }}
|
||||
app: {{ name }}
|
||||
spec:
|
||||
replicas: {{ total_instances }}
|
||||
serviceName: {{ name }}
|
||||
selector:
|
||||
matchLabels:
|
||||
ownerId: {{ owner_id }}
|
||||
envId: {{ environment_id }}
|
||||
appId: {{ id }}
|
||||
app: {{ name }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
ownerId: {{ owner_id }}
|
||||
envId: {{ environment_id }}
|
||||
appId: {{ id }}
|
||||
app: {{ name }}
|
||||
spec:
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
- labelSelector:
|
||||
matchExpressions:
|
||||
- key: "app"
|
||||
operator: In
|
||||
values:
|
||||
- {{ name }}
|
||||
topologyKey: "kubernetes.io/hostname"
|
||||
automountServiceAccountToken: false
|
||||
terminationGracePeriodSeconds: 60
|
||||
securityContext: {}
|
||||
containers:
|
||||
- name: {{ name }}
|
||||
image: "{{ image_name_with_tag }}"
|
||||
env:
|
||||
{%- for ev in environment_variables %}
|
||||
- name: "{{ ev.key }}"
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ name }}
|
||||
key: {{ ev.key }}
|
||||
{%- endfor %}
|
||||
{%- if private_port %}
|
||||
ports:
|
||||
- containerPort: {{ private_port }}
|
||||
protocol: TCP
|
||||
readinessProbe:
|
||||
tcpSocket:
|
||||
port: {{ private_port }}
|
||||
initialDelaySeconds: {{ start_timeout_in_seconds }}
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: {{ private_port }}
|
||||
initialDelaySeconds: {{ start_timeout_in_seconds }}
|
||||
periodSeconds: 20
|
||||
{%- endif %}
|
||||
resources:
|
||||
limits:
|
||||
cpu: {{ total_cpus }}
|
||||
memory: {{ total_ram_in_mib }}Mi
|
||||
requests:
|
||||
cpu: {{ total_cpus }}
|
||||
memory: {{ total_ram_in_mib }}Mi
|
||||
volumeMounts:
|
||||
{%- for s in storage %}
|
||||
- name: {{ s.id }}
|
||||
mountPath: {{ s.mount_point }}
|
||||
{%- endfor %}
|
||||
volumeClaimTemplates:
|
||||
{%- for s in storage %}
|
||||
{% if clone %}
|
||||
- metadata:
|
||||
name: {{ s.id }}
|
||||
labels:
|
||||
ownerId: {{ owner_id }}
|
||||
envId: {{ environment_id }}
|
||||
appId: {{ id }}
|
||||
app: {{ name }}
|
||||
diskId: {{ s.id }}
|
||||
diskType: {{ s.storage_type }}
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: {{ s.storage_type }}
|
||||
dataSource:
|
||||
name: {{ s.id }}
|
||||
kind: PersistentVolumeClaim
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ disk.size_in_gib }}Gi
|
||||
{% else %}
|
||||
- metadata:
|
||||
name: {{ s.id }}
|
||||
labels:
|
||||
ownerId: {{ owner_id }}
|
||||
envId: {{ environment_id }}
|
||||
appId: {{ id }}
|
||||
diskId: {{ s.id }}
|
||||
diskType: {{ s.storage_type }}
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: {{ s.storage_type }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ s.size_in_gib }}Gi
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- endif %}
|
||||
|
||||
@@ -224,10 +224,7 @@ impl Helm for MongoDB {
|
||||
}
|
||||
|
||||
fn helm_chart_values_dir(&self) -> String {
|
||||
format!(
|
||||
"{}/common/chart_values/mongodb",
|
||||
self.context.lib_root_dir()
|
||||
)
|
||||
format!("{}/aws/chart_values/mongodb", self.context.lib_root_dir())
|
||||
}
|
||||
|
||||
fn helm_chart_external_name_service_dir(&self) -> String {
|
||||
|
||||
@@ -228,7 +228,7 @@ impl Helm for MySQL {
|
||||
}
|
||||
|
||||
fn helm_chart_values_dir(&self) -> String {
|
||||
format!("{}/common/chart_values/mysql", self.context.lib_root_dir())
|
||||
format!("{}/aws/chart_values/mysql", self.context.lib_root_dir())
|
||||
}
|
||||
|
||||
fn helm_chart_external_name_service_dir(&self) -> String {
|
||||
|
||||
@@ -230,7 +230,7 @@ impl Helm for PostgreSQL {
|
||||
|
||||
fn helm_chart_values_dir(&self) -> String {
|
||||
format!(
|
||||
"{}/common/chart_values/postgresql",
|
||||
"{}/aws/chart_values/postgresql",
|
||||
self.context.lib_root_dir()
|
||||
)
|
||||
}
|
||||
|
||||
@@ -240,7 +240,7 @@ impl Helm for Redis {
|
||||
}
|
||||
|
||||
fn helm_chart_values_dir(&self) -> String {
|
||||
format!("{}/common/chart_values/redis", self.context.lib_root_dir())
|
||||
format!("{}/aws/chart_values/redis", self.context.lib_root_dir())
|
||||
}
|
||||
|
||||
fn helm_chart_external_name_service_dir(&self) -> String {
|
||||
|
||||
@@ -4,7 +4,7 @@ use crate::build_platform::Image;
|
||||
use crate::cloud_provider::digitalocean::common::get_uuid_of_cluster_from_name;
|
||||
use crate::cloud_provider::digitalocean::DO;
|
||||
use crate::cloud_provider::models::{
|
||||
EnvironmentVariable, EnvironmentVariableDataTemplate, Storage,
|
||||
EnvironmentVariable, EnvironmentVariableDataTemplate, Storage, StorageDataTemplate,
|
||||
};
|
||||
use crate::cloud_provider::service::{
|
||||
default_tera_context, delete_stateless_service, deploy_stateless_service_error,
|
||||
@@ -16,7 +16,9 @@ use crate::cmd::helm::Timeout;
|
||||
use crate::container_registry::docr::{
|
||||
get_current_registry_name, subscribe_kube_cluster_to_container_registry,
|
||||
};
|
||||
use crate::error::{EngineError, EngineErrorCause, EngineErrorScope};
|
||||
use crate::error::{
|
||||
cast_simple_error_to_engine_error, EngineError, EngineErrorCause, EngineErrorScope,
|
||||
};
|
||||
use crate::models::Context;
|
||||
|
||||
pub struct Application {
|
||||
@@ -185,16 +187,33 @@ impl Service for Application {
|
||||
.downcast_ref::<DO>()
|
||||
.unwrap();
|
||||
|
||||
let current_registry_name = get_current_registry_name(&digitalocean.token);
|
||||
match current_registry_name {
|
||||
Ok(registry_name) => context.insert("registry_name", ®istry_name),
|
||||
Err(err) => {
|
||||
error!("Unable to get the registry name !");
|
||||
return Err(self.engine_error(EngineErrorCause::Internal, format!("{:?}", err)));
|
||||
}
|
||||
}
|
||||
let registry_name = cast_simple_error_to_engine_error(
|
||||
self.engine_error_scope(),
|
||||
self.context.execution_id(),
|
||||
get_current_registry_name(&digitalocean.token),
|
||||
)?;
|
||||
|
||||
let is_storage = self.storage.len() > 0;
|
||||
context.insert("registry_name", ®istry_name);
|
||||
|
||||
let storage = self
|
||||
.storage
|
||||
.iter()
|
||||
.map(|s| StorageDataTemplate {
|
||||
id: s.id.clone(),
|
||||
name: s.name.clone(),
|
||||
storage_type: match s.storage_type {
|
||||
StorageType::Standard => "do-block-storage",
|
||||
}
|
||||
.to_string(),
|
||||
size_in_gib: s.size_in_gib,
|
||||
mount_point: s.mount_point.clone(),
|
||||
snapshot_retention_in_days: s.snapshot_retention_in_days,
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
let is_storage = storage.len() > 0;
|
||||
|
||||
context.insert("storage", &storage);
|
||||
context.insert("is_storage", &is_storage);
|
||||
|
||||
context.insert("clone", &false);
|
||||
|
||||
@@ -225,7 +225,7 @@ impl Helm for PostgreSQL {
|
||||
|
||||
fn helm_chart_values_dir(&self) -> String {
|
||||
format!(
|
||||
"{}/common/chart_values/postgresql",
|
||||
"{}/digitalocean/chart_values/postgresql",
|
||||
self.context.lib_root_dir()
|
||||
)
|
||||
}
|
||||
|
||||
@@ -216,6 +216,10 @@ impl Application {
|
||||
self.total_instances,
|
||||
self.start_timeout_in_seconds,
|
||||
image.clone(),
|
||||
self.storage
|
||||
.iter()
|
||||
.map(|s| s.to_do_storage())
|
||||
.collect::<Vec<_>>(),
|
||||
environment_variables,
|
||||
),
|
||||
)),
|
||||
@@ -268,6 +272,10 @@ impl Application {
|
||||
self.total_instances,
|
||||
self.start_timeout_in_seconds,
|
||||
image,
|
||||
self.storage
|
||||
.iter()
|
||||
.map(|s| s.to_do_storage())
|
||||
.collect::<Vec<_>>(),
|
||||
environment_variables,
|
||||
),
|
||||
)),
|
||||
@@ -373,6 +381,23 @@ impl Storage {
|
||||
snapshot_retention_in_days: self.snapshot_retention_in_days,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn to_do_storage(
|
||||
&self,
|
||||
) -> crate::cloud_provider::models::Storage<
|
||||
crate::cloud_provider::digitalocean::application::StorageType,
|
||||
> {
|
||||
crate::cloud_provider::models::Storage {
|
||||
id: self.id.clone(),
|
||||
name: self.name.clone(),
|
||||
storage_type: match self.storage_type {
|
||||
_ => crate::cloud_provider::digitalocean::application::StorageType::Standard,
|
||||
},
|
||||
size_in_gib: self.size_in_gib,
|
||||
mount_point: self.mount_point.clone(),
|
||||
snapshot_retention_in_days: self.snapshot_retention_in_days,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Clone, Eq, PartialEq, Hash)]
|
||||
|
||||
Reference in New Issue
Block a user