@@ -77,14 +77,11 @@ def start_helper_sidecar_command(
77
77
# pylint: disable=too-many-arguments
78
78
def start_traefik_command (
79
79
config_path : Path ,
80
- root_domain : str ,
81
- helper_domain : str | None ,
82
- sidecar_domain : str | None ,
80
+ helper_domain : str ,
81
+ sidecar_domain : str ,
83
82
helper_port : int ,
84
83
sidecar_port : int ,
85
84
):
86
- sidecar_domain = sidecar_domain or f"sidecar.{ root_domain } "
87
- helper_domain = helper_domain or f"helper.{ root_domain } "
88
85
env = {
89
86
** os .environ ,
90
87
"SIDECAR_DOMAIN" : sidecar_domain ,
@@ -136,18 +133,16 @@ def start_traefik_local_command(
136
133
show_default = True ,
137
134
)
138
135
@click .option ("--root_path" , type = click_pathlib .Path (), default = None )
139
- @click .option ("--root_domain" , type = str , default = "ipa-helper.dev" )
140
- @click .option ("--helper_domain" , type = str , default = None )
141
- @click .option ("--sidecar_domain" , type = str , default = None )
136
+ @click .option ("--helper_domain" , required = True , type = str )
137
+ @click .option ("--sidecar_domain" , required = True , type = str )
142
138
@click .option ("--helper_port" , type = int , default = 7430 )
143
139
@click .option ("--sidecar_port" , type = int , default = 17430 )
144
140
@click .option ("--identity" , required = True , type = int )
145
141
def run_helper_sidecar (
146
142
config_path : Path ,
147
143
root_path : Path ,
148
- root_domain : str ,
149
- helper_domain : str | None ,
150
- sidecar_domain : str | None ,
144
+ helper_domain : str ,
145
+ sidecar_domain : str ,
151
146
helper_port : int ,
152
147
sidecar_port : int ,
153
148
identity : int ,
@@ -161,7 +156,6 @@ def run_helper_sidecar(
161
156
)
162
157
traefik_command = start_traefik_command (
163
158
config_path = config_path ,
164
- root_domain = root_domain ,
165
159
helper_domain = helper_domain ,
166
160
sidecar_domain = sidecar_domain ,
167
161
helper_port = helper_port ,
@@ -179,16 +173,14 @@ def run_helper_sidecar(
179
173
show_default = True ,
180
174
)
181
175
@click .option ("--root_path" , type = click_pathlib .Path (), default = Path ("." ))
182
- @click .option ("--root_domain" , type = str , default = "ipa-helper.dev" )
183
- @click .option ("--helper_domain" , type = str , default = "" )
184
- @click .option ("--sidecar_domain" , type = str , default = "" )
176
+ @click .option ("--helper_domain" , required = True , type = str )
177
+ @click .option ("--sidecar_domain" , required = True , type = str )
185
178
@click .option ("--helper_port" , type = int , default = 7430 )
186
179
@click .option ("--sidecar_port" , type = int , default = 17430 )
187
180
@click .option ("--identity" , required = True , type = int )
188
181
def start_helper_sidecar (
189
182
config_path : Path ,
190
183
root_path : Path ,
191
- root_domain : str ,
192
184
helper_domain : str ,
193
185
sidecar_domain : str ,
194
186
helper_port : int ,
@@ -205,8 +197,10 @@ def start_helper_sidecar(
205
197
script_path = root_path / Path ("etc/start_helper_sidecar.sh" )
206
198
207
199
start_command = Command (
208
- cmd = f"{ script_path } { config_path } { root_path } { root_domain } "
209
- f"{ helper_domain } { sidecar_domain } { helper_port } { sidecar_port } { identity } " ,
200
+ cmd = (
201
+ f"{ script_path } { config_path } { root_path } { helper_domain } { sidecar_domain } "
202
+ f"{ helper_port } { sidecar_port } { identity } "
203
+ ),
210
204
)
211
205
start_command .run_blocking_no_output_capture ()
212
206
print ("draft helper_sidecar started" )
0 commit comments