Skip to content

Commit

Permalink
+ add support for ingress option
Browse files Browse the repository at this point in the history
  • Loading branch information
mkdior authored Dec 1, 2023
1 parent 9b219f2 commit 8d00c78
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions packages/gcp-cloud-run/src/executors/deploy/deploy.impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ export function deployExecutor(
timeout = null,

cpu,
cpuBoost
cpuBoost,
ingress
} = options

const distDirectory = join(context.root, outputDirectory)
Expand Down Expand Up @@ -112,6 +113,14 @@ export function deployExecutor(
})
.filter(Boolean)

const ingressOpts = ["all", "internal", "internal-and-cloud-load-balancing"];
const validIngress = (typeof ingress === "string") && ingressOpts.includes(ingress);
if (!validIngress) {
logger.warn(
`"${ingress}" is not a valid ingress option! Only the following few options are supported: ${ingressOpts}`
)
}

if (generateRepoInfoFile) {
logger.info('Generating repo info file')

Expand Down Expand Up @@ -155,7 +164,9 @@ export function deployExecutor(
typeof cpuBoost === 'boolean' && !cpuBoost && '--no-cpu-boost',

// There can be a question if a repo should be created
buildWithArtifactRegistry && autoCreateArtifactsRepo && '--quiet'
buildWithArtifactRegistry && autoCreateArtifactsRepo && '--quiet',

validIngress && `--ingress=${ingress}`
])

return Promise.resolve(
Expand Down

0 comments on commit 8d00c78

Please sign in to comment.