@catladder/pipeline 0.0.0-fix-error-sql-db-delete-b3878c2e → 0.0.0-fix-error-sql-db-delete-351d46f5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -28351,7 +28351,7 @@ exports.readConfigSync = readConfigSync;
28351
28351
 
28352
28352
  exports.__esModule = true;
28353
28353
  exports.DOCKER_REGISTRY = exports.PIPELINE_IMAGE_TAG = void 0;
28354
- exports.PIPELINE_IMAGE_TAG = "fix-error-sql-db-delete-b3878c2e" || 0;
28354
+ exports.PIPELINE_IMAGE_TAG = "fix-error-sql-db-delete-351d46f5" || 0;
28355
28355
  exports.DOCKER_REGISTRY = "git.panter.ch:5001/catladder/catladder" || 0;
28356
28356
 
28357
28357
  /***/ }),
@@ -29789,20 +29789,21 @@ exports.__esModule = true;
29789
29789
  exports.GCLOUD_RUN_DEPLOY_TYPE = exports.GCLOUD_RUN_CANONICAL_HOST_SUFFIX = exports.GCLOUD_DEPLOY_CREDENTIALS_KEY = void 0;
29790
29790
  var context_1 = __nccwpck_require__(7123);
29791
29791
  var gitlab_1 = __nccwpck_require__(9818);
29792
+ var utils_1 = __nccwpck_require__(4335);
29792
29793
  var deployJob_1 = __nccwpck_require__(5565);
29793
29794
  var jobName_1 = __nccwpck_require__(9357);
29794
29795
  exports.GCLOUD_DEPLOY_CREDENTIALS_KEY = "GCLOUD_DEPLOY_credentialsKey";
29795
29796
  exports.GCLOUD_RUN_CANONICAL_HOST_SUFFIX = "GCLOUD_RUN_canonicalHostSuffix";
29796
29797
  var getCloudSqlVariables = function (_a) {
29797
- var _b, _c, _d, _e;
29798
+ var _b, _c;
29798
29799
  var deployConfigRaw = _a.deployConfigRaw,
29799
29800
  environmentSlugPrefix = _a.environmentSlugPrefix,
29800
29801
  env = _a.env,
29801
29802
  componentName = _a.componentName,
29802
29803
  fullConfig = _a.fullConfig;
29803
29804
  if (deployConfigRaw && deployConfigRaw.cloudSql) {
29804
- var DB_NAME = [(_b = deployConfigRaw.cloudSql.dbNamePrefix) !== null && _b !== void 0 ? _b : "".concat(fullConfig.customerName, "-").concat(fullConfig.appName), environmentSlugPrefix, (_c = deployConfigRaw.cloudSql.dbBaseName) !== null && _c !== void 0 ? _c : componentName].filter(Boolean).join("-");
29805
- var additionalQueryParamsString = Object.entries((_d = deployConfigRaw.cloudSql.dbAdditionalQueryParams) !== null && _d !== void 0 ? _d : {}).map(function (_a) {
29805
+ var DB_NAME = (0, utils_1.getFullDbName)(deployConfigRaw.cloudSql, fullConfig, environmentSlugPrefix, componentName);
29806
+ var additionalQueryParamsString = Object.entries((_b = deployConfigRaw.cloudSql.dbAdditionalQueryParams) !== null && _b !== void 0 ? _b : {}).map(function (_a) {
29806
29807
  var _b = __read(_a, 2),
29807
29808
  key = _b[0],
29808
29809
  value = _b[1];
@@ -29811,7 +29812,7 @@ var getCloudSqlVariables = function (_a) {
29811
29812
  return {
29812
29813
  CLOUD_SQL_INSTANCE_CONNECTION_NAME: deployConfigRaw.cloudSql.instanceConnectionName,
29813
29814
  DB_NAME: DB_NAME,
29814
- DB_USER: (_e = deployConfigRaw.cloudSql.dbUser) !== null && _e !== void 0 ? _e : "postgres",
29815
+ DB_USER: (_c = deployConfigRaw.cloudSql.dbUser) !== null && _c !== void 0 ? _c : "postgres",
29815
29816
  DB_PASSWORD: "$" + (0, context_1.getSecretVarName)(env, componentName, "DB_PASSWORD"),
29816
29817
  DATABASE_URL: "postgresql://$DB_USER:$DB_PASSWORD@localhost/$DB_NAME?host=/cloudsql/$CLOUD_SQL_INSTANCE_CONNECTION_NAME".concat(additionalQueryParamsString),
29817
29818
  DATABASE_JDBC_URL: "jdbc:postgresql:///$DB_NAME?cloudSqlInstance=$CLOUD_SQL_INSTANCE_CONNECTION_NAME&socketFactory=com.google.cloud.sql.postgres.SocketFactory&user=$DB_USER&password=$DB_PASSWORD".concat(additionalQueryParamsString)
@@ -30030,6 +30031,22 @@ exports.getCloudRunJobName = getCloudRunJobName;
30030
30031
 
30031
30032
  /***/ }),
30032
30033
 
30034
+ /***/ 4335:
30035
+ /***/ ((__unused_webpack_module, exports) => {
30036
+
30037
+ "use strict";
30038
+
30039
+
30040
+ exports.__esModule = true;
30041
+ exports.getFullDbName = void 0;
30042
+ var getFullDbName = function (cloudSqlConfig, fullConfig, environmentSlugPrefix, componentName) {
30043
+ var _a, _b;
30044
+ return [(_a = cloudSqlConfig.dbNamePrefix) !== null && _a !== void 0 ? _a : "".concat(fullConfig.customerName, "-").concat(fullConfig.appName), environmentSlugPrefix, (_b = cloudSqlConfig.dbBaseName) !== null && _b !== void 0 ? _b : componentName].filter(Boolean).join("-");
30045
+ };
30046
+ exports.getFullDbName = getFullDbName;
30047
+
30048
+ /***/ }),
30049
+
30033
30050
  /***/ 494:
30034
30051
  /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
30035
30052
 
@@ -30260,8 +30277,9 @@ exports.additionalKubernetesSecretKeys = additionalKubernetesSecretKeys;
30260
30277
 
30261
30278
 
30262
30279
  exports.__esModule = true;
30263
- exports.createCloudsqlBaseConfig = exports.getKubernetesCloudSQLConfig = exports.hasKubernetesCloudSQL = void 0;
30280
+ exports.createKubernetesCloudsqlBaseValues = exports.hasKubernetesCloudSQL = void 0;
30264
30281
  var context_1 = __nccwpck_require__(7123);
30282
+ var utils_1 = __nccwpck_require__(4335);
30265
30283
  var types_1 = __nccwpck_require__(4436);
30266
30284
  var hasKubernetesCloudSQL = function (context) {
30267
30285
  var _a, _b;
@@ -30271,22 +30289,42 @@ var hasKubernetesCloudSQL = function (context) {
30271
30289
  return false;
30272
30290
  };
30273
30291
  exports.hasKubernetesCloudSQL = hasKubernetesCloudSQL;
30274
- var getKubernetesCloudSQLConfig = function (context) {
30275
- var _a;
30276
- if ((0, types_1.isOfDeployType)(context.componentConfig.deploy, "kubernetes")) {
30277
- return (_a = context.componentConfig.deploy.values) === null || _a === void 0 ? void 0 : _a.cloudsql;
30292
+ var createKubernetesCloudsqlBaseValues = function (context) {
30293
+ var _a, _b, _c, _d, _e;
30294
+ if (!(0, types_1.isOfDeployType)(context.componentConfig.deploy, "kubernetes")) {
30295
+ throw new Error("cannot get cloud sql config");
30296
+ }
30297
+ var config = (_a = context.componentConfig.deploy.values) === null || _a === void 0 ? void 0 : _a.cloudsql;
30298
+ if (!config) {
30299
+ throw new Error("cannot get cloud sql config");
30300
+ }
30301
+ var proxyCredentials = "$".concat((0, context_1.getSecretVarNameForContext)(context, "cloudsqlProxyCredentials"));
30302
+ if ((config === null || config === void 0 ? void 0 : config.type) !== "unmanaged") {
30303
+ var instanceConnectionName = "".concat((_b = config.projectId) !== null && _b !== void 0 ? _b : "skynet-164509", ":").concat((_c = config.region) !== null && _c !== void 0 ? _c : "europe-west6", ":").concat((_d = config.instanceId) !== null && _d !== void 0 ? _d : context.environment.envVars.KUBE_NAMESPACE);
30304
+ return {
30305
+ cloudsql: {
30306
+ enabled: config.enabled,
30307
+ dbUser: "postgres",
30308
+ instanceConnectionName: instanceConnectionName,
30309
+ proxyCredentials: proxyCredentials,
30310
+ fullDbName: context.environment.envVars.KUBE_APP_NAME
30311
+ }
30312
+ };
30313
+ } else if (config.type === "unmanaged") {
30314
+ return {
30315
+ cloudsql: {
30316
+ enabled: config.enabled,
30317
+ dbUser: (_e = config.dbUser) !== null && _e !== void 0 ? _e : "postgres",
30318
+ instanceConnectionName: config.instanceConnectionName,
30319
+ proxyCredentials: proxyCredentials,
30320
+ fullDbName: (0, utils_1.getFullDbName)(config, context.fullConfig, context.environment.slugPrefix, context.componentName)
30321
+ }
30322
+ };
30323
+ } else {
30324
+ throw new Error("unknonw type");
30278
30325
  }
30279
- throw new Error("cannot get cloud sql config");
30280
- };
30281
- exports.getKubernetesCloudSQLConfig = getKubernetesCloudSQLConfig;
30282
- var createCloudsqlBaseConfig = function (context) {
30283
- return {
30284
- cloudsql: {
30285
- proxyCredentials: "$".concat((0, context_1.getSecretVarNameForContext)(context, "cloudsqlProxyCredentials"))
30286
- }
30287
- };
30288
30326
  };
30289
- exports.createCloudsqlBaseConfig = createCloudsqlBaseConfig;
30327
+ exports.createKubernetesCloudsqlBaseValues = createKubernetesCloudsqlBaseValues;
30290
30328
 
30291
30329
  /***/ }),
30292
30330
 
@@ -30669,7 +30707,7 @@ var createKubeValues = function (context) {
30669
30707
  var defaultKubeValues = (0, lodash_1.merge)({
30670
30708
  env: env,
30671
30709
  application: createAppConfig(context, application)
30672
- }, (0, cloudSql_1.hasKubernetesCloudSQL)(context) ? (0, cloudSql_1.createCloudsqlBaseConfig)(context) : {}, ((_b = (_a = deployConfig.values) === null || _a === void 0 ? void 0 : _a.mongodb) === null || _b === void 0 ? void 0 : _b.enabled) ? (0, mongodb_1.createMongodbBaseConfig)(context) : {});
30710
+ }, (0, cloudSql_1.hasKubernetesCloudSQL)(context) ? (0, cloudSql_1.createKubernetesCloudsqlBaseValues)(context) : {}, ((_b = (_a = deployConfig.values) === null || _a === void 0 ? void 0 : _a.mongodb) === null || _b === void 0 ? void 0 : _b.enabled) ? (0, mongodb_1.createMongodbBaseConfig)(context) : {});
30673
30711
  var kubeValues = (0, processSecretsAsFiles_1.processSecretsAsFiles)((0, utils_1.mergeWithMergingArrays)(defaultKubeValues, __assign({
30674
30712
  jobs: removeFalsy(jobs),
30675
30713
  cronjobs: removeFalsy(cronjobs)
package/dist/constants.js CHANGED
@@ -2,5 +2,5 @@
2
2
 
3
3
  exports.__esModule = true;
4
4
  exports.DOCKER_REGISTRY = exports.PIPELINE_IMAGE_TAG = void 0;
5
- exports.PIPELINE_IMAGE_TAG = "fix-error-sql-db-delete-b3878c2e" || "";
5
+ exports.PIPELINE_IMAGE_TAG = "fix-error-sql-db-delete-351d46f5" || "";
6
6
  exports.DOCKER_REGISTRY = "git.panter.ch:5001/catladder/catladder" || "";
@@ -45,20 +45,21 @@ exports.__esModule = true;
45
45
  exports.GCLOUD_RUN_DEPLOY_TYPE = exports.GCLOUD_RUN_CANONICAL_HOST_SUFFIX = exports.GCLOUD_DEPLOY_CREDENTIALS_KEY = void 0;
46
46
  var context_1 = require("../../context");
47
47
  var gitlab_1 = require("../../utils/gitlab");
48
+ var utils_1 = require("../cloudSql/utils");
48
49
  var deployJob_1 = require("./deployJob");
49
50
  var jobName_1 = require("./utils/jobName");
50
51
  exports.GCLOUD_DEPLOY_CREDENTIALS_KEY = "GCLOUD_DEPLOY_credentialsKey";
51
52
  exports.GCLOUD_RUN_CANONICAL_HOST_SUFFIX = "GCLOUD_RUN_canonicalHostSuffix";
52
53
  var getCloudSqlVariables = function (_a) {
53
- var _b, _c, _d, _e;
54
+ var _b, _c;
54
55
  var deployConfigRaw = _a.deployConfigRaw,
55
56
  environmentSlugPrefix = _a.environmentSlugPrefix,
56
57
  env = _a.env,
57
58
  componentName = _a.componentName,
58
59
  fullConfig = _a.fullConfig;
59
60
  if (deployConfigRaw && deployConfigRaw.cloudSql) {
60
- var DB_NAME = [(_b = deployConfigRaw.cloudSql.dbNamePrefix) !== null && _b !== void 0 ? _b : "".concat(fullConfig.customerName, "-").concat(fullConfig.appName), environmentSlugPrefix, (_c = deployConfigRaw.cloudSql.dbBaseName) !== null && _c !== void 0 ? _c : componentName].filter(Boolean).join("-");
61
- var additionalQueryParamsString = Object.entries((_d = deployConfigRaw.cloudSql.dbAdditionalQueryParams) !== null && _d !== void 0 ? _d : {}).map(function (_a) {
61
+ var DB_NAME = (0, utils_1.getFullDbName)(deployConfigRaw.cloudSql, fullConfig, environmentSlugPrefix, componentName);
62
+ var additionalQueryParamsString = Object.entries((_b = deployConfigRaw.cloudSql.dbAdditionalQueryParams) !== null && _b !== void 0 ? _b : {}).map(function (_a) {
62
63
  var _b = __read(_a, 2),
63
64
  key = _b[0],
64
65
  value = _b[1];
@@ -67,7 +68,7 @@ var getCloudSqlVariables = function (_a) {
67
68
  return {
68
69
  CLOUD_SQL_INSTANCE_CONNECTION_NAME: deployConfigRaw.cloudSql.instanceConnectionName,
69
70
  DB_NAME: DB_NAME,
70
- DB_USER: (_e = deployConfigRaw.cloudSql.dbUser) !== null && _e !== void 0 ? _e : "postgres",
71
+ DB_USER: (_c = deployConfigRaw.cloudSql.dbUser) !== null && _c !== void 0 ? _c : "postgres",
71
72
  DB_PASSWORD: "$" + (0, context_1.getSecretVarName)(env, componentName, "DB_PASSWORD"),
72
73
  DATABASE_URL: "postgresql://$DB_USER:$DB_PASSWORD@localhost/$DB_NAME?host=/cloudsql/$CLOUD_SQL_INSTANCE_CONNECTION_NAME".concat(additionalQueryParamsString),
73
74
  DATABASE_JDBC_URL: "jdbc:postgresql:///$DB_NAME?cloudSqlInstance=$CLOUD_SQL_INSTANCE_CONNECTION_NAME&socketFactory=com.google.cloud.sql.postgres.SocketFactory&user=$DB_USER&password=$DB_PASSWORD".concat(additionalQueryParamsString)
@@ -0,0 +1,3 @@
1
+ import type { Config } from "../..";
2
+ import type { DeployConfigCloudRunCloudSql, DeployConfigKubernetesValuesCloudSQLUnmanaged } from "../types";
3
+ export declare const getFullDbName: (cloudSqlConfig: DeployConfigCloudRunCloudSql | DeployConfigKubernetesValuesCloudSQLUnmanaged, fullConfig: Config<never>, environmentSlugPrefix: string, componentName: string) => string;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.getFullDbName = void 0;
5
+ var getFullDbName = function (cloudSqlConfig, fullConfig, environmentSlugPrefix, componentName) {
6
+ var _a, _b;
7
+ return [(_a = cloudSqlConfig.dbNamePrefix) !== null && _a !== void 0 ? _a : "".concat(fullConfig.customerName, "-").concat(fullConfig.appName), environmentSlugPrefix, (_b = cloudSqlConfig.dbBaseName) !== null && _b !== void 0 ? _b : componentName].filter(Boolean).join("-");
8
+ };
9
+ exports.getFullDbName = getFullDbName;
@@ -1,13 +1,13 @@
1
1
  import type { Context } from "../../../types";
2
2
  export declare const hasKubernetesCloudSQL: (context: Context) => boolean | undefined;
3
- export declare const getKubernetesCloudSQLConfig: (context: Context) => {
3
+ declare type CloudSqlValues = {
4
4
  enabled: boolean;
5
- instanceId?: string | undefined;
6
- projectId?: string | undefined;
7
- region?: string | undefined;
8
- } | undefined;
9
- export declare const createCloudsqlBaseConfig: (context: Context) => {
10
- cloudsql: {
11
- proxyCredentials: string;
12
- };
13
- };
5
+ proxyCredentials: string;
6
+ instanceConnectionName: string;
7
+ fullDbName: string;
8
+ dbUser: string;
9
+ };
10
+ export declare const createKubernetesCloudsqlBaseValues: (context: Context) => {
11
+ cloudsql: CloudSqlValues;
12
+ };
13
+ export {};
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.createCloudsqlBaseConfig = exports.getKubernetesCloudSQLConfig = exports.hasKubernetesCloudSQL = void 0;
4
+ exports.createKubernetesCloudsqlBaseValues = exports.hasKubernetesCloudSQL = void 0;
5
5
  var context_1 = require("../../../context");
6
+ var utils_1 = require("../../cloudSql/utils");
6
7
  var types_1 = require("../../types");
7
8
  var hasKubernetesCloudSQL = function (context) {
8
9
  var _a, _b;
@@ -12,19 +13,39 @@ var hasKubernetesCloudSQL = function (context) {
12
13
  return false;
13
14
  };
14
15
  exports.hasKubernetesCloudSQL = hasKubernetesCloudSQL;
15
- var getKubernetesCloudSQLConfig = function (context) {
16
- var _a;
17
- if ((0, types_1.isOfDeployType)(context.componentConfig.deploy, "kubernetes")) {
18
- return (_a = context.componentConfig.deploy.values) === null || _a === void 0 ? void 0 : _a.cloudsql;
16
+ var createKubernetesCloudsqlBaseValues = function (context) {
17
+ var _a, _b, _c, _d, _e;
18
+ if (!(0, types_1.isOfDeployType)(context.componentConfig.deploy, "kubernetes")) {
19
+ throw new Error("cannot get cloud sql config");
20
+ }
21
+ var config = (_a = context.componentConfig.deploy.values) === null || _a === void 0 ? void 0 : _a.cloudsql;
22
+ if (!config) {
23
+ throw new Error("cannot get cloud sql config");
24
+ }
25
+ var proxyCredentials = "$".concat((0, context_1.getSecretVarNameForContext)(context, "cloudsqlProxyCredentials"));
26
+ if ((config === null || config === void 0 ? void 0 : config.type) !== "unmanaged") {
27
+ var instanceConnectionName = "".concat((_b = config.projectId) !== null && _b !== void 0 ? _b : "skynet-164509", ":").concat((_c = config.region) !== null && _c !== void 0 ? _c : "europe-west6", ":").concat((_d = config.instanceId) !== null && _d !== void 0 ? _d : context.environment.envVars.KUBE_NAMESPACE);
28
+ return {
29
+ cloudsql: {
30
+ enabled: config.enabled,
31
+ dbUser: "postgres",
32
+ instanceConnectionName: instanceConnectionName,
33
+ proxyCredentials: proxyCredentials,
34
+ fullDbName: context.environment.envVars.KUBE_APP_NAME
35
+ }
36
+ };
37
+ } else if (config.type === "unmanaged") {
38
+ return {
39
+ cloudsql: {
40
+ enabled: config.enabled,
41
+ dbUser: (_e = config.dbUser) !== null && _e !== void 0 ? _e : "postgres",
42
+ instanceConnectionName: config.instanceConnectionName,
43
+ proxyCredentials: proxyCredentials,
44
+ fullDbName: (0, utils_1.getFullDbName)(config, context.fullConfig, context.environment.slugPrefix, context.componentName)
45
+ }
46
+ };
47
+ } else {
48
+ throw new Error("unknonw type");
19
49
  }
20
- throw new Error("cannot get cloud sql config");
21
- };
22
- exports.getKubernetesCloudSQLConfig = getKubernetesCloudSQLConfig;
23
- var createCloudsqlBaseConfig = function (context) {
24
- return {
25
- cloudsql: {
26
- proxyCredentials: "$".concat((0, context_1.getSecretVarNameForContext)(context, "cloudsqlProxyCredentials"))
27
- }
28
- };
29
50
  };
30
- exports.createCloudsqlBaseConfig = createCloudsqlBaseConfig;
51
+ exports.createKubernetesCloudsqlBaseValues = createKubernetesCloudsqlBaseValues;
@@ -64,12 +64,7 @@ export declare const createKubeValues: (context: Context) => never[] | ({
64
64
  } | undefined;
65
65
  }> | undefined;
66
66
  } & {
67
- cloudsql?: {
68
- enabled: boolean;
69
- instanceId?: string | undefined;
70
- projectId?: string | undefined;
71
- region?: string | undefined;
72
- } | undefined;
67
+ cloudsql?: import("../types").DeployConfigKubernetesValuesCloudSQL | undefined;
73
68
  mongodb?: import("../types").DeployConfigMongodb | undefined;
74
69
  mailhog?: {
75
70
  enabled: boolean;
@@ -114,7 +114,7 @@ var createKubeValues = function (context) {
114
114
  var defaultKubeValues = (0, lodash_1.merge)({
115
115
  env: env,
116
116
  application: createAppConfig(context, application)
117
- }, (0, cloudSql_1.hasKubernetesCloudSQL)(context) ? (0, cloudSql_1.createCloudsqlBaseConfig)(context) : {}, ((_b = (_a = deployConfig.values) === null || _a === void 0 ? void 0 : _a.mongodb) === null || _b === void 0 ? void 0 : _b.enabled) ? (0, mongodb_1.createMongodbBaseConfig)(context) : {});
117
+ }, (0, cloudSql_1.hasKubernetesCloudSQL)(context) ? (0, cloudSql_1.createKubernetesCloudsqlBaseValues)(context) : {}, ((_b = (_a = deployConfig.values) === null || _a === void 0 ? void 0 : _a.mongodb) === null || _b === void 0 ? void 0 : _b.enabled) ? (0, mongodb_1.createMongodbBaseConfig)(context) : {});
118
118
  var kubeValues = (0, processSecretsAsFiles_1.processSecretsAsFiles)((0, utils_1.mergeWithMergingArrays)(defaultKubeValues, __assign({
119
119
  jobs: removeFalsy(jobs),
120
120
  cronjobs: removeFalsy(cronjobs)
@@ -3,12 +3,7 @@ export declare const processSecretsAsFiles: <T extends {
3
3
  secret: Record<string, string>;
4
4
  };
5
5
  } & {
6
- cloudsql?: {
7
- enabled: boolean;
8
- instanceId?: string | undefined;
9
- projectId?: string | undefined;
10
- region?: string | undefined;
11
- } | undefined;
6
+ cloudsql?: import("../types").DeployConfigKubernetesValuesCloudSQL | undefined;
12
7
  mongodb?: import("../types").DeployConfigMongodb | undefined;
13
8
  mailhog?: {
14
9
  enabled: boolean;
@@ -119,16 +119,64 @@ export declare type DeployConfigMongodbReplicaset = {
119
119
  replicaCount?: number;
120
120
  };
121
121
  export declare type DeployConfigMongodb = DeployConfigMongodbBase & (DeployConfigMongodbStandalone | DeployConfigMongodbReplicaset);
122
+ /**
123
+ * @deprecated use config with instanceConnectionName
124
+ */
125
+ declare type DeployConfigKubernetesValuesCloudSQLLegacy = {
126
+ enabled: boolean;
127
+ /**
128
+ * @deprecated use config with instanceConnectionName
129
+ */
130
+ instanceId?: string;
131
+ /**
132
+ * @deprecated use config with instanceConnectionName
133
+ */
134
+ projectId?: string;
135
+ /**
136
+ * @deprecated use config with instanceConnectionName
137
+ */
138
+ region?: string;
139
+ /**
140
+ * @deprecated use type "unmanaged".
141
+ *
142
+ * Be aware that "unmanaged" is not fully backward compatible with "legacy".
143
+ *
144
+ *
145
+ */
146
+ type?: "legacy";
147
+ };
148
+ export declare type DeployConfigKubernetesValuesCloudSQLUnmanaged = {
149
+ enabled: boolean;
150
+ instanceConnectionName: string;
151
+ /**
152
+ * the recommended type for the config.
153
+ *
154
+ * this mode is similar to cloudrun and declares fully-qualified db names including env.
155
+ *
156
+ * This makes it easier to share db instances across envs and dbs
157
+ */
158
+ type: "unmanaged";
159
+ /**
160
+ * the database username, defaults to "postgres"
161
+ */
162
+ dbUser?: string;
163
+ /**
164
+ * the prefix of the database, the full db name is this plus the environment slug prefix plus the componentName
165
+ *
166
+ * defaults to customerName-appName
167
+ */
168
+ dbNamePrefix?: string | false;
169
+ /**
170
+ * the base name of the db, defaults to the componentName
171
+ */
172
+ dbBaseName?: string;
173
+ };
174
+ export declare type DeployConfigKubernetesValuesCloudSQL = DeployConfigKubernetesValuesCloudSQLLegacy | DeployConfigKubernetesValuesCloudSQLUnmanaged;
122
175
  export declare type DeployConfigKubernetesValues = AllowUnknownProps<{
123
176
  /**
124
177
  * enable cloudsql db. Currently you have to manually set it up
125
178
  */
126
- cloudsql?: {
127
- enabled: boolean;
128
- instanceId?: string;
129
- projectId?: string;
130
- region?: string;
131
- };
179
+ cloudsql?: DeployConfigKubernetesValuesCloudSQL;
132
180
  /**
133
181
  * enable mongodb. The mongodb is deployed using a helm chart.
134
182
  * See https://github.com/bitnami/charts/tree/master/bitnami/mongodb