mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-17 12:28:07 +00:00
Reverting Enable/Disable App Function Changes - Force -net
App Function To Only Run Agent
Functions (#2660)
* Testing app function. * Addding functions back. * Fixing name. * updating to string. * Fixing bicep. * Fixing function names. * Update src/ApiService/ApiService/Functions/ReproVmss.cs Co-authored-by: George Pollard <gpollard@microsoft.com> * Adding route specifier. * Update src/ApiService/ApiService/Functions/NodeAddSshKey.cs Co-authored-by: George Pollard <gpollard@microsoft.com> * Update src/ApiService/ApiService/Functions/WebhookLogs.cs Co-authored-by: George Pollard <gpollard@microsoft.com> * Update src/ApiService/ApiService/Functions/WebhookPing.cs Co-authored-by: George Pollard <gpollard@microsoft.com> * Fixing function names. * Increasing pool_size * Adding logging statements. * Adding check for transient failure. * Adding check to else. * Fix var * Adding retry logic to dbg_lnx * FIxing retry. * Maybe fixed integration test. * Formatting. * Adding try and fail logic. * Changing error. * Refactoring logic. * Fixing logic. * Logic. * Removing bad comparison. * Fixing. * All ready. * Switching back to call. * Add. * Fixing * Adding quit back. * Reversing cli changes. * Removing bad file. * Formatting. Co-authored-by: George Pollard <gpollard@microsoft.com>
This commit is contained in:
committed by
GitHub
parent
d17d50d536
commit
7fc6fc3668
@ -278,6 +278,46 @@ module functionSettings 'bicep-templates/function-settings.bicep' = {
|
||||
monitor_account_name: operationalInsights.outputs.monitorAccountName
|
||||
multi_tenant_domain: multi_tenant_domain
|
||||
enable_profiler: enable_profiler
|
||||
functions_disabled: '0'
|
||||
agent_function_names: [
|
||||
'AgentCanSchedule' //0
|
||||
'AgentCommands' //1
|
||||
'AgentEvents' //2
|
||||
'AgentRegistration' //3
|
||||
'Containers' //4
|
||||
'Download' //5
|
||||
'Info' //6
|
||||
'InstanceConfig' //7
|
||||
'Jobs' //8
|
||||
'JobTemplates' //9
|
||||
'JobTemplatesManage' //10
|
||||
'Negotiate' //11
|
||||
'Node' //12
|
||||
'NodeAddSshKey' //13
|
||||
'Notifications' //14
|
||||
'Pool' //15
|
||||
'Proxy' //16
|
||||
'QueueFileChanges' //17
|
||||
'QueueNodeHeartbeat' //18
|
||||
'QueueProxyUpdate' //19
|
||||
'QueueSignalrEvents' //20
|
||||
'QueueTaskHeartbeat' //21
|
||||
'QueueUpdates' //22
|
||||
'QueueWebhooks' //23
|
||||
'ReproVms' //24
|
||||
'Scaleset' //25
|
||||
'Tasks' //26
|
||||
'TimerDaily' //27
|
||||
'TimerProxy' //28
|
||||
'TimerRepro' //29
|
||||
'TimerRetention' //30
|
||||
'TimerTasks' //31
|
||||
'TimerWorkers' //32
|
||||
'Tools' //33
|
||||
'Webhooks' //34
|
||||
'WebhooksLogs' //35
|
||||
'WebhooksPing' //36
|
||||
]
|
||||
}
|
||||
dependsOn: [
|
||||
function
|
||||
@ -304,6 +344,46 @@ module netFunctionSettings 'bicep-templates/function-settings.bicep' = {
|
||||
monitor_account_name: operationalInsights.outputs.monitorAccountName
|
||||
multi_tenant_domain: multi_tenant_domain
|
||||
enable_profiler: enable_profiler
|
||||
functions_disabled: '1'
|
||||
agent_function_names: [
|
||||
'AgentCanSchedule' //0
|
||||
'AgentCommands' //1
|
||||
'AgentEvents' //2
|
||||
'AgentRegistration' //3
|
||||
'Containers' //4
|
||||
'Download' //5
|
||||
'Info' //6
|
||||
'InstanceConfig' //7
|
||||
'Jobs' //8
|
||||
'JobTemplates' //9
|
||||
'JobTemplatesManage' //10
|
||||
'Negotiate' //11
|
||||
'Node' //12
|
||||
'NodeAddSshKey' //13
|
||||
'Notifications' //14
|
||||
'Pool' //15
|
||||
'Proxy' //16
|
||||
'QueueFileChanges' //17
|
||||
'QueueNodeHeartbeat' //18
|
||||
'QueueProxyUpdate' //19
|
||||
'QueueSignalrEvents' //20
|
||||
'QueueTaskHeartbeat' //21
|
||||
'QueueUpdates' //22
|
||||
'QueueWebhooks' //23
|
||||
'ReproVms' //24
|
||||
'Scaleset' //25
|
||||
'Tasks' //26
|
||||
'TimerDaily' //27
|
||||
'TimerProxy' //28
|
||||
'TimerRepro' //29
|
||||
'TimerRetention' //30
|
||||
'TimerTasks' //31
|
||||
'TimerWorkers' //32
|
||||
'Tools' //33
|
||||
'Webhooks' //34
|
||||
'WebhookLogs' //35
|
||||
'WebhookPing' //36
|
||||
]
|
||||
}
|
||||
dependsOn: [
|
||||
netFunction
|
||||
|
@ -5,10 +5,10 @@ param allFunctions array
|
||||
var disabledFunctions = [for f in allFunctions: 'AzureWebJobs.${f}.Disabled' ]
|
||||
|
||||
var disabledFunctionsAppSettings = {
|
||||
'${disabledFunctions[0]}' : functions_disabled_setting
|
||||
'${disabledFunctions[1]}' : functions_disabled_setting
|
||||
'${disabledFunctions[2]}' : functions_disabled_setting
|
||||
'${disabledFunctions[3]}' : functions_disabled_setting
|
||||
'${disabledFunctions[0]}' : 0
|
||||
'${disabledFunctions[1]}' : 0
|
||||
'${disabledFunctions[2]}' : 0
|
||||
'${disabledFunctions[3]}' : 0
|
||||
'${disabledFunctions[4]}' : functions_disabled_setting
|
||||
|
||||
'${disabledFunctions[5]}' : functions_disabled_setting
|
||||
|
@ -26,14 +26,27 @@ param monitor_account_name string
|
||||
param functions_worker_runtime string
|
||||
param functions_extension_version string
|
||||
|
||||
param agent_function_names array
|
||||
param functions_disabled string
|
||||
|
||||
param enable_profiler bool
|
||||
|
||||
var disabledFunctionName = 'disabledFunctions-${name}'
|
||||
|
||||
var telemetry = 'd7a73cf4-5a1a-4030-85e1-e5b25867e45a'
|
||||
|
||||
resource function 'Microsoft.Web/sites@2021-02-01' existing = {
|
||||
name: name
|
||||
}
|
||||
|
||||
module disabledFunctions 'function-settings-disabled-apps.bicep' = {
|
||||
name: disabledFunctionName
|
||||
params:{
|
||||
functions_disabled_setting: functions_disabled
|
||||
allFunctions: agent_function_names
|
||||
}
|
||||
}
|
||||
|
||||
var enable_profilers = enable_profiler ? {
|
||||
APPINSIGHTS_PROFILERFEATURE_VERSION : '1.0.0'
|
||||
DiagnosticServices_EXTENSION_VERSION: '~3'
|
||||
@ -63,5 +76,5 @@ resource functionSettings 'Microsoft.Web/sites/config@2021-03-01' = {
|
||||
ONEFUZZ_KEYVAULT: keyvault_name
|
||||
ONEFUZZ_OWNER: owner
|
||||
ONEFUZZ_CLIENT_SECRET: client_secret
|
||||
}, enable_profilers)
|
||||
}, disabledFunctions.outputs.appSettings, enable_profilers)
|
||||
}
|
||||
|
Reference in New Issue
Block a user