[ci skip] Move Terraform modules into stack directories
Move all 88 service modules (66 individual + 22 platform) from modules/kubernetes/<service>/ into their corresponding stack directories: - Service stacks: stacks/<service>/module/ - Platform stack: stacks/platform/modules/<service>/ This collocates module source code with its Terragrunt definition. Only shared utility modules remain in modules/kubernetes/: ingress_factory, setup_tls_secret, dockerhub_secret, oauth-proxy. All cross-references to shared modules updated to use correct relative paths. Verified with terragrunt run --all -- plan: 0 adds, 0 destroys across all 68 stacks.
This commit is contained in:
parent
73cb696f12
commit
e225e81ebf
614 changed files with 12075 additions and 352 deletions
|
|
@ -0,0 +1,51 @@
|
|||
import asyncio
|
||||
import logging
|
||||
import os
|
||||
import signal
|
||||
import sys
|
||||
import time
|
||||
|
||||
import aiohttp
|
||||
|
||||
iDRAC_HOST = 'idrac'
|
||||
iDRAC_USER_ENV_VAR = 'idrac_user'
|
||||
iDRAC_PASSWORD_ENV_VAR = 'idrac_password'
|
||||
SHOULD_RUN = True
|
||||
|
||||
|
||||
def signal_handler(sig, frame):
|
||||
logging.warning(f'signal {sig} received. shutting down gracefully...')
|
||||
global SHOULD_RUN
|
||||
SHOULD_RUN = False
|
||||
time.sleep(60)
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
async def main() -> None:
|
||||
# define signal handlers
|
||||
signal.signal(signal.SIGINT, signal_handler)
|
||||
|
||||
user = os.environ.get(iDRAC_USER_ENV_VAR)
|
||||
if user is None:
|
||||
logging.critical('missing environment variable for idrac user'
|
||||
f' please set {iDRAC_USER_ENV_VAR}')
|
||||
return
|
||||
|
||||
password = os.environ.get(iDRAC_PASSWORD_ENV_VAR)
|
||||
if password is None:
|
||||
logging.critical('missing environment variable for idrac password'
|
||||
f' please set {iDRAC_PASSWORD_ENV_VAR}')
|
||||
return
|
||||
|
||||
logging.info('service initiated with credentials')
|
||||
return await monitor(user, password)
|
||||
|
||||
|
||||
async def monitor(user: str, password: str) -> None:
|
||||
while SHOULD_RUN:
|
||||
pass
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
# abandoned bc server cannot start itself when it's off :/
|
||||
asyncio.run(main())
|
||||
Loading…
Add table
Add a link
Reference in a new issue