Skip to content

Commit

Permalink
+ add support for ingress option (#185)
Browse files Browse the repository at this point in the history
Hi there, needed this option included, so please let me know if this can
be merged, would be cool. thanks
  • Loading branch information
TriPSs authored Dec 1, 2023
2 parents 9b219f2 + 17f3743 commit 4ba0f0a
Show file tree
Hide file tree
Showing 2 changed files with 14 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
1 change: 1 addition & 0 deletions packages/gcp-cloud-run/src/executors/schema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ export interface ExecutorSchema {
timeout?: number
cpu?: number
cpuBoost?: boolean
ingress?: string
}

0 comments on commit 4ba0f0a

Please sign in to comment.