File tree Expand file tree Collapse file tree 2 files changed +44
-0
lines changed Expand file tree Collapse file tree 2 files changed +44
-0
lines changed Original file line number Diff line number Diff line change
1
+ /*
2
+ Copyright 2025 The Kubernetes Authors.
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */
16
+
17
+ package do
18
+
19
+ import (
20
+ "math/rand"
21
+ )
22
+
23
+ var allZones = []string {
24
+ "uksouth-1" ,
25
+ }
26
+
27
+ // RandomZones returns a random set of availability zones within a region
28
+ func RandomZones (count int ) ([]string , error ) {
29
+ n := rand .Intn (1000 ) % len (allZones )
30
+ chosenZone := allZones [n ]
31
+
32
+ chosenZones := make ([]string , 0 )
33
+ chosenZones = append (chosenZones , chosenZone )
34
+
35
+ return chosenZones , nil
36
+ }
Original file line number Diff line number Diff line change @@ -81,6 +81,14 @@ func (d *deployer) initialize() error {
81
81
d .SSHPublicKeyPath = os .Getenv ("DO_SSH_PUBLIC_KEY_FILE" )
82
82
}
83
83
d .SSHUser = "root"
84
+ case "azure" :
85
+ if d .SSHPrivateKeyPath == "" {
86
+ d .SSHPrivateKeyPath = os .Getenv ("DO_SSH_PRIVATE_KEY_FILE" )
87
+ }
88
+ if d .SSHPublicKeyPath == "" {
89
+ d .SSHPublicKeyPath = os .Getenv ("DO_SSH_PUBLIC_KEY_FILE" )
90
+ }
91
+ d .SSHUser = "ubuntu"
84
92
case "gce" :
85
93
if d .GCPProject == "" {
86
94
klog .V (1 ).Info ("No GCP project provided, acquiring from Boskos" )
You can’t perform that action at this time.
0 commit comments