'use strict';
import * as _0x16ff3d from '@pulumi/kubernetes';
import { clusterNames, clusterSuffixes, matchExpressions, kubernetesNodes, clusterPaths, clusterKubernetes, volumeConstants } from '@cluster/constants/cluster-constants';
import { commonVersions } from '../../base-repo/app-constants/internal-system-constants.js';

var __defProp=Object['defineProperty'],__name=(_0xd5f63d,_0x42409f)=>__defProp(_0xd5f63d,'name',{'value':_0x42409f,'configurable':!![]});const dockerRegistryConstants={'name':clusterNames['registry']+'-'+clusterSuffixes['pv'],'version':commonVersions['firstVersion']};function createDockerRegistry(){const _0x2976d0=new _0x16ff3d['core']['v1']['PersistentVolume'](dockerRegistryConstants['name'],{'metadata':{'name':dockerRegistryConstants['name']},'spec':{'capacity':{'storage':clusterKubernetes['storageSizeXxl']},'accessModes':[clusterKubernetes['accessMode']],'persistentVolumeReclaimPolicy':volumeConstants['retain'],'storageClassName':clusterKubernetes['storageClass'],'local':{'path':clusterPaths['dataDir']},'nodeAffinity':{'required':{'nodeSelectorTerms':[{'matchExpressions':[{'key':kubernetesNodes['controlPlane'],'operator':matchExpressions['exists']}]}]}}}}),_0x5e1af7=new _0x16ff3d['core']['v1']['PersistentVolumeClaim'](clusterNames['registry']+'-'+clusterSuffixes['pvc'],{'metadata':{'namespace':clusterNames['registry'],'labels':{'app':clusterNames['dockerRegistry']}},'spec':{'accessModes':[clusterKubernetes['accessMode']],'resources':{'requests':{'storage':clusterKubernetes['storageSizeXxl']}},'volumeName':_0x2976d0['metadata']['name'],'storageClassName':clusterKubernetes['storageClass'],'volumeMode':volumeConstants['filesystem']}},{'dependsOn':_0x2976d0});return new _0x16ff3d['helm']['v4']['Chart'](clusterNames['registry'],{'chart':clusterNames['dockerRegistry'],'version':dockerRegistryConstants['version'],'namespace':clusterNames['registry'],'repositoryOpts':{'repo':'https://twuni.github.io/docker-registry.helm'},'values':{'service':{'type':'NodePort','nodePort':0x7724},'persistence':{'enabled':!![],'existingClaim':_0x5e1af7['metadata']['name']}}},{'dependsOn':_0x5e1af7});}__name(createDockerRegistry,'createDockerRegistry');

export { createDockerRegistry };
