← Back to team overview

wordpress-charmers team mailing list archive

[Merge] ~tcuthbert/charm-k8s-wordpress:container-hardening-rebased into ~tcuthbert/charm-k8s-wordpress:container-hardening

 

Thomas Cuthbert has proposed merging ~tcuthbert/charm-k8s-wordpress:container-hardening-rebased into ~tcuthbert/charm-k8s-wordpress:container-hardening.

Requested reviews:
  Wordpress Charmers (wordpress-charmers)

For more details, see:
https://code.launchpad.net/~tcuthbert/charm-k8s-wordpress/+git/charm-k8s-wordpress-1/+merge/423494
-- 
Your team Wordpress Charmers is requested to review the proposed merge of ~tcuthbert/charm-k8s-wordpress:container-hardening-rebased into ~tcuthbert/charm-k8s-wordpress:container-hardening.
diff --git a/config.yaml b/config.yaml
index fadc47f..7e4e9d2 100644
--- a/config.yaml
+++ b/config.yaml
@@ -15,8 +15,8 @@ options:
     type: string
     description: >
        Ports to expose, space separated list in name:8000 format. Names are alphanumeric + hyphen.
-       e.g. "http:80 metrics:7127"
-    default: "http:80"
+       e.g. "http:8000 metrics:7127"
+    default: "http:8000"
   tls_secret_name:
     type: string
     description: "The Kubernetes TLS secret resource name."
diff --git a/src/charm.py b/src/charm.py
index a7234e0..0f8064e 100755
--- a/src/charm.py
+++ b/src/charm.py
@@ -252,7 +252,7 @@ class WordpressCharm(CharmBase):
                                     "host": self.model.config["blog_hostname"],
                                     "http": {
                                         "paths": [
-                                            {"path": "/", "backend": {"serviceName": self.app.name, "servicePort": 80}}
+                                            {"path": "/", "backend": {"serviceName": self.app.name, "servicePort": 8000}}
                                         ]
                                     },
                                 }
@@ -281,7 +281,7 @@ class WordpressCharm(CharmBase):
                     "host": hostname,
                     "http": {
                         "paths": [
-                            {"path": "/", "backend": {"serviceName": self.app.name, "servicePort": 80}}
+                            {"path": "/", "backend": {"serviceName": self.app.name, "servicePort": 8000}}
                         ]
                     },
                 }
diff --git a/tests/unit/test_charm.py b/tests/unit/test_charm.py
index 89221a1..511d651 100644
--- a/tests/unit/test_charm.py
+++ b/tests/unit/test_charm.py
@@ -150,7 +150,7 @@ class TestWordpressCharm(unittest.TestCase):
                                         'paths': [
                                             {
                                                 'path': '/',
-                                                'backend': {'serviceName': 'wordpress-k8s', 'servicePort': 80},
+                                                'backend': {'serviceName': 'wordpress-k8s', 'servicePort': 8000},
                                             }
                                         ]
                                     },
@@ -161,7 +161,7 @@ class TestWordpressCharm(unittest.TestCase):
                                         'paths': [
                                             {
                                                 'path': '/',
-                                                'backend': {'serviceName': 'wordpress-k8s', 'servicePort': 80},
+                                                'backend': {'serviceName': 'wordpress-k8s', 'servicePort': 8000},
                                             }
                                         ]
                                     },
@@ -172,7 +172,7 @@ class TestWordpressCharm(unittest.TestCase):
                                         'paths': [
                                             {
                                                 'path': '/',
-                                                'backend': {'serviceName': 'wordpress-k8s', 'servicePort': 80},
+                                                'backend': {'serviceName': 'wordpress-k8s', 'servicePort': 8000},
                                             }
                                         ]
                                     },
@@ -213,7 +213,7 @@ class TestWordpressCharm(unittest.TestCase):
                                         'paths': [
                                             {
                                                 'path': '/',
-                                                'backend': {'serviceName': 'wordpress-k8s', 'servicePort': 80},
+                                                'backend': {'serviceName': 'wordpress-k8s', 'servicePort': 8000},
                                             }
                                         ]
                                     },
@@ -262,7 +262,7 @@ class TestWordpressCharm(unittest.TestCase):
                 },
                 'name': 'wordpress-k8s',
                 'ports': [{
-                    'containerPort': 80,
+                    'containerPort': 8000,
                     'name': 'http',
                     'protocol': 'TCP',
                 }]}
@@ -309,7 +309,7 @@ class TestWordpressCharm(unittest.TestCase):
                 },
                 'name': 'wordpress-k8s',
                 'ports': [{
-                    'containerPort': 80,
+                    'containerPort': 8000,
                     'name': 'http',
                     'protocol': 'TCP',
                 }]}