'use strict';
import * as _0x16ff3d from '@pulumi/kubernetes';
import { environmentVariables } from '../../infra/ci/constants/ci-constants.js';
import { getRequiredStringEnvSetting } from '../../fd-toolbox/infra/env-functions.js';
import { clusterPriority, clusterVolumePaths, clusterNames, clusterKubernetes } from '@cluster/constants/cluster-constants';
import { postgresql } from '../../base-repo/app-constants/internal-system-constants.js';

var __defProp=Object['defineProperty'],__name=(_0x2d9e61,_0x2a206c)=>__defProp(_0x2d9e61,'name',{'value':_0x2a206c,'configurable':!![]});const postgresPassword=getRequiredStringEnvSetting(environmentVariables['postgreSqlPassword']),probe={'initialDelaySeconds':0x14,'timeoutSeconds':0x14,'failureThreshold':0x5},priorityClassName=''+clusterPriority['name']+clusterPriority['value'];function createPostgreSql(_0x26702a){const _0x1cffb3=new _0x16ff3d['scheduling']['v1']['PriorityClass'](priorityClassName,{'metadata':{'name':priorityClassName},'value':clusterPriority['value']}),_0x2c5a1d=new _0x16ff3d['helm']['v4']['Chart'](postgresql,{'chart':postgresql,'version':'18.1.1','namespace':_0x26702a,'repositoryOpts':{'repo':'https://charts.bitnami.com/bitnami'},'values':{'global':{'postgresql':{'auth':{'postgresPassword':postgresPassword}}},'primary':{'priorityClassName':_0x1cffb3['metadata']['name'],'livenessProbe':probe,'startupProbe':{...probe,'enabled':!![]},'readinessProbe':probe,'persistence':{'enabled':![],'mountPath':clusterVolumePaths['bitnamiUnusedData']},'resources':{'requests':{'cpu':'500m','memory':'1Gi'},'limits':{'cpu':'10','memory':clusterKubernetes['storageSizeXxl']}},'extraVolumes':[{'name':clusterNames['pgRamStorage'],'emptyDir':{'medium':'Memory','sizeLimit':clusterKubernetes['storageSizeXxl']}}],'extraVolumeMounts':[{'name':clusterNames['pgRamStorage'],'mountPath':clusterVolumePaths['bitnamiPostgresql']}],'extendedConfiguration':'max_connections\x20=\x201000','pgHbaConfiguration':'host\x20all\x20all\x200.0.0.0/0\x20scram-sha-256'}}},{'dependsOn':[_0x1cffb3]});return {'chart':_0x2c5a1d,'priorityClass':_0x1cffb3};}__name(createPostgreSql,'createPostgreSql');

export { createPostgreSql };
