@@ -17,6 +17,7 @@ limitations under the License.
17
17
package options
18
18
19
19
import (
20
+ "context"
20
21
"fmt"
21
22
"net"
22
23
"strings"
@@ -45,27 +46,27 @@ type CompletedOptions struct {
45
46
46
47
// Complete set default ServerRunOptions.
47
48
// Should be called after kube-apiserver flags parsed.
48
- func (opts * ServerRunOptions ) Complete () (CompletedOptions , error ) {
49
- if opts == nil {
49
+ func (s * ServerRunOptions ) Complete (ctx context. Context ) (CompletedOptions , error ) {
50
+ if s == nil {
50
51
return CompletedOptions {completedOptions : & completedOptions {}}, nil
51
52
}
52
53
53
- // process opts .ServiceClusterIPRange from list to Primary and Secondary
54
+ // process s .ServiceClusterIPRange from list to Primary and Secondary
54
55
// we process secondary only if provided by user
55
- apiServerServiceIP , primaryServiceIPRange , secondaryServiceIPRange , err := getServiceIPAndRanges (opts .ServiceClusterIPRanges )
56
+ apiServerServiceIP , primaryServiceIPRange , secondaryServiceIPRange , err := getServiceIPAndRanges (s .ServiceClusterIPRanges )
56
57
if err != nil {
57
58
return CompletedOptions {}, err
58
59
}
59
- controlplane , err := opts .Options .Complete ([]string {"kubernetes.default.svc" , "kubernetes.default" , "kubernetes" }, []net.IP {apiServerServiceIP })
60
+ controlplane , err := s .Options .Complete (ctx , []string {"kubernetes.default.svc" , "kubernetes.default" , "kubernetes" }, []net.IP {apiServerServiceIP })
60
61
if err != nil {
61
62
return CompletedOptions {}, err
62
63
}
63
64
64
65
completed := completedOptions {
65
66
CompletedOptions : controlplane ,
66
- CloudProvider : opts .CloudProvider ,
67
+ CloudProvider : s .CloudProvider ,
67
68
68
- Extra : opts .Extra ,
69
+ Extra : s .Extra ,
69
70
}
70
71
71
72
completed .PrimaryServiceClusterIPRange = primaryServiceIPRange
0 commit comments