From 8128a5ded692f4ce3a619a23866578eddb81f3c9 Mon Sep 17 00:00:00 2001
From: Varac <varac@varac.net>
Date: Mon, 7 Jun 2021 16:54:45 +0200
Subject: [PATCH] Remove prometheus_enable_ingress setting

Prometheus ingress is enabled by default now
---
 docs/upgrading.md        | 2 --
 openappstack/__main__.py | 2 --
 openappstack/cluster.py  | 8 +-------
 3 files changed, 1 insertion(+), 11 deletions(-)

diff --git a/docs/upgrading.md b/docs/upgrading.md
index 2cb191fb8..a626152e4 100644
--- a/docs/upgrading.md
+++ b/docs/upgrading.md
@@ -44,8 +44,6 @@ Additionally, if you want to re-use your old `settings.yaml` file, this data
 needs to be added to it:
 
 ```
-prometheus_enable_ingress: false
-
 backup:
   s3:
     # Disabled by default. To enable, change to `true` and configure the
diff --git a/openappstack/__main__.py b/openappstack/__main__.py
index b8d0ed6c1..2af9db534 100755
--- a/openappstack/__main__.py
+++ b/openappstack/__main__.py
@@ -331,8 +331,6 @@ def create(clus, args):  # pylint: disable=too-many-branches
         clus.acme_staging = True
     if args.local_flux:
         clus.local_flux = True
-    if args.prometheus_enable_ingress:
-        clus.prometheus_enable_ingress = True
     if args.create_droplet:
         clus.create_droplet(ssh_key_id=args.ssh_key_id, hostname=args.create_hostname)
         if args.verbose:
diff --git a/openappstack/cluster.py b/openappstack/cluster.py
index 44cc0364b..02bf4b22d 100644
--- a/openappstack/cluster.py
+++ b/openappstack/cluster.py
@@ -59,9 +59,6 @@ class Cluster:
         self.local_flux = False
         # Set this to False if the data needs to be (re)loaded from file
         self.data_loaded = False
-        # Set this to true if you want to access prometheus from outside you cluster
-        # The prometheus api is protected by basic authentication
-        self.prometheus_enable_ingress = False
         # Load data from inventory.yml and settings.yml
         if load_data:
             self.load_data()
@@ -174,7 +171,6 @@ class Cluster:
         settings['admin_email'] = 'admin@{0}'.format(self.domain)
         settings['flux']['local_flux'] = self.local_flux
         settings['cluster_dir'] = self.cluster_dir
-        settings['prometheus_enable_ingress'] = self.prometheus_enable_ingress
 
         # Configure apps to handle invalid certs i.e. from
         # Letsencrypt staging API
@@ -207,7 +203,6 @@ HOSTNAME={hostname}
 FQDN={domain}
 LOCAL_FLUX={local_flux}
 KUBECONFIG={secret_dir}/kube_config_cluster.yml
-PROMETHEUS_ENABLE_INGRESS={prometheus_enable_ingress}
 """
 
         with open(self.dotenv_file, 'w') as stream:
@@ -218,8 +213,7 @@ PROMETHEUS_ENABLE_INGRESS={prometheus_enable_ingress}
                 hostname=self.hostname,
                 domain=self.domain,
                 local_flux=self.local_flux,
-                secret_dir=self.secret_dir,
-                prometheus_enable_ingress=self.prometheus_enable_ingress
+                secret_dir=self.secret_dir
             ))
             log.info("Created %s", self.dotenv_file)
 
-- 
GitLab