Skip to content

Commit cbaa513

Browse files
committed
Merged PR 870: resource quota multi-env support
add support for multi-environemnt - add agent count and size per environment - multiple nginx controllers using classes instead of scopes since resources are not requested/limited in nginx, so it can not be deployed in the same namespace any more due to resource quotas. - align deployment steps and charts - remove nginx controller as dependency | NAME | REVISION | UPDATED | STATUS | CHART | APP VERSION | NAMESPACE | |-------------------------------|----------|--------------------------|----------|-----------------------|-------------|---------------------| | delivery-v0.1.0-dev | 1 | Tue Oct 22 10:44:46 2019 | DEPLOYED | delivery-v0.1.0 | v0.1.0 | backend-dev | | delivery-v0.1.0-prod | 1 | Mon Oct 28 09:05:02 2019 | DEPLOYED | delivery-v0.1.0 | v0.1.0 | backend-prod | | delivery-v0.1.0-qa | 1 | Fri Oct 25 14:30:00 2019 | DEPLOYED | delivery-v0.1.0 | v0.1.0 | backend-qa | | delivery-v0.1.0-staging | 1 | Mon Oct 28 07:59:17 2019 | DEPLOYED | delivery-v0.1.0 | v0.1.0 | backend-staging | | dronescheduler-v0.1.0-dev | 1 | Tue Oct 22 10:46:26 2019 | DEPLOYED | dronescheduler-v0.1.0 | v0.1.0 | backend-dev | | dronescheduler-v0.1.0-prod | 1 | Mon Oct 28 10:08:19 2019 | DEPLOYED | dronescheduler-v0.1.0 | v0.1.0 | backend-prod | | dronescheduler-v0.1.0-qa | 1 | Fri Oct 25 14:06:30 2019 | DEPLOYED | dronescheduler-v0.1.0 | v0.1.0 | backend-qa | | dronescheduler-v0.1.0-staging | 1 | Mon Oct 28 08:31:40 2019 | DEPLOYED | dronescheduler-v0.1.0 | v0.1.0 | backend-staging | | ingestion-v0.1.0-dev | 1 | Tue Oct 22 12:03:20 2019 | DEPLOYED | ingestion-v0.1.0 | v0.1.0 | backend-dev | | ingestion-v0.1.0-prod | 1 | Mon Oct 28 09:47:02 2019 | DEPLOYED | ingestion-v0.1.0 | v0.1.0 | backend-prod | | ingestion-v0.1.0-qa | 1 | Fri Oct 25 14:26:39 2019 | DEPLOYED | ingestion-v0.1.0 | v0.1.0 | backend-qa | | ingestion-v0.1.0-staging | 1 | Mon Oct 28 08:19:48 2019 | DEPLOYED | ingestion-v0.1.0 | v0.1.0 | backend-staging | | nginx-ingress-dev | 1 | Fri Oct 25 14:18:15 2019 | DEPLOYED | nginx-ingress-1.24.4 | 0.26.1 | ingress-controllers | | nginx-ingress-prod | 1 | Mon Oct 28 08:53:16 2019 | DEPLOYED | nginx-ingress-1.24.4 | 0.26.1 | ingress-controllers | | nginx-ingress-qa | 1 | Fri Oct 25 14:08:12 2019 | DEPLOYED | nginx-ingress-1.24.4 | 0.26.1 | ingress-controllers | | nginx-ingress-staging | 1 | Mon Oct 28 07:22:39 2019 | DEPLOYED | nginx-ingress-1.24.4 | 0.26.1 | ingress-controllers | | package-v0.1.0-dev | 1 | Tue Oct 22 10:45:43 2019 | DEPLOYED | package-v0.1.0 | v0.1.0 | backend-dev | | package-v0.1.0-prod | 1 | Mon Oct 28 09:04:37 2019 | DEPLOYED | package-v0.1.0 | v0.1.0 | backend-prod | | package-v0.1.0-qa | 1 | Fri Oct 25 14:27:25 2019 | DEPLOYED | package-v0.1.0 | v0.1.0 | backend-qa | | package-v0.1.0-staging | 1 | Mon Oct 28 08:03:02 2019 | DEPLOYED | package-v0.1.0 | v0.1.0 | backend-staging | | workflow-v0.1.0-dev | 1 | Tue Oct 22 10:45:53 2019 | DEPLOYED | workflow-v0.1.0 | v0.1.0 | backend-dev | | workflow-v0.1.0-prod | 1 | Mon Oct 28 09:4 ...
1 parent 37be908 commit cbaa513

File tree

35 files changed

+189
-136
lines changed

35 files changed

+189
-136
lines changed

azuredeploy.json

Lines changed: 14 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -78,26 +78,6 @@
7878
},
7979
"type": "string"
8080
},
81-
"agentCount": {
82-
"type": "int",
83-
"defaultValue": 1,
84-
"metadata": {
85-
"description": "The number of agents for the cluster. This value can be from 1 to 100 (note, for Kubernetes clusters you will also get 1 or 2 public agents in addition to these seleted masters)"
86-
},
87-
"minValue": 1,
88-
"maxValue": 100
89-
},
90-
"agentVMSize": {
91-
"type": "string",
92-
"defaultValue": "Standard_D2_v2",
93-
"allowedValues": [
94-
"Standard_D2_v2",
95-
"Standard_F8s_v2"
96-
],
97-
"metadata": {
98-
"description": "The size of the Virtual Machine."
99-
}
100-
},
10181
"osType": {
10282
"type": "string",
10383
"defaultValue": "Linux",
@@ -185,7 +165,9 @@
185165
"droneSchedulerKeyVaultName": "[concat(parameters('environmentName'),'-ds-',uniqueString(resourceGroup().id))]",
186166
"droneSchedulerCosmosDbName": "[concat(parameters('environmentName'),'-ds-',uniqueString(resourceGroup().id))]",
187167
"workflowKeyVaultName": "[concat(parameters('environmentName'),'-wf-',uniqueString(resourceGroup().id))]",
188-
"workflowServiceAccessKey": "WorkflowServiceAccessKey"
168+
"workflowServiceAccessKey": "WorkflowServiceAccessKey",
169+
"agentCount": 1,
170+
"agentVMSize": "Standard_D2_v2"
189171
},
190172
"qa": {
191173
"aksClusterName": "[uniqueString(variables('clusterNamePrefix'), resourceGroup().id)]",
@@ -206,7 +188,9 @@
206188
"droneSchedulerKeyVaultName": "[concat(parameters('environmentName'),'-ds-',uniqueString(resourceGroup().id))]",
207189
"droneSchedulerCosmosDbName": "[concat(parameters('environmentName'),'-ds-',uniqueString(resourceGroup().id))]",
208190
"workflowKeyVaultName": "[concat(parameters('environmentName'),'-wf-',uniqueString(resourceGroup().id))]",
209-
"workflowServiceAccessKey": "WorkflowServiceAccessKey"
191+
"workflowServiceAccessKey": "WorkflowServiceAccessKey",
192+
"agentCount": 3,
193+
"agentVMSize": "Standard_D2_v2"
210194
},
211195
"staging": {
212196
"aksClusterName": "[uniqueString(variables('clusterNamePrefix'), resourceGroup().id)]",
@@ -227,7 +211,9 @@
227211
"droneSchedulerKeyVaultName": "[concat(parameters('environmentName'),'-ds-',uniqueString(resourceGroup().id))]",
228212
"droneSchedulerCosmosDbName": "[concat(parameters('environmentName'),'-ds-',uniqueString(resourceGroup().id))]",
229213
"workflowKeyVaultName": "[concat(parameters('environmentName'),'-wf-',uniqueString(resourceGroup().id))]",
230-
"workflowServiceAccessKey": "WorkflowServiceAccessKey"
214+
"workflowServiceAccessKey": "WorkflowServiceAccessKey",
215+
"agentCount": 3,
216+
"agentVMSize": "Standard_D2_v2"
231217
},
232218
"prod": {
233219
"aksClusterName": "[uniqueString(variables('clusterNamePrefix'), resourceGroup().id)]",
@@ -248,7 +234,9 @@
248234
"droneSchedulerKeyVaultName": "[concat(parameters('environmentName'),'-ds-',uniqueString(resourceGroup().id))]",
249235
"droneSchedulerCosmosDbName": "[concat(parameters('environmentName'),'-ds-',uniqueString(resourceGroup().id))]",
250236
"workflowKeyVaultName": "[concat(parameters('environmentName'),'-wf-',uniqueString(resourceGroup().id))]",
251-
"workflowServiceAccessKey": "WorkflowServiceAccessKey"
237+
"workflowServiceAccessKey": "WorkflowServiceAccessKey",
238+
"agentCount": 3,
239+
"agentVMSize": "Standard_D2_v2"
252240
}
253241
}
254242
},
@@ -329,8 +317,8 @@
329317
{
330318
"name": "agentpool",
331319
"osDiskSizeGB": "[parameters('osDiskSizeGB')]",
332-
"count": "[parameters('agentCount')]",
333-
"vmSize": "[parameters('agentVMSize')]",
320+
"count": "[variables('environmentSettings')[parameters('environmentName')].agentCount]",
321+
"vmSize": "[variables('environmentSettings')[parameters('environmentName')].agentVMSize]",
334322
"osType": "[parameters('osType')]",
335323
"storageProfile": "ManagedDisks"
336324
}

charts/delivery/envs/delivery-dev/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ exports:
99
level: "Information"
1010
reason: "new dev deploy"
1111
current: true
12+
ingress:
13+
class: "nginx-dev"
1214
resources:
1315
requests:
1416
cpu: 91m

charts/delivery/envs/delivery-prod/values.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,18 @@
22
nameOverride: delivery
33
exports:
44
data:
5-
replicaCount: 2
5+
replicaCount: 1
66
image:
77
pullPolicy: IfNotPresent
88
telemetry:
99
level: "Error"
1010
reason: "new prod deploy"
11+
ingress:
12+
class: "nginx-prod"
1113
resources:
1214
requests:
1315
cpu: 100m
1416
memory: 350Mi
1517
limits:
1618
cpu: 200m
17-
memory: 500Mi
19+
memory: 500Mi

charts/delivery/envs/delivery-qa/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ exports:
99
level: "Information"
1010
reason: "new qa deploy"
1111
current: true
12+
ingress:
13+
class: "nginx-qa"
1214
resources:
1315
requests:
1416
cpu: 100m

charts/delivery/envs/delivery-staging/values.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,19 @@
22
nameOverride: delivery
33
exports:
44
data:
5-
replicaCount: 2
5+
replicaCount: 1
66
image:
77
pullPolicy: Always
88
telemetry:
99
level: "Information"
1010
reason: "new staging deploy"
1111
current: true
12+
ingress:
13+
class: "nginx-staging"
1214
resources:
1315
requests:
1416
cpu: 100m
1517
memory: 350Mi
1618
limits:
1719
cpu: 200m
18-
memory: 500Mi
20+
memory: 500Mi

charts/delivery/requirements.lock

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
dependencies:
2+
- name: delivery-dev
3+
repository: file://envs/delivery-dev
4+
version: v0.1.0
5+
- name: delivery-prod
6+
repository: file://envs/delivery-prod
7+
version: v0.1.0
8+
- name: delivery-qa
9+
repository: file://envs/delivery-qa
10+
version: v0.1.0
11+
- name: delivery-staging
12+
repository: file://envs/delivery-staging
13+
version: v0.1.0
14+
digest: sha256:8f25310facbaa5f8791424964158ceddd0f5da6994d316422eab26dd02e1e3ec
15+
generated: "2019-10-22T07:45:01.368035081-06:00"

charts/delivery/templates/delivery-ingress.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ kind: Ingress
1515
metadata:
1616
name: {{ $relname }}-ingress
1717
annotations:
18+
kubernetes.io/ingress.class: {{ required "ingress.class is required" .Values.ingress.class | quote }}
1819
nginx.ingress.kubernetes.io/rewrite-target: /api/deliveries/public$1
1920
spec:
2021
{{- if .Values.ingress.tls }}

charts/delivery/templates/delivery-internal-ingress.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ kind: Ingress
1515
metadata:
1616
name: {{ $relname }}-internal-ingress
1717
annotations:
18+
kubernetes.io/ingress.class: {{ required "ingress.class is required" .Values.ingress.class | quote }}
1819
nginx.ingress.kubernetes.io/rewrite-target: /api/deliveries$1
1920
nginx.ingress.kubernetes.io/configuration-snippet: |
2021
internal;

charts/dronescheduler/envs/dronescheduler-dev/values.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ exports:
99
level: "Information"
1010
reason: "new dev deploy"
1111
current: true
12+
ingress:
13+
class: "nginx-dev"
1214
resources:
1315
requests:
1416
cpu: 115m
1517
memory: 350Mi
1618
limits:
1719
cpu: 175m
18-
memory: 500Mi
20+
memory: 500Mi

charts/dronescheduler/envs/dronescheduler-prod/values.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,18 @@
22
nameOverride: dronescheduler
33
exports:
44
data:
5-
replicaCount: 3
5+
replicaCount: 1
66
image:
77
pullPolicy: IfNotPresent
88
telemetry:
99
level: "Error"
1010
reason: "new prod deploy"
11+
ingress:
12+
class: "nginx-prod"
1113
resources:
1214
requests:
1315
cpu: 130m
1416
memory: 350Mi
1517
limits:
1618
cpu: 270m
17-
memory: 500Mi
19+
memory: 500Mi

0 commit comments

Comments
 (0)