mirror of
https://gitlab.sectorq.eu/jaydee/portainer.git
synced 2025-12-14 10:44:52 +01:00
build
This commit is contained in:
6
port.py
6
port.py
@@ -132,6 +132,8 @@ class Portainer:
|
|||||||
self.token = self.args.client.secrets.kv.v2.read_secret_version(path=token_path)['data']['data']['value']
|
self.token = self.args.client.secrets.kv.v2.read_secret_version(path=token_path)['data']['data']['value']
|
||||||
elif site == "port":
|
elif site == "port":
|
||||||
self.base_url = os.getenv("PORTAINER_URL", "https://port.sectorq.eu/api")
|
self.base_url = os.getenv("PORTAINER_URL", "https://port.sectorq.eu/api")
|
||||||
|
token_path = "port/token"
|
||||||
|
self.token = self.args.client.secrets.kv.v2.read_secret_version(path=token_path)['data']['data']['value']
|
||||||
else:
|
else:
|
||||||
self.base_url = os.getenv(
|
self.base_url = os.getenv(
|
||||||
"PORTAINER_URL", "https://portainer.sectorq.eu/api"
|
"PORTAINER_URL", "https://portainer.sectorq.eu/api"
|
||||||
@@ -801,9 +803,11 @@ class Portainer:
|
|||||||
service_ids = [s[0] for s in service_tuples if s[0] != "__ALL__" and s[0] != "__ONLY_CHECK__"]
|
service_ids = [s[0] for s in service_tuples if s[0] != "__ALL__" and s[0] != "__ONLY_CHECK__"]
|
||||||
else:
|
else:
|
||||||
service_ids = [self.args.service_id]
|
service_ids = [self.args.service_id]
|
||||||
if "__ONLY_CHECK__" in service_ids and self.args.update is False:
|
if "__ONLY_CHECK__" in service_ids or self.args.update is False:
|
||||||
pull = False
|
pull = False
|
||||||
|
print("Checking for updates only...")
|
||||||
else:
|
else:
|
||||||
|
print("Checking for updates and pulling updates...")
|
||||||
pull = True
|
pull = True
|
||||||
if "__ALL__" in service_ids:
|
if "__ALL__" in service_ids:
|
||||||
service_ids = [s[0] for s in service_tuples if s[0] != "__ALL__" and s[0] != "__ONLY_CHECK__"]
|
service_ids = [s[0] for s in service_tuples if s[0] != "__ALL__" and s[0] != "__ONLY_CHECK__"]
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ try:
|
|||||||
except KeyError:
|
except KeyError:
|
||||||
VAULT_TOKEN = input("Valult root token : ")
|
VAULT_TOKEN = input("Valult root token : ")
|
||||||
os.environ["VAULT_TOKEN"] = VAULT_TOKEN
|
os.environ["VAULT_TOKEN"] = VAULT_TOKEN
|
||||||
input(VAULT_TOKEN)
|
|
||||||
|
|
||||||
client = hvac.Client(url=VAULT_ADDR, token=VAULT_TOKEN)
|
client = hvac.Client(url=VAULT_ADDR, token=VAULT_TOKEN)
|
||||||
# Check if connected
|
# Check if connected
|
||||||
|
|||||||
Reference in New Issue
Block a user