Added support for custom hosts/domains
This commit is contained in:
parent
a16b5d9a05
commit
6322b64c23
3 changed files with 17 additions and 0 deletions
5
changelogs/unreleased/auto-devops-custom-domains.yml
Normal file
5
changelogs/unreleased/auto-devops-custom-domains.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Added support for custom hosts/domains to Auto DevOps
|
||||
merge_request: 24248
|
||||
author: walkafwalka
|
||||
type: added
|
|
@ -683,6 +683,8 @@ also be customized, and you can easily use a [custom buildpack](#custom-buildpac
|
|||
| `PRODUCTION_REPLICAS` | The number of replicas to deploy in the production environment. This takes precedence over `REPLICAS`; defaults to 1. |
|
||||
| `CANARY_REPLICAS` | The number of canary replicas to deploy for [Canary Deployments](https://docs.gitlab.com/ee/user/project/canary_deployments.html); defaults to 1 |
|
||||
| `CANARY_PRODUCTION_REPLICAS` | The number of canary replicas to deploy for [Canary Deployments](https://docs.gitlab.com/ee/user/project/canary_deployments.html) in the production environment. This takes precedence over `CANARY_REPLICAS`; defaults to 1 |
|
||||
| `ADDITIONAL_HOSTS` | Fully qualified domain names specified as a comma-separated list that are added to the ingress hosts. |
|
||||
| `<ENVIRONMENT>_ADDITIONAL_HOSTS` | For a specific environment, the fully qualified domain names specified as a comma-separated list that are added to the ingress hosts. This takes precedence over `ADDITIONAL_HOSTS`. |
|
||||
| `POSTGRES_ENABLED` | Whether PostgreSQL is enabled; defaults to `"true"`. Set to `false` to disable the automatic deployment of PostgreSQL. |
|
||||
| `POSTGRES_USER` | The PostgreSQL user; defaults to `user`. Set it to use a custom username. |
|
||||
| `POSTGRES_PASSWORD` | The PostgreSQL password; defaults to `testing-password`. Set it to use a custom password. |
|
||||
|
|
|
@ -667,6 +667,14 @@ rollout 100%:
|
|||
|
||||
create_application_secret "$track"
|
||||
|
||||
env_slug=$(echo ${CI_ENVIRONMENT_SLUG//-/_} | tr -s '[:lower:]' '[:upper:]')
|
||||
eval env_ADDITIONAL_HOSTS=\$${env_slug}_ADDITIONAL_HOSTS
|
||||
if [ -n "$env_ADDITIONAL_HOSTS" ]; then
|
||||
additional_hosts="{$env_ADDITIONAL_HOSTS}"
|
||||
elif [ -n "$ADDITIONAL_HOSTS" ]; then
|
||||
additional_hosts="{$ADDITIONAL_HOSTS}"
|
||||
fi
|
||||
|
||||
if [[ -n "$DB_INITIALIZE" && -z "$(helm ls -q "^$name$")" ]]; then
|
||||
echo "Deploying first release with database initialization..."
|
||||
helm upgrade --install \
|
||||
|
@ -681,6 +689,7 @@ rollout 100%:
|
|||
--set application.database_url="$DATABASE_URL" \
|
||||
--set application.secretName="$APPLICATION_SECRET_NAME" \
|
||||
--set service.url="$CI_ENVIRONMENT_URL" \
|
||||
--set service.additionalHosts="$additional_hosts" \
|
||||
--set replicaCount="$replicas" \
|
||||
--set postgresql.enabled="$postgres_enabled" \
|
||||
--set postgresql.nameOverride="postgres" \
|
||||
|
@ -714,6 +723,7 @@ rollout 100%:
|
|||
--set application.database_url="$DATABASE_URL" \
|
||||
--set application.secretName="$APPLICATION_SECRET_NAME" \
|
||||
--set service.url="$CI_ENVIRONMENT_URL" \
|
||||
--set service.additionalHosts="$additional_hosts" \
|
||||
--set replicaCount="$replicas" \
|
||||
--set postgresql.enabled="$postgres_enabled" \
|
||||
--set postgresql.nameOverride="postgres" \
|
||||
|
|
Loading…
Reference in a new issue