## @section Global parameters ## 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, imagePullSecrets and storageClass ## @param global.imageRegistry Global Docker image registry ## @param global.imagePullSecrets Global Docker registry secret names as an array ## @param global.storageClass Global StorageClass for Persistent Volume(s) ## global: imageRegistry: "" ## E.g. ## imagePullSecrets: ## - myRegistryKeySecretName ## imagePullSecrets: [] storageClass: "local-path" ## @section Common parameters ## @param nameOverride String to partially override common.names.fullname template (will maintain the release name) ## nameOverride: "" ## @param fullnameOverride String to fully override common.names.fullname template ## fullnameOverride: "" ## @param namespaceOverride String to fully override common.names.namespace ## namespaceOverride: "" ## @param clusterDomain Cluster domain ## clusterDomain: cluster.local ## @param commonAnnotations Common annotations to add to all MSSQL resources (sub-charts are not considered). Evaluated as a template ## commonAnnotations: {} ## @param commonLabels Common labels to add to all MSSQL resources (sub-charts are not considered). Evaluated as a template ## commonLabels: {} ## @section MSSQL common parameters ## MSSQL image ## ref: https://hub.docker.com/_/microsoft-mssql-server ## @param image.registry MSSQL image registry ## @param image.repository MSSQL image repository ## @param image.tag MSSQL image tag (immutable tags are recommended) ## @param image.digest MSSQL image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag ## @param image.pullPolicy MSSQL image pull policy ## @param image.pullSecrets Specify docker-registry secret names as an array ## @param image.debug Specify if debug logs should be enabled ## image: registry: registry.gitlab.com repository: xrow-public/helm-mssql/mssql # @param image.tag MSSQL image tag https://hub.docker.com/_/microsoft-mssql-server#Full%20Tag%20Listing ## GA = General Availability - when the version is officially available and supported. ## CU = Cumulative Update - a periodic release that includes bug fixes, security fixes, and occasionally a small feature. ## CTP = Community Technology Preview - a preview release that precedes the GA of an upcoming new version. ## GDR = General Distribution Release - a release that contains ONLY security fixes. tag: 1.1.3 digest: "" ## Specify a imagePullPolicy ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' ## ref: https://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/ ## Example: ## pullSecrets: ## - myRegistryKeySecretName ## pullSecrets: [] ## Set to true if you would like to see extra information on logs ## It turns BASH and/or NAMI debugging in the image ## debug: false ## @param architecture MSSQL architecture (`standalone` or `replication`) ## ( `replication` is on the roadmap) architecture: standalone ## @param edition MSSQL edition : ## Developer : This will run the container using the Developer Edition (this is the default if no MSSQL_PID environment variable is supplied) ## Express : This will run the container using the Express Edition ## Standard : This will run the container using the Standard Edition ## Enterprise : This will run the container using the Enterprise Edition ## EnterpriseCore : This will run the container using the Enterprise Edition Core ## Product ID: This will run the container with the edition that is associated with the PID edition: Express ## MSSQL Authentication parameters ## auth: ## @param auth.rootPassword Password for the `root` user. Ignored if existing secret is provided ## ref: https://github.com/bitnami/containers/tree/main/bitnami/mssql#setting-the-root-password-on-first-run ## rootPassword: "" ## @param auth.createDatabase Wheter to create the .Values.auth.database or not ## ref: https://github.com/bitnami/containers/tree/main/bitnami/mssql#creating-a-database-on-first-run ## createDatabase: true ## @param auth.database Name for a custom database to create ## ref: https://github.com/bitnami/containers/tree/main/bitnami/mssql#creating-a-database-on-first-run ## database: "database" ## @param auth.databaseCollate COLLATE for a custom database to create ## examples: Latin1_General_CI_AS databaseCollate: Latin1_General_CI_AS ## @param auth.username Name for a custom user to create on master db as well as in [.Values.auth.database] ## ref: https://github.com/bitnami/containers/tree/main/bitnami/mssql#creating-a-database-user-on-first-run ## username: "" ## @param auth.password Password for the new user. Ignored if existing secret is provided ## password: "" ## @param auth.replicationUser MSSQL replication user ## ref: https://github.com/bitnami/containers/tree/main/bitnami/mssql#setting-up-a-replication-cluster ## ## @param auth.createLogin ## if Yes, the .Values.auth.username is a local user.. ## IF No, the .Values.auth.username is a domain user ## If .Values.auth.username not defined, .this param has no effect ## ref: https://github.com/bitnami/containers/tree/main/bitnami/mssql#creating-a-database-user-on-first-run ## createLogin: true replicationUser: replicator ## @param auth.replicationPassword MSSQL replication user password. Ignored if existing secret is provided ## replicationPassword: "" ## @param auth.existingSecret Use existing secret for password details. The secret has to contain the keys `mssql-root-password`, `mssql-replication-password` and `mssql-password` ## NOTE: When it's set the auth.rootPassword, auth.password, auth.replicationPassword are ignored. ## existingSecret: "" ## @section MSSQL Primary parameters primary: ## @param primary.name Name of the primary database (eg primary, master, leader, ...) ## name: primary lifecycleHooks: {} ## @param primary.hostAliases Deployment pod host aliases ## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/ ## hostAliases: [] ## @param primary.existingConfigmap Name of existing ConfigMap with MSSQL Primary configuration. ## NOTE: When it's set the 'configuration' parameter is ignored ## existingConfigmap: "" ## @param primary.updateStrategy.type Update strategy type for the MSSQL primary statefulset ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies ## updateStrategy: type: RollingUpdate ## @param primary.podAnnotations Additional pod annotations for MSSQL primary pods ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ ## podAnnotations: {} ## @param primary.podAffinityPreset MSSQL primary pod affinity preset. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard` ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity ## podAffinityPreset: "" ## @param primary.podAntiAffinityPreset MSSQL primary pod anti-affinity preset. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard` ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity ## podAntiAffinityPreset: soft ## MSSQL Primary node affinity preset ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity ## nodeAffinityPreset: ## @param primary.nodeAffinityPreset.type MSSQL primary node affinity preset type. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard` ## type: "" ## @param primary.nodeAffinityPreset.key MSSQL primary node label key to match Ignored if `primary.affinity` is set. ## E.g. ## key: "kubernetes.io/e2e-az-name" ## key: "" ## @param primary.nodeAffinityPreset.values MSSQL primary node label values to match. Ignored if `primary.affinity` is set. ## E.g. ## values: ## - e2e-az1 ## - e2e-az2 ## values: [] ## @param primary.affinity Affinity for MSSQL primary pods assignment ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity ## Note: podAffinityPreset, podAntiAffinityPreset, and nodeAffinityPreset will be ignored when it's set ## affinity: {} ## @param primary.nodeSelector Node labels for MSSQL primary pods assignment ## ref: https://kubernetes.io/docs/user-guide/node-selection/ ## nodeSelector: kubernetes.io/os: linux ## @param primary.tolerations Tolerations for MSSQL primary pods assignment ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ ## tolerations: [] ## @param primary.priorityClassName MSSQL primary pods' priorityClassName ## priorityClassName: "" ## @param primary.schedulerName Name of the k8s scheduler (other than default) ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ ## schedulerName: "" ## @param primary.terminationGracePeriodSeconds In seconds, time the given to the MSSQL primary pod needs to terminate gracefully ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods ## terminationGracePeriodSeconds: "" ## @param primary.topologySpreadConstraints Topology Spread Constraints for pod assignment ## https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ ## The value is evaluated as a template ## topologySpreadConstraints: [] ## @param primary.podManagementPolicy podManagementPolicy to manage scaling operation of MSSQL primary pods ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#pod-management-policies ## podManagementPolicy: "" ## MSSQL primary Pod security context ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod ## @param primary.podSecurityContext.enabled Enable security context for MSSQL primary pods ## @param primary.podSecurityContext.fsGroup Group ID for the mounted volumes' filesystem ## podSecurityContext: enabled: true fsGroup: 1001 ## MSSQL primary container security context ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container ## @param primary.containerSecurityContext.enabled MSSQL primary container securityContext ## @param primary.containerSecurityContext.runAsUser User ID for the MSSQL primary container ## @param primary.containerSecurityContext.runAsNonRoot Set MSSQL primary container's Security Context runAsNonRoot ## containerSecurityContext: enabled: true runAsUser: 1001 runAsNonRoot: true resources: requests: memory: "2G" cpu: "2000m" limits: memory: "4G" livenessProbe: enabled: false initialDelaySeconds: 5 periodSeconds: 10 timeoutSeconds: 1 failureThreshold: 3 successThreshold: 1 readinessProbe: enabled: false initialDelaySeconds: 5 periodSeconds: 10 timeoutSeconds: 1 failureThreshold: 3 successThreshold: 1 ## Configure extra options for startupProbe probe ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes ## @param primary.startupProbe.enabled Enable startupProbe ## @param primary.startupProbe.initialDelaySeconds Initial delay seconds for startupProbe ## @param primary.startupProbe.periodSeconds Period seconds for startupProbe ## @param primary.startupProbe.timeoutSeconds Timeout seconds for startupProbe ## @param primary.startupProbe.failureThreshold Failure threshold for startupProbe ## @param primary.startupProbe.successThreshold Success threshold for startupProbe ## startupProbe: enabled: false initialDelaySeconds: 30 periodSeconds: 10 timeoutSeconds: 1 failureThreshold: 10 successThreshold: 1 ## @param primary.extraFlags MSSQL primary additional command line flags ## Can be used to specify command line flags, for example: ## E.g. ## extraFlags: "--max-connect-errors=1000 --max_connections=155" ## extraFlags: "" ## @param primary.extraEnvVars Extra environment variables to be set on MSSQL primary containers ## E.g. ## extraEnvVars: ## - name: TZ ## value: "Europe/Paris" ## extraEnvVars: [] ## @param primary.extraEnvVarsCM Name of existing ConfigMap containing extra env vars for MSSQL primary containers ## extraEnvVarsCM: "" ## @param primary.extraEnvVarsSecret Name of existing Secret containing extra env vars for MSSQL primary containers ## extraEnvVarsSecret: "" ## Enable persistence using Persistent Volume Claims ## ref: https://kubernetes.io/docs/user-guide/persistent-volumes/ ## persistence: ## @param primary.persistence.enabled Enable persistence on MSSQL primary replicas using a `PersistentVolumeClaim`. If false, use emptyDir ## enabled: true ## @param primary.persistence.mount Path of Data inside container ## mount: /var/opt/mssql ## @param primary.persistence.existingClaim Name of an existing `PersistentVolumeClaim` for MSSQL primary replicas ## NOTE: When it's set the rest of persistence parameters are ignored ## existingClaim: "" ## @param primary.persistence.storageClass MSSQL primary persistent volume storage Class ## If defined, storageClassName: ## 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: "local-path" ## @param primary.persistence.annotations MSSQL primary persistent volume claim annotations ## annotations: {} ## @param primary.persistence.accessModes MSSQL primary persistent volume access Modes ## accessModes: - ReadWriteOnce ## @param primary.persistence.size MSSQL primary persistent volume size ## size: 8Gi ## @param primary.persistence.selector Selector to match an existing Persistent Volume ## selector: ## matchLabels: ## app: my-app ## selector: {} ## @param primary.extraVolumes Optionally specify extra list of additional volumes to the MSSQL Primary pod(s) ## extraVolumes: [] ## @param primary.extraVolumeMounts Optionally specify extra list of additional volumeMounts for the MSSQL Primary container(s) ## extraVolumeMounts: [] ## @param primary.initContainers Add additional init containers for the MSSQL Primary pod(s) ## initContainers: [] ## @param primary.sidecars Add additional sidecar containers for the MSSQL Primary pod(s) ## sidecars: [] ## MSSQL Primary Service parameters ## service: ## @param primary.service.type MSSQL Primary K8s service type ## type: ClusterIP ## @param primary.service.ports.mssql MSSQL Primary K8s service port ## ports: mssql: 1433 ## @param primary.service.nodePorts.mssql MSSQL Primary K8s service node port ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport ## nodePorts: mssql: "" ## @param primary.service.clusterIP MSSQL Primary K8s service clusterIP IP ## e.g: ## clusterIP: None ## clusterIP: "" ## @param primary.service.loadBalancerIP MSSQL Primary loadBalancerIP if service type is `LoadBalancer` ## Set the LoadBalancer service type to internal only ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer ## loadBalancerIP: "" ## @param primary.service.externalTrafficPolicy Enable client source IP preservation ## ref https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip ## externalTrafficPolicy: Cluster ## @param primary.service.loadBalancerSourceRanges Addresses that are allowed when MSSQL Primary service is LoadBalancer ## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service ## E.g. ## loadBalancerSourceRanges: ## - 10.10.10.0/24 ## loadBalancerSourceRanges: [] ## @param primary.service.extraPorts Extra ports to expose (normally used with the `sidecar` value) ## extraPorts: [] ## @param primary.service.annotations Additional custom annotations for MSSQL primary service ## annotations: {} ## @param primary.service.sessionAffinity Session Affinity for Kubernetes service, can be "None" or "ClientIP" ## If "ClientIP", consecutive client requests will be directed to the same Pod ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies ## sessionAffinity: None ## @param primary.service.sessionAffinityConfig Additional settings for the sessionAffinity ## sessionAffinityConfig: ## clientIP: ## timeoutSeconds: 300 ## sessionAffinityConfig: {} ## MSSQL primary Pod Disruption Budget configuration ## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/ ## pdb: ## @param primary.pdb.create Enable/disable a Pod Disruption Budget creation for MSSQL primary pods ## create: false ## @param primary.pdb.minAvailable Minimum number/percentage of MSSQL primary pods that should remain scheduled ## minAvailable: 1 ## @param primary.pdb.maxUnavailable Maximum number/percentage of MSSQL primary pods that may be made unavailable ## maxUnavailable: "" ## @param primary.podLabels MSSQL Primary pod label. If labels are same as commonLabels , this will take precedence ## podLabels: {} ## @section MSSQL Secondary parameters secondary: ## @param secondary.name Name of the secondary database (eg secondary, slave, ...) ## name: secondary ## @param secondary.replicaCount Number of MSSQL secondary replicas ## replicaCount: 1 ## @param secondary.hostAliases Deployment pod host aliases ## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/ ## hostAliases: [] ## @param secondary.command Override default container command on MSSQL Secondary container(s) (useful when using custom images) ## command: [] ## @param secondary.args Override default container args on MSSQL Secondary container(s) (useful when using custom images) ## args: [] ## @param secondary.lifecycleHooks for the MSSQL Secondary container(s) to automate configuration before or after startup ## lifecycleHooks: {} ## @param secondary.configuration [string] Configure MSSQL Secondary with a custom my.cnf file ## ref: https://mssql.com/kb/en/mssql/configuring-mssql-with-mycnf/#example-of-configuration-file ## ## @param secondary.existingConfigmap Name of existing ConfigMap with MSSQL Secondary configuration. ## NOTE: When it's set the 'configuration' parameter is ignored ## existingConfigmap: "" ## @param secondary.updateStrategy.type Update strategy type for the MSSQL secondary statefulset ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies ## updateStrategy: type: RollingUpdate ## @param secondary.podAnnotations Additional pod annotations for MSSQL secondary pods ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ ## podAnnotations: {} ## @param secondary.podAffinityPreset MSSQL secondary pod affinity preset. Ignored if `secondary.affinity` is set. Allowed values: `soft` or `hard` ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity ## podAffinityPreset: "" ## @param secondary.podAntiAffinityPreset MSSQL secondary pod anti-affinity preset. Ignored if `secondary.affinity` is set. Allowed values: `soft` or `hard` ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity ## Allowed values: soft, hard ## podAntiAffinityPreset: soft ## MSSQL Secondary node affinity preset ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity ## nodeAffinityPreset: ## @param secondary.nodeAffinityPreset.type MSSQL secondary node affinity preset type. Ignored if `secondary.affinity` is set. Allowed values: `soft` or `hard` ## type: "" ## @param secondary.nodeAffinityPreset.key MSSQL secondary node label key to match Ignored if `secondary.affinity` is set. ## E.g. ## key: "kubernetes.io/e2e-az-name" ## key: "" ## @param secondary.nodeAffinityPreset.values MSSQL secondary node label values to match. Ignored if `secondary.affinity` is set. ## E.g. ## values: ## - e2e-az1 ## - e2e-az2 ## values: [] ## @param secondary.affinity Affinity for MSSQL secondary pods assignment ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity ## Note: podAffinityPreset, podAntiAffinityPreset, and nodeAffinityPreset will be ignored when it's set ## affinity: {} ## @param secondary.nodeSelector Node labels for MSSQL secondary pods assignment ## ref: https://kubernetes.io/docs/user-guide/node-selection/ ## nodeSelector: kubernetes.io/os: linux ## @param secondary.tolerations Tolerations for MSSQL secondary pods assignment ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ ## tolerations: [] ## @param secondary.priorityClassName MSSQL secondary pods' priorityClassName ## priorityClassName: "" ## @param secondary.schedulerName Name of the k8s scheduler (other than default) ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ ## schedulerName: "" ## @param secondary.terminationGracePeriodSeconds In seconds, time the given to the MSSQL secondary pod needs to terminate gracefully ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods ## terminationGracePeriodSeconds: "" ## @param secondary.topologySpreadConstraints Topology Spread Constraints for pod assignment ## https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ ## The value is evaluated as a template ## topologySpreadConstraints: [] ## @param secondary.podManagementPolicy podManagementPolicy to manage scaling operation of MSSQL secondary pods ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#pod-management-policies ## podManagementPolicy: "" ## MSSQL secondary Pod security context ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod ## @param secondary.podSecurityContext.enabled Enable security context for MSSQL secondary pods ## @param secondary.podSecurityContext.fsGroup Group ID for the mounted volumes' filesystem ## podSecurityContext: enabled: true fsGroup: 1001 ## MSSQL secondary container security context ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container ## @param secondary.containerSecurityContext.enabled MSSQL secondary container securityContext ## @param secondary.containerSecurityContext.runAsUser User ID for the MSSQL secondary container ## @param secondary.containerSecurityContext.runAsNonRoot Set MSSQL secondary container's Security Context runAsNonRoot ## containerSecurityContext: enabled: true runAsUser: 1001 runAsNonRoot: true ## MSSQL secondary container's resource requests and limits ## ref: https://kubernetes.io/docs/user-guide/compute-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:'. ## @param secondary.resources.limits The resources limits for MSSQL secondary containers ## @param secondary.resources.requests The requested resources for MSSQL secondary containers ## resources: ## Example: ## limits: ## cpu: 250m ## memory: 256Mi limits: {} ## Examples: ## requests: ## cpu: 250m ## memory: 256Mi requests: {} ## Configure extra options for liveness probe ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes ## @param secondary.livenessProbe.enabled Enable livenessProbe ## @param secondary.livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe ## @param secondary.livenessProbe.periodSeconds Period seconds for livenessProbe ## @param secondary.livenessProbe.timeoutSeconds Timeout seconds for livenessProbe ## @param secondary.livenessProbe.failureThreshold Failure threshold for livenessProbe ## @param secondary.livenessProbe.successThreshold Success threshold for livenessProbe ## livenessProbe: enabled: false initialDelaySeconds: 5 periodSeconds: 10 timeoutSeconds: 1 failureThreshold: 3 successThreshold: 1 ## Configure extra options for readiness probe ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes ## @param secondary.readinessProbe.enabled Enable readinessProbe ## @param secondary.readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe ## @param secondary.readinessProbe.periodSeconds Period seconds for readinessProbe ## @param secondary.readinessProbe.timeoutSeconds Timeout seconds for readinessProbe ## @param secondary.readinessProbe.failureThreshold Failure threshold for readinessProbe ## @param secondary.readinessProbe.successThreshold Success threshold for readinessProbe ## readinessProbe: enabled: false initialDelaySeconds: 5 periodSeconds: 10 timeoutSeconds: 1 failureThreshold: 3 successThreshold: 1 ## Configure extra options for startupProbe probe ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes ## @param secondary.startupProbe.enabled Enable startupProbe ## @param secondary.startupProbe.initialDelaySeconds Initial delay seconds for startupProbe ## @param secondary.startupProbe.periodSeconds Period seconds for startupProbe ## @param secondary.startupProbe.timeoutSeconds Timeout seconds for startupProbe ## @param secondary.startupProbe.failureThreshold Failure threshold for startupProbe ## @param secondary.startupProbe.successThreshold Success threshold for startupProbe ## startupProbe: enabled: false initialDelaySeconds: 15 periodSeconds: 10 timeoutSeconds: 1 failureThreshold: 15 successThreshold: 1 ## @param secondary.customLivenessProbe Override default liveness probe for MSSQL secondary containers ## customLivenessProbe: {} ## @param secondary.customReadinessProbe Override default readiness probe for MSSQL secondary containers ## customReadinessProbe: {} ## @param secondary.customStartupProbe Override default startup probe for MSSQL secondary containers ## customStartupProbe: {} ## @param secondary.extraFlags MSSQL secondary additional command line flags ## Can be used to specify command line flags, for example: ## E.g. ## extraFlags: "--max-connect-errors=1000 --max_connections=155" ## extraFlags: "" ## @param secondary.extraEnvVars An array to add extra environment variables on MSSQL secondary containers ## E.g. ## extraEnvVars: ## - name: TZ ## value: "Europe/Paris" ## extraEnvVars: [] ## @param secondary.extraEnvVarsCM Name of existing ConfigMap containing extra env vars for MSSQL secondary containers ## extraEnvVarsCM: "" ## @param secondary.extraEnvVarsSecret Name of existing Secret containing extra env vars for MSSQL secondary containers ## extraEnvVarsSecret: "" ## Enable persistence using Persistent Volume Claims ## ref: https://kubernetes.io/docs/user-guide/persistent-volumes/ ## persistence: ## @param secondary.persistence.enabled Enable persistence on MSSQL secondary replicas using a `PersistentVolumeClaim` ## enabled: true ## @param secondary.persistence.storageClass MSSQL secondary persistent volume storage Class ## If defined, storageClassName: ## 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: "local-path" ## @param secondary.persistence.annotations MSSQL secondary persistent volume claim annotations ## annotations: {} ## @param secondary.persistence.accessModes MSSQL secondary persistent volume access Modes ## accessModes: - ReadWriteOnce ## @param secondary.persistence.size MSSQL secondary persistent volume size ## size: 8Gi ## @param secondary.persistence.selector Selector to match an existing Persistent Volume ## selector: ## matchLabels: ## app: my-app ## selector: {} ## @param secondary.extraVolumes Optionally specify extra list of additional volumes to the MSSQL secondary pod(s) ## extraVolumes: [] ## @param secondary.extraVolumeMounts Optionally specify extra list of additional volumeMounts for the MSSQL secondary container(s) ## extraVolumeMounts: [] ## @param secondary.initContainers Add additional init containers for the MSSQL secondary pod(s) ## initContainers: [] ## @param secondary.sidecars Add additional sidecar containers for the MSSQL secondary pod(s) ## sidecars: [] ## MSSQL Secondary Service parameters ## service: ## @param secondary.service.type MSSQL secondary Kubernetes service type ## type: ClusterIP ## @param secondary.service.ports.mssql MSSQL secondary Kubernetes service port ## ports: mssql: 1433 ## @param secondary.service.nodePorts.mssql MSSQL secondary Kubernetes service node port ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport ## nodePorts: mssql: "" ## @param secondary.service.clusterIP MSSQL secondary Kubernetes service clusterIP IP ## e.g: ## clusterIP: None ## clusterIP: "" ## @param secondary.service.loadBalancerIP MSSQL secondary loadBalancerIP if service type is `LoadBalancer` ## Set the LoadBalancer service type to internal only ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer ## loadBalancerIP: "" ## @param secondary.service.externalTrafficPolicy Enable client source IP preservation ## ref https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip ## externalTrafficPolicy: Cluster ## @param secondary.service.loadBalancerSourceRanges Addresses that are allowed when MSSQL secondary service is LoadBalancer ## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service ## E.g. ## loadBalancerSourceRanges: ## - 10.10.10.0/24 ## loadBalancerSourceRanges: [] ## @param secondary.service.extraPorts Extra ports to expose (normally used with the `sidecar` value) ## extraPorts: [] ## @param secondary.service.annotations Additional custom annotations for MSSQL secondary service ## annotations: {} ## @param secondary.service.sessionAffinity Session Affinity for Kubernetes service, can be "None" or "ClientIP" ## If "ClientIP", consecutive client requests will be directed to the same Pod ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies ## sessionAffinity: None ## @param secondary.service.sessionAffinityConfig Additional settings for the sessionAffinity ## sessionAffinityConfig: ## clientIP: ## timeoutSeconds: 300 ## sessionAffinityConfig: {} ## MSSQL secondary Pod Disruption Budget configuration ## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/ ## pdb: ## @param secondary.pdb.create Enable/disable a Pod Disruption Budget creation for MSSQL secondary pods ## create: false ## @param secondary.pdb.minAvailable Minimum number/percentage of MSSQL secondary pods that should remain scheduled ## minAvailable: 1 ## @param secondary.pdb.maxUnavailable Maximum number/percentage of MSSQL secondary pods that may be made unavailable ## maxUnavailable: "" ## @param secondary.podLabels Additional pod labels for MSSQL secondary pods ## podLabels: {} ## @section MSSQL Client parameters client: image: registry: mcr.microsoft.com repository: mssql-tools tag: latest ## @section RBAC parameters ## MSSQL pods ServiceAccount ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ ## serviceAccount: ## @param serviceAccount.create Enable the creation of a ServiceAccount for MSSQL pods ## create: true ## @param serviceAccount.name Name of the created ServiceAccount ## If not set and create is true, a name is generated using the mssql.fullname template ## name: "" ## @param serviceAccount.annotations Annotations for MSSQL Service Account ## annotations: {} ## @param serviceAccount.automountServiceAccountToken Automount service account token for the server service account ## automountServiceAccountToken: true ## Role Based Access ## ref: https://kubernetes.io/docs/admin/authorization/rbac/ ## rbac: ## @param rbac.create Whether to create & use RBAC resources or not ## create: true ## @param rbac.rules Custom RBAC rules to set ## e.g: ## rules: ## - apiGroups: ## - "" ## resources: ## - pods ## verbs: ## - get ## - list ## rules: [] ## @section Network Policy ## MSSQL Nework Policy configuration ## networkPolicy: ## @param networkPolicy.enabled Enable creation of NetworkPolicy resources ## enabled: false ## @param networkPolicy.allowExternal The Policy model to apply. ## When set to false, only pods with the correct ## client label will have network access to the port MSSQL is listening ## on. When true, MSSQL will accept connections from any source ## (with the correct destination port). ## allowExternal: true ## @param networkPolicy.explicitNamespacesSelector A Kubernetes LabelSelector to explicitly select namespaces from which ingress traffic could be allowed to MSSQL ## 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: {} ## @section Volume Permissions parameters ## Init containers parameters: ## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section. ## volumePermissions: ## @param volumePermissions.enabled Enable init container that changes the owner and group of the persistent volume(s) mountpoint to `runAsUser:fsGroup` ## enabled: false ## @param volumePermissions.image.registry Init container volume-permissions image registry ## @param volumePermissions.image.repository Init container volume-permissions image repository ## @param volumePermissions.image.tag Init container volume-permissions image tag (immutable tags are recommended) ## @param volumePermissions.image.digest Init container volume-permissions image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag ## @param volumePermissions.image.pullPolicy Init container volume-permissions image pull policy ## @param volumePermissions.image.pullSecrets Specify docker-registry secret names as an array ## image: registry: registry.access.redhat.com repository: ubi9/ubi tag: 9.4-947.1714667021 digest: "" 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/ ## e.g: ## pullSecrets: ## - myRegistryKeySecretName ## pullSecrets: [] ## @param volumePermissions.resources Init container volume-permissions resources ## resources: {} ## @section MSSQL Backup parameters ## ref: https://docs.microsoft.com/en-us/sql/linux/tutorial-restore-backup-in-sql-server-container?view=sql-server-ver16 backup: ## @param backup.enabled Enable backup features ## enabled: true ## @param.backup.databases list of databases target for backup every .Values.backup.cronjob.schedule ## databases: [] cronjob: ## @param backup.cronjob.schedule TODO Enable auto backup every specific period of time - TODO !!! ## defaults to every day at At 01:00 schedule: "0 1 * * *" ## @param backup.cronjob.commandTemplate TODO backup command template to be run by "sqlcmd -C" every .Values.backup.schedule - TODO !!! ## it is a template that can interpolate: ## 1. Any Values of this chart ## 2. The following env vars: ## - $database : database as it was mentioned in .Values.backup.databases[i] ## - $now: current time in this format %Y-%m-%d_%Hh%Mm%Ssec ## ## !!!! NOTE !!!! ## Recommended to not override this value as the restore script is ## developed based on this default value of @param backup.cronjob.commandTemplate. ## !!!!!!!!!!!!!! ## ref: https://learn.microsoft.com/en-us/sql/t-sql/statements/backup-transact-sql?view=sql-server-ver16 ## ref: https://docs.microsoft.com/en-us/sql/linux/tutorial-restore-backup-in-sql-server-container?view=sql-server-ver16#create-a-new-backup ## commandTemplate: BACKUP DATABASE [$database] TO DISK = N'{{ .Values.backup.persistence.mount }}/$database-$now.bak' WITH NOFORMAT, NOINIT, NAME = '${database}Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10 ## @param backup.cronjob.historyLimit Number of successful finished jobs to retain ## historyLimit: 1 ## @param backup.cronjob.snapshotHistoryLimit Number of etcd snapshots to retain, tagged by date ## snapshotHistoryLimit: 1 ## @param backup.cronjob.podAnnotations [object] Pod annotations for cronjob pods ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ ## podAnnotations: {} ## @param backup.cronjob.podSecurityContext [object] ## podSecurityContext: {} ## MSSQL backup.cronjob container security context ## containerSecurityContext: {} ## Configure resource requests and limits for snapshotter containers ## ref: https://kubernetes.io/docs/user-guide/compute-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:'. ## @param backup.cronjob.resources.limits [object] Cronjob container resource limits ## @param backup.cronjob.resources.requests [object] Cronjob container resource requests ## resources: ## Example: ## limits: ## cpu: 500m ## memory: 1Gi ## limits: {} requests: {} ## @param backup.cronjob.nodeSelector Node labels for cronjob pods assignment ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ ## nodeSelector: kubernetes.io/os: linux ## @param backup.cronjob.tolerations Tolerations for cronjob pods assignment ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ ## tolerations: [] ## Persistence for Backup files ## persistence: ## @param backup.persistence.enabled Enable persisting Backups on MSSQL primary replicas using a `PersistentVolumeClaim`. If false, use emptyDir ## enabled: false ## @param backup.persistence.mount Path of Data inside container ## mount: /var/opt/mssql/backup ## @param backup.persistence.existingClaim Name of an existing `PersistentVolumeClaim` for Backups on MSSQL primary replicas ## NOTE: When it's set the rest of persistence parameters are ignored ## existingClaim: "" ## @param backup.persistence.storageClass Backup MSSQL primary persistent volume storage Class ## If defined, storageClassName: ## 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: "local-path" ## @param backup.persistence.annotations Backup MSSQL primary persistent volume claim annotations ## annotations: {} ## @param backup.persistence.accessModes Backup MSSQL primary persistent volume access Modes ## accessModes: - ReadWriteMany ## @param backup.persistence.size Backup MSSQL primary persistent volume size ## size: 20Gi ## @param backup.persistence.selector Selector to match an existing Persistent Volume ## selector: ## matchLabels: ## app: my-app ## selector: {} ## @section Metrics parameters ## MsSQLd Prometheus exporter parameters ## Grafana Dashboard is available here: https://grafana.com/grafana/dashboards/13919-microsoft-sql-server/ metrics: ## @param metrics.enabled Start a side-car prometheus exporter ## enabled: false ## @param metrics.image.registry Exporter image registry ## @param metrics.image.repository Exporter image repository ## @param metrics.image.tag Exporter image tag (immutable tags are recommended) ## @param metrics.image.digest Exporter image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag ## @param metrics.image.pullPolicy Exporter image pull policy ## @param metrics.image.pullSecrets Specify docker-registry secret names as an array ## image: registry: docker.io # https://github.com/awaragi/prometheus-mssql-exporter repository: awaragi/prometheus-mssql-exporter tag: v1.3.0 digest: "" 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/ ## e.g: ## pullSecrets: ## - myRegistryKeySecretName ## pullSecrets: [] ## MSSQL Prometheus exporter service parameters ## Mssqld Prometheus exporter liveness and readiness probes ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes ## @param metrics.service.type Kubernetes service type for MSSQL Prometheus Exporter ## @param metrics.service.port MSSQL Prometheus Exporter service port ## @param metrics.service.annotations [object] Prometheus exporter service annotations ## service: type: ClusterIP port: 4000 annotations: prometheus.io/scrape: "true" prometheus.io/port: "{{ .Values.metrics.service.port }}" ## @param metrics.extraArgs.primary Extra args to be passed to mssqld_exporter on Primary pods ## @param metrics.extraArgs.secondary Extra args to be passed to mssqld_exporter on Secondary pods ## ref: https://github.com/prometheus/mssqld_exporter/ ## E.g. ## - --collect.auto_increment.columns ## - --collect.binlog_size ## - --collect.engine_innodb_status ## - --collect.engine_tokudb_status ## - --collect.global_status ## - --collect.global_variables ## - --collect.info_schema.clientstats ## - --collect.info_schema.innodb_metrics ## - --collect.info_schema.innodb_tablespaces ## - --collect.info_schema.innodb_cmp ## - --collect.info_schema.innodb_cmpmem ## - --collect.info_schema.processlist ## - --collect.info_schema.processlist.min_time ## - --collect.info_schema.query_response_time ## - --collect.info_schema.tables ## - --collect.info_schema.tables.databases ## - --collect.info_schema.tablestats ## - --collect.info_schema.userstats ## - --collect.perf_schema.eventsstatements ## - --collect.perf_schema.eventsstatements.digest_text_limit ## - --collect.perf_schema.eventsstatements.limit ## - --collect.perf_schema.eventsstatements.timelimit ## - --collect.perf_schema.eventswaits ## - --collect.perf_schema.file_events ## - --collect.perf_schema.file_instances ## - --collect.perf_schema.indexiowaits ## - --collect.perf_schema.tableiowaits ## - --collect.perf_schema.tablelocks ## - --collect.perf_schema.replication_group_member_stats ## - --collect.slave_status ## - --collect.slave_hosts ## - --collect.heartbeat ## - --collect.heartbeat.database ## - --collect.heartbeat.table ## extraArgs: primary: [] secondary: [] ## Mssqld Prometheus exporter resource requests and limits ## ref: https://kubernetes.io/docs/user-guide/compute-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:'. ## @param metrics.resources.limits The resources limits for MSSQL prometheus exporter containers ## @param metrics.resources.requests The requested resources for MSSQL prometheus exporter containers ## resources: ## Example: ## limits: ## cpu: 100m ## memory: 256Mi limits: {} ## Examples: ## requests: ## cpu: 100m ## memory: 256Mi requests: {} ## Mssqld Prometheus exporter liveness probe ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes ## @param metrics.livenessProbe.enabled Enable livenessProbe ## @param metrics.livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe ## @param metrics.livenessProbe.periodSeconds Period seconds for livenessProbe ## @param metrics.livenessProbe.timeoutSeconds Timeout seconds for livenessProbe ## @param metrics.livenessProbe.failureThreshold Failure threshold for livenessProbe ## @param metrics.livenessProbe.successThreshold Success threshold for livenessProbe ## livenessProbe: enabled: true initialDelaySeconds: 120 periodSeconds: 10 timeoutSeconds: 1 successThreshold: 1 failureThreshold: 3 ## Mssqld Prometheus exporter readiness probe ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes ## @param metrics.readinessProbe.enabled Enable readinessProbe ## @param metrics.readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe ## @param metrics.readinessProbe.periodSeconds Period seconds for readinessProbe ## @param metrics.readinessProbe.timeoutSeconds Timeout seconds for readinessProbe ## @param metrics.readinessProbe.failureThreshold Failure threshold for readinessProbe ## @param metrics.readinessProbe.successThreshold Success threshold for readinessProbe ## readinessProbe: enabled: true initialDelaySeconds: 30 periodSeconds: 10 timeoutSeconds: 1 successThreshold: 1 failureThreshold: 3 ## Prometheus Service Monitor ## ref: https://github.com/coreos/prometheus-operator ## serviceMonitor: ## @param metrics.serviceMonitor.enabled Create ServiceMonitor Resource for scraping metrics using PrometheusOperator ## enabled: false ## @param metrics.serviceMonitor.namespace Specify the namespace in which the serviceMonitor resource will be created ## namespace: "" ## @param metrics.serviceMonitor.jobLabel The name of the label on the target service to use as the job name in prometheus. ## jobLabel: "" ## @param metrics.serviceMonitor.interval Specify the interval at which metrics should be scraped ## interval: 30s ## @param metrics.serviceMonitor.scrapeTimeout Specify the timeout after which the scrape is ended ## e.g: ## scrapeTimeout: 30s ## scrapeTimeout: "" ## @param metrics.serviceMonitor.relabelings RelabelConfigs to apply to samples before scraping ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#relabelconfig ## relabelings: [] ## @param metrics.serviceMonitor.metricRelabelings MetricRelabelConfigs to apply to samples before ingestion ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#relabelconfig ## metricRelabelings: [] ## @param metrics.serviceMonitor.selector ServiceMonitor selector labels ## ref: https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-configuration ## ## selector: ## prometheus: my-prometheus ## selector: {} ## @param metrics.serviceMonitor.honorLabels Specify honorLabels parameter to add the scrape endpoint ## honorLabels: false ## @param metrics.serviceMonitor.labels 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 ## labels: {} ## @param metrics.serviceMonitor.annotations ServiceMonitor annotations ## annotations: {} ## Prometheus Operator prometheusRule configuration ## prometheusRule: ## @param metrics.prometheusRule.enabled Creates a Prometheus Operator prometheusRule (also requires `metrics.enabled` to be `true` and `metrics.prometheusRule.rules`) ## enabled: false ## @param metrics.prometheusRule.namespace Namespace for the prometheusRule Resource (defaults to the Release Namespace) ## namespace: "" ## @param metrics.prometheusRule.additionalLabels Additional labels that can be used so prometheusRule will be discovered by Prometheus ## additionalLabels: {} ## @param metrics.prometheusRule.rules Prometheus Rule definitions ## - alert: Mssql-Down ## expr: absent(up{job="mssql"} == 1) ## for: 5m ## labels: ## severity: warning ## service: mariadb ## annotations: ## message: 'MariaDB instance {{`{{`}} $labels.instance {{`}}`}} is down' ## summary: MariaDB instance is down ## rules: []