Merge ~mthaddon/charm-k8s-mattermost/+git/charm-k8s-mattermost:rename-charm into charm-k8s-mattermost:master

Proposed by Tom Haddon
Status: Merged
Approved by: Paul Collins
Approved revision: 88d9f6692eb53fd14e76cea25a05c3cc9ae258ea
Merged at revision: f6916af8983cd3b2c532566b0acbd7eef37874b5
Proposed branch: ~mthaddon/charm-k8s-mattermost/+git/charm-k8s-mattermost:rename-charm
Merge into: charm-k8s-mattermost:master
Diff against target: 198 lines (+26/-25)
4 files modified
Makefile (+2/-2)
README.md (+5/-5)
metadata.yaml (+2/-1)
tests/unit/test_charm.py (+17/-17)
Reviewer Review Type Date Requested Status
Paul Collins lgtm Approve
Canonical IS Reviewers Pending
Review via email: mp+402841@code.launchpad.net

Commit message

Rename charm to mattermost-k8s for publishing directly on charmhub

To post a comment you must log in.
Revision history for this message
Paul Collins (pjdc) :
review: Approve (lgtm)
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision f6916af8983cd3b2c532566b0acbd7eef37874b5

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/Makefile b/Makefile
2index b241423..1bf76cc 100644
3--- a/Makefile
4+++ b/Makefile
5@@ -8,7 +8,7 @@ lint: blacken
6
7 # We actually use the build directory created by charmcraft,
8 # but the .charm file makes a much more convenient sentinel.
9-unittest: mattermost.charm
10+unittest: mattermost-k8s.charm
11 @tox -e unit
12
13 test: lint unittest
14@@ -17,7 +17,7 @@ clean:
15 @echo "Cleaning files"
16 @git clean -fXd
17
18-mattermost.charm: src/*.py requirements.txt
19+mattermost-k8s.charm: src/*.py requirements.txt
20 charmcraft build
21
22 .PHONY: lint test unittest clean
23diff --git a/README.md b/README.md
24index 4a7ef53..2d74794 100644
25--- a/README.md
26+++ b/README.md
27@@ -20,12 +20,12 @@ details on using Juju with MicroK8s for easy local testing [see here](https://ju
28 To deploy the charm and relate it to [the PostgreSQL K8s charm](https://charmhub.io/postgresql-k8s) within a Juju
29 Kubernetes model:
30
31- juju deploy cs:~postgresql-charmers/postgresql-k8s postgresql
32- juju deploy cs:~mattermost-charmers/mattermost --config juju-external-hostname=foo.internal
33- juju relate mattermost postgresql:db
34- juju expose mattermost
35+ juju deploy postgresql-k8s
36+ juju deploy mattermost-k8s --config juju-external-hostname=foo.internal
37+ juju relate mattermost-k8s postgresql-k8s:db
38+ juju expose mattermost-k8s
39
40-Once the deployment has completed and the "mattermost" workload state in `juju
41+Once the deployment has completed and the "mattermost-k8s" workload state in `juju
42 status` has changed to "active" you can visit http://${mattermost_ip}:8065 in a browser and log in to
43 your Mattermost instance, and you'll be presented with a screen to create an
44 initial admin account. Further accounts must be created using this admin account, or by
45diff --git a/metadata.yaml b/metadata.yaml
46index 75f7830..f19cb73 100644
47--- a/metadata.yaml
48+++ b/metadata.yaml
49@@ -1,4 +1,5 @@
50-name: mattermost
51+name: mattermost-k8s
52+display-name: Mattermost
53 summary: Mattermost is a flexible, open source messaging platform that enables secure team collaboration.
54 docs: https://discourse.charmhub.io/t/mattermost-documentation-overview/3758
55 maintainers:
56diff --git a/tests/unit/test_charm.py b/tests/unit/test_charm.py
57index 44bee1f..6fb16c7 100644
58--- a/tests/unit/test_charm.py
59+++ b/tests/unit/test_charm.py
60@@ -214,7 +214,7 @@ class TestMattermostK8sCharmHooksDisabled(unittest.TestCase):
61 expected = {
62 'containers': [
63 {
64- 'name': 'mattermost',
65+ 'name': 'mattermost-k8s',
66 'envConfig': {
67 'MM_EMAILSETTINGS_SENDPUSHNOTIFICATIONS': 'true',
68 'MM_EMAILSETTINGS_PUSHNOTIFICATIONCONTENTS': 'id_loaded',
69@@ -224,7 +224,7 @@ class TestMattermostK8sCharmHooksDisabled(unittest.TestCase):
70 ],
71 }
72 pod_spec = {
73- 'containers': [{'name': 'mattermost', 'envConfig': {}}],
74+ 'containers': [{'name': 'mattermost-k8s', 'envConfig': {}}],
75 }
76 self.harness.charm._update_pod_spec_for_push(pod_spec)
77 self.assertEqual(pod_spec, expected)
78@@ -235,7 +235,7 @@ class TestMattermostK8sCharmHooksDisabled(unittest.TestCase):
79 expected = {
80 'containers': [
81 {
82- 'name': 'mattermost',
83+ 'name': 'mattermost-k8s',
84 'envConfig': {
85 'MM_EMAILSETTINGS_SENDPUSHNOTIFICATIONS': 'true',
86 'MM_EMAILSETTINGS_PUSHNOTIFICATIONCONTENTS': 'full',
87@@ -245,7 +245,7 @@ class TestMattermostK8sCharmHooksDisabled(unittest.TestCase):
88 ],
89 }
90 pod_spec = {
91- 'containers': [{'name': 'mattermost', 'envConfig': {}}],
92+ 'containers': [{'name': 'mattermost-k8s', 'envConfig': {}}],
93 }
94 self.harness.charm._update_pod_spec_for_push(pod_spec)
95 self.assertEqual(pod_spec, expected)
96@@ -253,7 +253,7 @@ class TestMattermostK8sCharmHooksDisabled(unittest.TestCase):
97 def test_get_licence_secret_name(self):
98 """Test the licence secret name is correctly constructed"""
99 self.harness.update_config(CONFIG_LICENCE_SECRET)
100- self.assertEqual(self.harness.charm._get_licence_secret_name(), "mattermost-licence-b5bbb1bf")
101+ self.assertEqual(self.harness.charm._get_licence_secret_name(), "mattermost-k8s-licence-b5bbb1bf")
102
103 def test_make_licence_k8s_secrets(self):
104 """Test making licence k8s secrets"""
105@@ -261,7 +261,7 @@ class TestMattermostK8sCharmHooksDisabled(unittest.TestCase):
106 self.assertEqual(self.harness.charm._make_licence_k8s_secrets(), [])
107 self.harness.update_config(CONFIG_LICENCE_SECRET)
108 expected = [
109- {'name': 'mattermost-licence-b5bbb1bf', 'type': 'Opaque', 'stringData': {'licence': 'RANDOMSTRING'}}
110+ {'name': 'mattermost-k8s-licence-b5bbb1bf', 'type': 'Opaque', 'stringData': {'licence': 'RANDOMSTRING'}}
111 ]
112 self.assertEqual(self.harness.charm._make_licence_k8s_secrets(), expected)
113
114@@ -275,7 +275,7 @@ class TestMattermostK8sCharmHooksDisabled(unittest.TestCase):
115 'name': 'licence',
116 'mountPath': '/secrets',
117 'secret': {
118- 'name': 'mattermost-licence-b5bbb1bf',
119+ 'name': 'mattermost-k8s-licence-b5bbb1bf',
120 'files': [{'key': 'licence', 'path': 'licence.txt', 'mode': 0o444}],
121 },
122 }
123@@ -295,7 +295,7 @@ class TestMattermostK8sCharmHooksDisabled(unittest.TestCase):
124 'tls_secret_name': 'chat-example-com-tls',
125 }
126 )
127- ingress_name = 'mattermost-ingress'
128+ ingress_name = 'mattermost-k8s-ingress'
129 self.assertNotEqual(ingress_name, self.harness.charm.app.name)
130 expected = {
131 'kubernetesResources': {
132@@ -310,7 +310,7 @@ class TestMattermostK8sCharmHooksDisabled(unittest.TestCase):
133 'paths': [
134 {
135 'path': '/',
136- 'backend': {'serviceName': 'mattermost', 'servicePort': 8065},
137+ 'backend': {'serviceName': 'mattermost-k8s', 'servicePort': 8065},
138 }
139 ]
140 },
141@@ -344,7 +344,7 @@ class TestMattermostK8sCharmHooksDisabled(unittest.TestCase):
142 'paths': [
143 {
144 'path': '/',
145- 'backend': {'serviceName': 'mattermost', 'servicePort': 8065},
146+ 'backend': {'serviceName': 'mattermost-k8s', 'servicePort': 8065},
147 }
148 ]
149 },
150@@ -370,12 +370,12 @@ class TestMattermostK8sCharmHooksDisabled(unittest.TestCase):
151 # When we can, this test will need updating.
152 self.harness.update_config({'performance_monitoring_enabled': True})
153 pod_spec = {
154- 'containers': [{'name': 'mattermost', 'envConfig': {}}],
155+ 'containers': [{'name': 'mattermost-k8s', 'envConfig': {}}],
156 }
157 expected = {
158 'containers': [
159 {
160- 'name': 'mattermost',
161+ 'name': 'mattermost-k8s',
162 'envConfig': {
163 'MM_METRICSSETTINGS_ENABLE': 'true',
164 'MM_METRICSSETTINGS_LISTENADDRESS': ':{}'.format(METRICS_PORT),
165@@ -395,15 +395,15 @@ class TestMattermostK8sCharmHooksDisabled(unittest.TestCase):
166 self.assertEqual(pod_spec, {})
167 self.harness.update_config({'clustering': True})
168 pod_spec = {
169- 'containers': [{'name': 'mattermost', 'envConfig': {}}],
170+ 'containers': [{'name': 'mattermost-k8s', 'envConfig': {}}],
171 }
172 expected = {
173 'containers': [
174 {
175- 'name': 'mattermost',
176+ 'name': 'mattermost-k8s',
177 'envConfig': {
178 'MM_CLUSTERSETTINGS_ENABLE': 'true',
179- 'MM_CLUSTERSETTINGS_CLUSTERNAME': 'mattermost-fakeuuid',
180+ 'MM_CLUSTERSETTINGS_CLUSTERNAME': 'mattermost-k8s-fakeuuid',
181 'MM_CLUSTERSETTINGS_USEIPADDRESS': 'true',
182 },
183 }
184@@ -420,12 +420,12 @@ class TestMattermostK8sCharmHooksDisabled(unittest.TestCase):
185 self.assertEqual(pod_spec, {})
186 self.harness.update_config({'use_canonical_defaults': True})
187 pod_spec = {
188- 'containers': [{'name': 'mattermost', 'envConfig': {}}],
189+ 'containers': [{'name': 'mattermost-k8s', 'envConfig': {}}],
190 }
191 expected = {
192 'containers': [
193 {
194- 'name': 'mattermost',
195+ 'name': 'mattermost-k8s',
196 'envConfig': {
197 'MM_SERVICESETTINGS_CLOSEUNUSEDDIRECTMESSAGES': 'true',
198 'MM_SERVICESETTINGS_ENABLECUSTOMEMOJI': 'true',

Subscribers

People subscribed via source and target branches