Skip to content

Commit

Permalink
[stress] Change prod maintenance day. Fix stress watcher deploy (#7013)
Browse files Browse the repository at this point in the history
  • Loading branch information
benbp authored Sep 27, 2023
1 parent d91913d commit d2b0f98
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function Login([string]$subscription, [string]$clusterGroup, [switch]$skipPushIm
$kubeContext = (RunOrExitOnFailure kubectl config view -o json) | ConvertFrom-Json -AsHashtable
$defaultNamespace = $null
$targetContext = $kubeContext.contexts.Where({ $_.name -eq $clusterName }) | Select -First 1
if ($targetContext -ne $null -and $targetContext.Contains('context') -and $targetContext.Contains('namespace')) {
if ($targetContext -ne $null -and $targetContext.Contains('context') -and $targetContext.context.Contains('namespace')) {
$defaultNamespace = $targetContext.context.namespace
}

Expand Down
3 changes: 2 additions & 1 deletion tools/stress-cluster/cluster/azure/cluster/cluster.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ param clusterName string
param location string = resourceGroup().location
param defaultAgentPoolMinNodes int = 6
param defaultAgentPoolMaxNodes int = 20
param maintenanceWindowDay string = 'Monday'
// AKS does not allow agentPool updates via existing managed cluster resources
param updateNodes bool = false

Expand Down Expand Up @@ -100,7 +101,7 @@ resource maintenanceConfig 'Microsoft.ContainerService/managedClusters/maintenan
startTime: '02:00'
schedule: {
weekly: {
dayOfWeek: 'Monday'
dayOfWeek: maintenanceWindowDay
intervalWeeks: 1
}
}
Expand Down
2 changes: 2 additions & 0 deletions tools/stress-cluster/cluster/azure/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ param staticTestKeyvaultGroup string
param monitoringLocation string = 'centralus'
param defaultAgentPoolMinNodes int = 6
param defaultAgentPoolMaxNodes int = 20
param maintenanceWindowDay string = 'Monday'
param tags object
// AKS does not allow agentPool updates via existing managed cluster resources
param updateNodes bool = false
Expand Down Expand Up @@ -79,6 +80,7 @@ module cluster 'cluster/cluster.bicep' = {
clusterName: clusterName
defaultAgentPoolMinNodes: defaultAgentPoolMinNodes
defaultAgentPoolMaxNodes: defaultAgentPoolMaxNodes
maintenanceWindowDay: maintenanceWindowDay
tags: tags
groupSuffix: groupSuffix
workspaceId: logWorkspace.outputs.id
Expand Down
3 changes: 3 additions & 0 deletions tools/stress-cluster/cluster/azure/parameters/prod.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
"defaultAgentPoolMaxNodes": {
"value": 10
},
"maintenanceWindowDay": {
"value": "Friday"
},
"tags": {
"value": {
"environment": "Prod",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ dependencies:
version: 2.1.4
- name: stress-test-addons
repository: https://stresstestcharts.blob.core.windows.net/helm/
version: 0.2.0
digest: sha256:f9f4b6fa01e634fe3842ed1d257a2618483b1f8972ed85b97fb9abf641c8084a
generated: "2022-11-15T20:35:48.4869487-05:00"
version: 0.3.0
digest: sha256:dc42ee5bb2c0b0427c47ae898ddab359e05a3e224ea22002175f2d74d95a469b
generated: "2023-09-25T21:27:50.950627239-04:00"
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ dependencies:
repository: https://charts.chaos-mesh.org
condition: deploy.chaosmesh
- name: stress-test-addons
version: ~0.2.0
version: ~0.3.0
repository: "@stress-test-charts"
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@ spec:
{{- include "stress-test-addons.env-volumes" $ctx | nindent 8 }}
# Volume template for mounting azure file share for debugging
{{- include "stress-test-addons.debug-file-volumes" $ctx | nindent 8 }}

{{- include "stress-test-addons.static-secrets" . }}

0 comments on commit d2b0f98

Please sign in to comment.