Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion deploy/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ services:
environment:
# For Terraform
- TF_VAR_domain=${API_FQDN}
- TF_VAR_additionalDomain=${API_ADDITIONAL_FQDN}
- TF_VAR_username=${USER}
- TF_VAR_environment=${environment}
- TF_VAR_subscriptionId=${subscriptionId}
Expand Down
17 changes: 0 additions & 17 deletions deploy/helm/ifrcgo-helm/templates/api/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ spec:
- hosts:
- {{ .Values.api.domain }}
secretName: {{ template "ifrcgo-helm.fullname" . }}-secret-api-cert
{{- if .Values.api.additionalDomain }}
- hosts:
- {{ .Values.api.additionalDomain }}
secretName: {{ template "ifrcgo-helm.fullname" . }}-secret-api-additional-domain-cert
{{- end }}

rules:
- host: {{ .Values.api.domain }}
Expand All @@ -31,16 +26,4 @@ spec:
name: {{ template "ifrcgo-helm.fullname" . }}-api
port:
number: 80
{{- if .Values.api.additionalDomain }}
- host: {{ .Values.api.additionalDomain }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ template "ifrcgo-helm.fullname" . }}-api
port:
number: 80
{{- end }}
{{- end }}
13 changes: 0 additions & 13 deletions deploy/helm/ifrcgo-helm/templates/api/secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,3 @@ type: kubernetes.io/tls
data:
tls.crt: {{ .Values.secrets.API_TLS_CRT | quote}}
tls.key: {{ .Values.secrets.API_TLS_KEY | quote}}

---

{{- if .Values.api.additionalDomain }}
apiVersion: v1
kind: Secret
metadata:
name: {{ template "ifrcgo-helm.fullname" . }}-secret-api-additional-domain-cert
type: kubernetes.io/tls
data:
tls.crt: {{ .Values.secrets.API_ADDITIONAL_DOMAIN_TLS_CRT | quote}}
tls.key: {{ .Values.secrets.API_ADDITIONAL_DOMAIN_TLS_KEY | quote}}
{{- end }}
1 change: 0 additions & 1 deletion deploy/helm/ifrcgo-helm/values-production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ env:

api:
domain: goadmin.ifrc.org
additionalDomain: api.go.ifrc.org
replicaCount: 2
resources:
requests:
Expand Down
1 change: 0 additions & 1 deletion deploy/helm/ifrcgo-helm/values-staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ env:

api:
domain: goadmin-stage.ifrc.org
additionalDomain: ""
replicaCount: 1
resources:
requests:
Expand Down
1 change: 0 additions & 1 deletion deploy/helm/ifrcgo-helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ secrets:

api:
domain: "go-staging.ifrc.org"
additionalDomain: ""
enabled: true
replicaCount: 1
containerPort: 80
Expand Down
1 change: 0 additions & 1 deletion deploy/terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ module "resources" {
environment = var.environment
subscriptionId = var.subscriptionId
domain = var.domain
additionalDomain = var.additionalDomain
DJANGO_SECRET_KEY = var.DJANGO_SECRET_KEY
DJANGO_DB_NAME = var.DJANGO_DB_NAME
DJANGO_DB_USER = var.DJANGO_DB_USER
Expand Down
5 changes: 0 additions & 5 deletions deploy/terraform/resources/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ variable "domain" {
type = string
}

variable "additionalDomain" {
type = string
default = ""
}

variable "DJANGO_SECRET_KEY" {
type = string
}
Expand Down
5 changes: 0 additions & 5 deletions deploy/terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ variable "domain" {
type = string
}

variable "additionalDomain" {
type = string
default = ""
}

variable "DJANGO_SECRET_KEY" {
type = string
}
Expand Down
2 changes: 1 addition & 1 deletion main/k8s_runserver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ python manage.py collectstatic --noinput -l

# Add server name(s) to django settings and nginx - later maybe only nginx would be enough, and ALLOWED_HOSTS could be "*"
if [ "$GO_ENVIRONMENT"x = productionx ]; then
sed -i 's/\$NGINX_SERVER_NAME/'$API_FQDN' api.go.ifrc.org/g' /etc/nginx/sites-available/nginx.conf
sed -i 's/\$NGINX_SERVER_NAME/'$API_FQDN'/g' /etc/nginx/sites-available/nginx.conf
sed -i 's/CHANGE_ME_BEFORE_START/prod/' /etc/nginx/sites-available/nginx.conf
else
sed -i 's/\$NGINX_SERVER_NAME/'$API_FQDN'/g' /etc/nginx/sites-available/nginx.conf
Expand Down
2 changes: 1 addition & 1 deletion main/runserver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ python manage.py collectstatic --noinput -l

# Add server name(s) to django settings and nginx - later maybe only nginx would be enough, and ALLOWED_HOSTS could be "*"
if [ "$GO_ENVIRONMENT"x = productionx ]; then
sed -i 's/\$NGINX_SERVER_NAME/'$API_FQDN' api.go.ifrc.org/g' /etc/nginx/sites-available/nginx.conf
sed -i 's/\$NGINX_SERVER_NAME/'$API_FQDN'/g' /etc/nginx/sites-available/nginx.conf
sed -i 's/CHANGE_ME_BEFORE_START/prod/' /etc/nginx/sites-available/nginx.conf
else
sed -i 's/\$NGINX_SERVER_NAME/'$API_FQDN'/g' /etc/nginx/sites-available/nginx.conf
Expand Down