Skip to content

Commit 31b5ec4

Browse files
committed
Tilt can disable leader election by helm template level
Signed-off-by: Shunpoco <tkngsnsk313320@gmail.com>
1 parent bffcac8 commit 31b5ec4

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

Tiltfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ install = helm(
1919
'./deploy/helm',
2020
name='runtime-class-manager',
2121
namespace='rcm',
22-
set=['image.repository=' + settings.get('registry')]
22+
set=[
23+
'image.repository=' + settings.get('registry'),
24+
# Disable the leader election to speed up the startup time.
25+
'rcm.leaderElectEnabled=false',
26+
],
2327
)
2428

2529
objects = decode_yaml_stream(install)
@@ -28,8 +32,6 @@ for o in objects:
2832
# running process.
2933
if o.get('kind') == 'Deployment' and o.get('metadata').get('name') == 'runtime-class-manager':
3034
o['spec']['template']['spec']['securityContext']['runAsNonRoot'] = False
31-
# Disable the leader election to speed up the startup time.
32-
o['spec']['template']['spec']['containers'][0]['args'].remove('--leader-elect')
3335
break
3436
updated_install = encode_yaml_stream(objects)
3537
k8s_yaml(updated_install)

0 commit comments

Comments
 (0)