mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
Merge pull request #5913 from errordeveloper/master
Minor updates to CoreOS/Weave implementation for Azure cloud
This commit is contained in:
commit
884b893370
@ -13,9 +13,9 @@ var inspect = require('util').inspect;
|
|||||||
var util = require('./util.js');
|
var util = require('./util.js');
|
||||||
|
|
||||||
var coreos_image_ids = {
|
var coreos_image_ids = {
|
||||||
'stable': '2b171e93f07c4903bcad35bda10acf22__CoreOS-Stable-557.2.0',
|
'stable': '2b171e93f07c4903bcad35bda10acf22__CoreOS-Stable-607.0.0',
|
||||||
'beta': '2b171e93f07c4903bcad35bda10acf22__CoreOS-Beta-557.2.0',
|
'beta': '2b171e93f07c4903bcad35bda10acf22__CoreOS-Beta-612.1.0', // untested
|
||||||
'alpha': '2b171e93f07c4903bcad35bda10acf22__CoreOS-Alpha-584.0.0',
|
'alpha': '2b171e93f07c4903bcad35bda10acf22__CoreOS-Alpha-626.0.0', // untested
|
||||||
};
|
};
|
||||||
|
|
||||||
var conf = {};
|
var conf = {};
|
||||||
@ -165,17 +165,17 @@ exports.queue_default_network = function () {
|
|||||||
|
|
||||||
exports.queue_storage_if_needed = function() {
|
exports.queue_storage_if_needed = function() {
|
||||||
if (!process.env['AZURE_STORAGE_ACCOUNT']) {
|
if (!process.env['AZURE_STORAGE_ACCOUNT']) {
|
||||||
conf.storage_account = util.rand_suffix;
|
conf.resources['storage_account'] = util.rand_suffix;
|
||||||
task_queue.push([
|
task_queue.push([
|
||||||
'storage', 'account', 'create',
|
'storage', 'account', 'create',
|
||||||
get_location(),
|
get_location(),
|
||||||
conf.storage_account,
|
conf.resources['storage_account'],
|
||||||
]);
|
]);
|
||||||
process.env['AZURE_STORAGE_ACCOUNT'] = conf.storage_account;
|
process.env['AZURE_STORAGE_ACCOUNT'] = conf.resources['storage_account'];
|
||||||
} else {
|
} else {
|
||||||
// Preserve it for resizing, so we don't create a new one by accedent,
|
// Preserve it for resizing, so we don't create a new one by accedent,
|
||||||
// when the environment variable is unset
|
// when the environment variable is unset
|
||||||
conf.storage_account = process.env['AZURE_STORAGE_ACCOUNT'];
|
conf.resources['storage_account'] = process.env['AZURE_STORAGE_ACCOUNT'];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -247,8 +247,7 @@ exports.destroy_cluster = function (state_file) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
task_queue.push(['network', 'vnet', 'delete', '--quiet', conf.resources['vnet']]);
|
task_queue.push(['network', 'vnet', 'delete', '--quiet', conf.resources['vnet']]);
|
||||||
|
task_queue.push(['storage', 'account', 'delete', '--quiet', conf.resources['storage_account']]);
|
||||||
// TODO: add storage deletion when AZURE_STORAGE_ACCOUNT is unset (depends on Azure/azure-xplat-cli#1615)
|
|
||||||
|
|
||||||
exports.run_task_queue();
|
exports.run_task_queue();
|
||||||
};
|
};
|
||||||
@ -265,5 +264,5 @@ exports.load_state_for_resizing = function (state_file, node_type, new_nodes) {
|
|||||||
conf.nodes[node_type] += new_nodes;
|
conf.nodes[node_type] += new_nodes;
|
||||||
hosts.collection = conf.hosts;
|
hosts.collection = conf.hosts;
|
||||||
hosts.ssh_port_counter += conf.hosts.length;
|
hosts.ssh_port_counter += conf.hosts.length;
|
||||||
process.env['AZURE_STORAGE_ACCOUNT'] = conf.storage_account;
|
process.env['AZURE_STORAGE_ACCOUNT'] = conf.resources['storage_account'];
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
"author": "Ilya Dmitrichenko <errordeveloper@gmail.com>",
|
"author": "Ilya Dmitrichenko <errordeveloper@gmail.com>",
|
||||||
"license": "Apache 2.0",
|
"license": "Apache 2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"azure-cli": "^0.8.15",
|
"azure-cli": "^0.8.16",
|
||||||
"colors": "^1.0.3",
|
"colors": "^1.0.3",
|
||||||
"js-yaml": "^3.2.5",
|
"js-yaml": "^3.2.5",
|
||||||
"openssl-wrapper": "^0.2.1",
|
"openssl-wrapper": "^0.2.1",
|
||||||
|
Loading…
Reference in New Issue
Block a user