|
| 1 | +import "./AppKbldConfig.pkl" |
| 2 | +import "@k8s/K8sResource.pkl" |
| 3 | +import "@tadaSharedKube/TadaAppNamespace.pkl" |
| 4 | +import "@tadaSharedKube/TadaEcrLoginRenewConfigMap.pkl" |
| 5 | +import "@tadaSharedKube/TadaEcrLoginRenewCronJob.pkl" |
| 6 | +import "@tadaSharedKube/TadaEcrLoginRenewInitialSetupJob.pkl" |
| 7 | +import "@tadaSharedKube/TadaEcrLoginRenewRole.pkl" |
| 8 | +import "@tadaSharedKube/TadaEcrLoginRenewRoleBinding.pkl" |
| 9 | +import "@tadaSharedKube/TadaEcrLoginRenewSecrets.pkl" |
| 10 | +import "@tadaSharedKube/TadaEcrLoginRenewServiceAccount.pkl" |
| 11 | +import "@tadaSharedKube/TadaWebConfigMap.pkl" |
| 12 | +import "@tadaSharedKube/TadaWebDbMigrateSecrets.pkl" |
| 13 | +import "@tadaSharedKube/TadaWebRunJob.pkl" |
| 14 | +import "@tadaSharedKube/TadaWebSecrets.pkl" |
| 15 | + |
| 16 | +local containerImage = "reopt-api" |
| 17 | + |
| 18 | +resources: Listing<K8sResource> = new { |
| 19 | + new TadaAppNamespace { |
| 20 | + tadaRancherResourceQuotaPodLimit = 1 |
| 21 | + } |
| 22 | + |
| 23 | + new AppKbldConfig {} |
| 24 | + |
| 25 | + // To be able to pull images from our ECR repos in our on-premise (non-AWS) |
| 26 | + // clusters. |
| 27 | + local ecrLoginRenewConfigMapResource = new TadaEcrLoginRenewConfigMap {} |
| 28 | + ecrLoginRenewConfigMapResource |
| 29 | + new TadaEcrLoginRenewCronJob {} |
| 30 | + new TadaEcrLoginRenewInitialSetupJob {} |
| 31 | + new TadaEcrLoginRenewRoleBinding {} |
| 32 | + new TadaEcrLoginRenewRole {} |
| 33 | + new TadaEcrLoginRenewSecrets {} |
| 34 | + new TadaEcrLoginRenewServiceAccount {} |
| 35 | + |
| 36 | + new TadaWebConfigMap {} |
| 37 | + |
| 38 | + local secretResource = new TadaWebSecrets {} |
| 39 | + secretResource |
| 40 | + |
| 41 | + new TadaWebRunJob { |
| 42 | + tadaContainerImage = containerImage |
| 43 | + tadaImagePullSecretName = ecrLoginRenewConfigMapResource.imagePullSecretName |
| 44 | + tadaJobCommand = read("env:RUN_JOB_COMMAND") |
| 45 | + tadaSecretName = secretResource.metadata.name |
| 46 | + } |
| 47 | +} |
| 48 | + |
| 49 | +output { |
| 50 | + value = resources |
| 51 | + renderer = (K8sResource.output.renderer as YamlRenderer) { |
| 52 | + isStream = true |
| 53 | + } |
| 54 | +} |
0 commit comments