public async Task WriteAsync(ScriptSecretsType type, string functionName, ScriptSecrets secrets) { if (!_kubernetesClient.IsWritable) { throw new InvalidOperationException($"{nameof(KubernetesSecretsRepository)} is readonly when no {EnvironmentSettingNames.AzureWebJobsKubernetesSecretName} is specified."); } var newKeys = await Mergekeys(type, functionName, secrets); await _kubernetesClient.UpdateSecrets(newKeys); }
public async Task WriteAsync(ScriptSecretsType type, string functionName, ScriptSecrets secrets) { if (!_kubernetesClient.IsWritable) { throw new InvalidOperationException($"{nameof(KubernetesSecretsRepository)} is readonly when no {EnvironmentSettingNames.AzureWebJobsKubernetesSecretName} is specified."); } if (type == ScriptSecretsType.Function && string.IsNullOrEmpty(functionName)) { throw new ArgumentNullException(nameof(functionName), $"{nameof(functionName)} cannot be null or empty with {nameof(type)} = {nameof(ScriptSecretsType.Function)}"); } functionName = functionName?.ToLowerInvariant(); var newKeys = await Mergekeys(type, functionName, secrets); await _kubernetesClient.UpdateSecrets(newKeys); }