Krzysztof Opasiak | 32f9aaa | 2020-02-06 23:05:15 +0100 | [diff] [blame] | 1 | # Copyright © 2020 Samsung Electronics |
Abdelmuhaimen Seaudi | f487c95 | 2019-09-03 17:45:29 +0000 | [diff] [blame] | 2 | # Copyright © 2019 Orange, Bell Canada |
| 3 | # Copyright © 2017 Amdocs, Bell Canada |
efiacor | 7d3b014 | 2023-02-28 11:28:52 +0000 | [diff] [blame] | 4 | # Modification Copyright © 2022-2023 Nordix Foundation |
Sylvain Desbureaux | 7acab56 | 2019-03-01 09:26:13 +0100 | [diff] [blame] | 5 | # |
| 6 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | # you may not use this file except in compliance with the License. |
| 8 | # You may obtain a copy of the License at |
| 9 | # |
| 10 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | # |
| 12 | # Unless required by applicable law or agreed to in writing, software |
| 13 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | # See the License for the specific language governing permissions and |
| 16 | # limitations under the License. |
| 17 | |
Abdelmuhaimen Seaudi | f487c95 | 2019-09-03 17:45:29 +0000 | [diff] [blame] | 18 | ################################################################# |
| 19 | # Global configuration defaults. |
| 20 | ################################################################# |
| 21 | global: |
| 22 | nodePortPrefix: 302 |
| 23 | nodePortPrefixExt: 304 |
Abdelmuhaimen Seaudi | f487c95 | 2019-09-03 17:45:29 +0000 | [diff] [blame] | 24 | persistence: |
| 25 | mountPath: /dockerdata-nfs |
| 26 | |
| 27 | ################################################################# |
Krzysztof Opasiak | 32f9aaa | 2020-02-06 23:05:15 +0100 | [diff] [blame] | 28 | # Secrets metaconfig |
| 29 | ################################################################# |
| 30 | secrets: |
| 31 | - name: &dbUserSecretName '{{ include "common.release" . }}-cds-db-secret' |
| 32 | uid: 'cds-db-secret' |
| 33 | type: basicAuth |
Sylvain Desbureaux | 93a5b49 | 2020-11-27 11:07:42 +0100 | [diff] [blame] | 34 | externalSecret: '{{ ternary "" (tpl (default "" (index .Values "mariadb-galera" "db" "externalSecret")) .) (hasSuffix "cds-db-secret" (index .Values "mariadb-galera" "db" "externalSecret"))}}' |
| 35 | login: '{{ index .Values "mariadb-galera" "db" "user" }}' |
| 36 | password: '{{ index .Values "mariadb-galera" "db" "password" }}' |
Krzysztof Opasiak | 32f9aaa | 2020-02-06 23:05:15 +0100 | [diff] [blame] | 37 | |
| 38 | ################################################################# |
Abdelmuhaimen Seaudi | f487c95 | 2019-09-03 17:45:29 +0000 | [diff] [blame] | 39 | # Application configuration defaults. |
| 40 | ################################################################# |
| 41 | # application images |
Abdelmuhaimen Seaudi | f487c95 | 2019-09-03 17:45:29 +0000 | [diff] [blame] | 42 | pullPolicy: Always |
| 43 | |
Abdelmuhaimen Seaudi | f487c95 | 2019-09-03 17:45:29 +0000 | [diff] [blame] | 44 | subChartsOnly: |
| 45 | enabled: true |
| 46 | |
| 47 | # flag to enable debugging - application support required |
| 48 | debugEnabled: false |
| 49 | |
| 50 | # default number of instances |
| 51 | replicaCount: 1 |
| 52 | |
| 53 | nodeSelector: {} |
| 54 | |
| 55 | affinity: {} |
| 56 | |
| 57 | # probe configuration parameters |
| 58 | liveness: |
Oleg Mitsura | 3a62118 | 2019-10-09 12:40:11 -0400 | [diff] [blame] | 59 | initialDelaySeconds: 20 |
| 60 | periodSeconds: 20 |
| 61 | timeoutSeconds: 20 |
Abdelmuhaimen Seaudi | f487c95 | 2019-09-03 17:45:29 +0000 | [diff] [blame] | 62 | # necessary to disable liveness probe when setting breakpoints |
| 63 | # in debugger so K8s doesn't restart unresponsive container |
| 64 | enabled: true |
| 65 | |
| 66 | readiness: |
| 67 | initialDelaySeconds: 10 |
| 68 | periodSeconds: 10 |
| 69 | |
| 70 | ingress: |
| 71 | enabled: false |
| 72 | |
Alexis de Talhouët | 63df163 | 2019-03-20 08:17:58 -0400 | [diff] [blame] | 73 | mariadb-galera: |
Sylvain Desbureaux | 93a5b49 | 2020-11-27 11:07:42 +0100 | [diff] [blame] | 74 | db: |
| 75 | user: sdnctl |
| 76 | # password: |
| 77 | externalSecret: *dbUserSecretName |
| 78 | name: &mysqlDbName sdnctl |
Krzysztof Opasiak | 32f9aaa | 2020-02-06 23:05:15 +0100 | [diff] [blame] | 79 | nameOverride: &dbServer cds-db |
Alexis de Talhouët | 63df163 | 2019-03-20 08:17:58 -0400 | [diff] [blame] | 80 | replicaCount: 1 |
Andreas Geissler | cfd8434 | 2023-08-16 17:18:49 +0200 | [diff] [blame] | 81 | mariadbOperator: |
| 82 | galera: |
| 83 | enabled: false |
Alexis de Talhouët | 63df163 | 2019-03-20 08:17:58 -0400 | [diff] [blame] | 84 | persistence: |
| 85 | enabled: true |
Abdelmuhaimen Seaudi | f487c95 | 2019-09-03 17:45:29 +0000 | [diff] [blame] | 86 | mountSubPath: cds/data |
Sylvain Desbureaux | 93a5b49 | 2020-11-27 11:07:42 +0100 | [diff] [blame] | 87 | serviceAccount: |
| 88 | nameOverride: *dbServer |
Abdelmuhaimen Seaudi | f487c95 | 2019-09-03 17:45:29 +0000 | [diff] [blame] | 89 | |
Sylvain Desbureaux | 439e52b | 2021-04-27 10:00:06 +0200 | [diff] [blame] | 90 | mariadbConfiguration: |- |
| 91 | [client] |
| 92 | port=3306 |
| 93 | socket=/opt/bitnami/mariadb/tmp/mysql.sock |
| 94 | plugin_dir=/opt/bitnami/mariadb/plugin |
| 95 | |
| 96 | [mysqld] |
| 97 | lower_case_table_names = 1 |
| 98 | default_storage_engine=InnoDB |
| 99 | basedir=/opt/bitnami/mariadb |
| 100 | datadir=/bitnami/mariadb/data |
| 101 | plugin_dir=/opt/bitnami/mariadb/plugin |
| 102 | tmpdir=/opt/bitnami/mariadb/tmp |
| 103 | socket=/opt/bitnami/mariadb/tmp/mysql.sock |
| 104 | pid_file=/opt/bitnami/mariadb/tmp/mysqld.pid |
| 105 | bind_address=0.0.0.0 |
| 106 | |
| 107 | ## Character set |
| 108 | collation_server=utf8_unicode_ci |
| 109 | init_connect='SET NAMES utf8' |
| 110 | character_set_server=utf8 |
| 111 | |
| 112 | ## MyISAM |
| 113 | key_buffer_size=32M |
| 114 | myisam_recover_options=FORCE,BACKUP |
| 115 | |
| 116 | ## Safety |
| 117 | skip_host_cache |
| 118 | skip_name_resolve |
| 119 | max_allowed_packet=16M |
| 120 | max_connect_errors=1000000 |
| 121 | sql_mode=STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_AUTO_VALUE_ON_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,ONLY_FULL_GROUP_BY |
| 122 | sysdate_is_now=1 |
| 123 | |
| 124 | ## Binary Logging |
| 125 | log_bin=mysql-bin |
| 126 | expire_logs_days=14 |
| 127 | # Disabling for performance per http://severalnines.com/blog/9-tips-going-production-galera-cluster-mysql |
| 128 | sync_binlog=0 |
| 129 | # Required for Galera |
| 130 | binlog_format=row |
| 131 | |
| 132 | ## Caches and Limits |
| 133 | tmp_table_size=32M |
| 134 | max_heap_table_size=32M |
| 135 | # Re-enabling as now works with Maria 10.1.2 |
| 136 | query_cache_type=1 |
| 137 | query_cache_limit=4M |
| 138 | query_cache_size=256M |
| 139 | max_connections=500 |
| 140 | thread_cache_size=50 |
| 141 | open_files_limit=65535 |
| 142 | table_definition_cache=4096 |
| 143 | table_open_cache=4096 |
| 144 | |
| 145 | ## InnoDB |
| 146 | innodb=FORCE |
| 147 | innodb_strict_mode=1 |
| 148 | # Mandatory per https://github.com/codership/documentation/issues/25 |
| 149 | innodb_autoinc_lock_mode=2 |
| 150 | # Per https://www.percona.com/blog/2006/08/04/innodb-double-write/ |
| 151 | innodb_doublewrite=1 |
| 152 | innodb_flush_method=O_DIRECT |
| 153 | innodb_log_files_in_group=2 |
| 154 | innodb_log_file_size=128M |
| 155 | innodb_flush_log_at_trx_commit=1 |
| 156 | innodb_file_per_table=1 |
| 157 | # 80% Memory is default reco. |
| 158 | # Need to re-evaluate when DB size grows |
| 159 | innodb_buffer_pool_size=2G |
| 160 | innodb_file_format=Barracuda |
| 161 | |
| 162 | ## Logging |
| 163 | log_error=/opt/bitnami/mariadb/logs/mysqld.log |
| 164 | slow_query_log_file=/opt/bitnami/mariadb/logs/mysqld.log |
| 165 | log_queries_not_using_indexes=1 |
| 166 | slow_query_log=1 |
| 167 | |
| 168 | ## SSL |
| 169 | ## Use extraVolumes and extraVolumeMounts to mount /certs filesystem |
| 170 | # ssl_ca=/certs/ca.pem |
| 171 | # ssl_cert=/certs/server-cert.pem |
| 172 | # ssl_key=/certs/server-key.pem |
| 173 | |
| 174 | [galera] |
| 175 | wsrep_on=ON |
| 176 | wsrep_provider=/opt/bitnami/mariadb/lib/libgalera_smm.so |
| 177 | wsrep_sst_method=mariabackup |
| 178 | wsrep_slave_threads=4 |
| 179 | wsrep_cluster_address=gcomm:// |
| 180 | wsrep_cluster_name=galera |
| 181 | wsrep_sst_auth="root:" |
| 182 | # Enabled for performance per https://mariadb.com/kb/en/innodb-system-variables/#innodb_flush_log_at_trx_commit |
| 183 | innodb_flush_log_at_trx_commit=2 |
| 184 | # MYISAM REPLICATION SUPPORT # |
| 185 | wsrep_replicate_myisam=ON |
| 186 | |
| 187 | [mariadb] |
| 188 | plugin_load_add=auth_pam |
| 189 | |
| 190 | ## Data-at-Rest Encryption |
| 191 | ## Use extraVolumes and extraVolumeMounts to mount /encryption filesystem |
| 192 | # plugin_load_add=file_key_management |
| 193 | # file_key_management_filename=/encryption/keyfile.enc |
| 194 | # file_key_management_filekey=FILE:/encryption/keyfile.key |
| 195 | # file_key_management_encryption_algorithm=AES_CTR |
| 196 | # encrypt_binlog=ON |
| 197 | # encrypt_tmp_files=ON |
| 198 | |
| 199 | ## InnoDB/XtraDB Encryption |
| 200 | # innodb_encrypt_tables=ON |
| 201 | # innodb_encrypt_temporary_tables=ON |
| 202 | # innodb_encrypt_log=ON |
| 203 | # innodb_encryption_threads=4 |
| 204 | # innodb_encryption_rotate_key_age=1 |
| 205 | |
| 206 | ## Aria Encryption |
| 207 | # aria_encrypt_tables=ON |
| 208 | # encrypt_tmp_disk_tables=ON |
| 209 | |
Krzysztof Opasiak | 32f9aaa | 2020-02-06 23:05:15 +0100 | [diff] [blame] | 210 | cds-blueprints-processor: |
Sylvain Desbureaux | 503b229 | 2020-11-21 22:29:17 +0100 | [diff] [blame] | 211 | enabled: true |
Krzysztof Opasiak | 32f9aaa | 2020-02-06 23:05:15 +0100 | [diff] [blame] | 212 | config: |
| 213 | cdsDB: |
| 214 | dbServer: *dbServer |
| 215 | dbPort: 3306 |
| 216 | dbName: *mysqlDbName |
| 217 | dbCredsExternalSecret: *dbUserSecretName |
Krzysztof Opasiak | 32f9aaa | 2020-02-06 23:05:15 +0100 | [diff] [blame] | 218 | |
Sylvain Desbureaux | 503b229 | 2020-11-21 22:29:17 +0100 | [diff] [blame] | 219 | cds-command-executor: |
| 220 | enabled: true |
| 221 | |
| 222 | cds-py-executor: |
| 223 | enabled: true |
| 224 | |
| 225 | cds-sdc-listener: |
| 226 | enabled: true |
| 227 | |
| 228 | cds-ui: |
| 229 | enabled: true |
| 230 | |
Abdelmuhaimen Seaudi | f487c95 | 2019-09-03 17:45:29 +0000 | [diff] [blame] | 231 | #Resource Limit flavor -By Default using small |
| 232 | flavor: small |
efiacor | 7d3b014 | 2023-02-28 11:28:52 +0000 | [diff] [blame] | 233 | #segregation for different environment (Small and Large) |
Abdelmuhaimen Seaudi | f487c95 | 2019-09-03 17:45:29 +0000 | [diff] [blame] | 234 | resources: |
| 235 | small: |
| 236 | limits: |
| 237 | cpu: 2 |
| 238 | memory: 4Gi |
| 239 | requests: |
| 240 | cpu: 1 |
| 241 | memory: 2Gi |
| 242 | large: |
| 243 | limits: |
| 244 | cpu: 4 |
| 245 | memory: 8Gi |
| 246 | requests: |
| 247 | cpu: 2 |
| 248 | memory: 4Gi |
| 249 | unlimited: {} |