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
diff --git a/Makefile b/Makefile
index b241423..1bf76cc 100644
--- a/Makefile
+++ b/Makefile
@@ -8,7 +8,7 @@ lint: blacken
88
9# We actually use the build directory created by charmcraft,9# We actually use the build directory created by charmcraft,
10# but the .charm file makes a much more convenient sentinel.10# but the .charm file makes a much more convenient sentinel.
11unittest: mattermost.charm11unittest: mattermost-k8s.charm
12 @tox -e unit12 @tox -e unit
1313
14test: lint unittest14test: lint unittest
@@ -17,7 +17,7 @@ clean:
17 @echo "Cleaning files"17 @echo "Cleaning files"
18 @git clean -fXd18 @git clean -fXd
1919
20mattermost.charm: src/*.py requirements.txt20mattermost-k8s.charm: src/*.py requirements.txt
21 charmcraft build21 charmcraft build
2222
23.PHONY: lint test unittest clean23.PHONY: lint test unittest clean
diff --git a/README.md b/README.md
index 4a7ef53..2d74794 100644
--- a/README.md
+++ b/README.md
@@ -20,12 +20,12 @@ details on using Juju with MicroK8s for easy local testing [see here](https://ju
20To deploy the charm and relate it to [the PostgreSQL K8s charm](https://charmhub.io/postgresql-k8s) within a Juju20To deploy the charm and relate it to [the PostgreSQL K8s charm](https://charmhub.io/postgresql-k8s) within a Juju
21Kubernetes model:21Kubernetes model:
2222
23 juju deploy cs:~postgresql-charmers/postgresql-k8s postgresql23 juju deploy postgresql-k8s
24 juju deploy cs:~mattermost-charmers/mattermost --config juju-external-hostname=foo.internal24 juju deploy mattermost-k8s --config juju-external-hostname=foo.internal
25 juju relate mattermost postgresql:db25 juju relate mattermost-k8s postgresql-k8s:db
26 juju expose mattermost26 juju expose mattermost-k8s
2727
28Once the deployment has completed and the "mattermost" workload state in `juju28Once the deployment has completed and the "mattermost-k8s" workload state in `juju
29status` has changed to "active" you can visit http://${mattermost_ip}:8065 in a browser and log in to29status` has changed to "active" you can visit http://${mattermost_ip}:8065 in a browser and log in to
30your Mattermost instance, and you'll be presented with a screen to create an30your Mattermost instance, and you'll be presented with a screen to create an
31initial admin account. Further accounts must be created using this admin account, or by31initial admin account. Further accounts must be created using this admin account, or by
diff --git a/metadata.yaml b/metadata.yaml
index 75f7830..f19cb73 100644
--- a/metadata.yaml
+++ b/metadata.yaml
@@ -1,4 +1,5 @@
1name: mattermost1name: mattermost-k8s
2display-name: Mattermost
2summary: Mattermost is a flexible, open source messaging platform that enables secure team collaboration.3summary: Mattermost is a flexible, open source messaging platform that enables secure team collaboration.
3docs: https://discourse.charmhub.io/t/mattermost-documentation-overview/37584docs: https://discourse.charmhub.io/t/mattermost-documentation-overview/3758
4maintainers:5maintainers:
diff --git a/tests/unit/test_charm.py b/tests/unit/test_charm.py
index 44bee1f..6fb16c7 100644
--- a/tests/unit/test_charm.py
+++ b/tests/unit/test_charm.py
@@ -214,7 +214,7 @@ class TestMattermostK8sCharmHooksDisabled(unittest.TestCase):
214 expected = {214 expected = {
215 'containers': [215 'containers': [
216 {216 {
217 'name': 'mattermost',217 'name': 'mattermost-k8s',
218 'envConfig': {218 'envConfig': {
219 'MM_EMAILSETTINGS_SENDPUSHNOTIFICATIONS': 'true',219 'MM_EMAILSETTINGS_SENDPUSHNOTIFICATIONS': 'true',
220 'MM_EMAILSETTINGS_PUSHNOTIFICATIONCONTENTS': 'id_loaded',220 'MM_EMAILSETTINGS_PUSHNOTIFICATIONCONTENTS': 'id_loaded',
@@ -224,7 +224,7 @@ class TestMattermostK8sCharmHooksDisabled(unittest.TestCase):
224 ],224 ],
225 }225 }
226 pod_spec = {226 pod_spec = {
227 'containers': [{'name': 'mattermost', 'envConfig': {}}],227 'containers': [{'name': 'mattermost-k8s', 'envConfig': {}}],
228 }228 }
229 self.harness.charm._update_pod_spec_for_push(pod_spec)229 self.harness.charm._update_pod_spec_for_push(pod_spec)
230 self.assertEqual(pod_spec, expected)230 self.assertEqual(pod_spec, expected)
@@ -235,7 +235,7 @@ class TestMattermostK8sCharmHooksDisabled(unittest.TestCase):
235 expected = {235 expected = {
236 'containers': [236 'containers': [
237 {237 {
238 'name': 'mattermost',238 'name': 'mattermost-k8s',
239 'envConfig': {239 'envConfig': {
240 'MM_EMAILSETTINGS_SENDPUSHNOTIFICATIONS': 'true',240 'MM_EMAILSETTINGS_SENDPUSHNOTIFICATIONS': 'true',
241 'MM_EMAILSETTINGS_PUSHNOTIFICATIONCONTENTS': 'full',241 'MM_EMAILSETTINGS_PUSHNOTIFICATIONCONTENTS': 'full',
@@ -245,7 +245,7 @@ class TestMattermostK8sCharmHooksDisabled(unittest.TestCase):
245 ],245 ],
246 }246 }
247 pod_spec = {247 pod_spec = {
248 'containers': [{'name': 'mattermost', 'envConfig': {}}],248 'containers': [{'name': 'mattermost-k8s', 'envConfig': {}}],
249 }249 }
250 self.harness.charm._update_pod_spec_for_push(pod_spec)250 self.harness.charm._update_pod_spec_for_push(pod_spec)
251 self.assertEqual(pod_spec, expected)251 self.assertEqual(pod_spec, expected)
@@ -253,7 +253,7 @@ class TestMattermostK8sCharmHooksDisabled(unittest.TestCase):
253 def test_get_licence_secret_name(self):253 def test_get_licence_secret_name(self):
254 """Test the licence secret name is correctly constructed"""254 """Test the licence secret name is correctly constructed"""
255 self.harness.update_config(CONFIG_LICENCE_SECRET)255 self.harness.update_config(CONFIG_LICENCE_SECRET)
256 self.assertEqual(self.harness.charm._get_licence_secret_name(), "mattermost-licence-b5bbb1bf")256 self.assertEqual(self.harness.charm._get_licence_secret_name(), "mattermost-k8s-licence-b5bbb1bf")
257257
258 def test_make_licence_k8s_secrets(self):258 def test_make_licence_k8s_secrets(self):
259 """Test making licence k8s secrets"""259 """Test making licence k8s secrets"""
@@ -261,7 +261,7 @@ class TestMattermostK8sCharmHooksDisabled(unittest.TestCase):
261 self.assertEqual(self.harness.charm._make_licence_k8s_secrets(), [])261 self.assertEqual(self.harness.charm._make_licence_k8s_secrets(), [])
262 self.harness.update_config(CONFIG_LICENCE_SECRET)262 self.harness.update_config(CONFIG_LICENCE_SECRET)
263 expected = [263 expected = [
264 {'name': 'mattermost-licence-b5bbb1bf', 'type': 'Opaque', 'stringData': {'licence': 'RANDOMSTRING'}}264 {'name': 'mattermost-k8s-licence-b5bbb1bf', 'type': 'Opaque', 'stringData': {'licence': 'RANDOMSTRING'}}
265 ]265 ]
266 self.assertEqual(self.harness.charm._make_licence_k8s_secrets(), expected)266 self.assertEqual(self.harness.charm._make_licence_k8s_secrets(), expected)
267267
@@ -275,7 +275,7 @@ class TestMattermostK8sCharmHooksDisabled(unittest.TestCase):
275 'name': 'licence',275 'name': 'licence',
276 'mountPath': '/secrets',276 'mountPath': '/secrets',
277 'secret': {277 'secret': {
278 'name': 'mattermost-licence-b5bbb1bf',278 'name': 'mattermost-k8s-licence-b5bbb1bf',
279 'files': [{'key': 'licence', 'path': 'licence.txt', 'mode': 0o444}],279 'files': [{'key': 'licence', 'path': 'licence.txt', 'mode': 0o444}],
280 },280 },
281 }281 }
@@ -295,7 +295,7 @@ class TestMattermostK8sCharmHooksDisabled(unittest.TestCase):
295 'tls_secret_name': 'chat-example-com-tls',295 'tls_secret_name': 'chat-example-com-tls',
296 }296 }
297 )297 )
298 ingress_name = 'mattermost-ingress'298 ingress_name = 'mattermost-k8s-ingress'
299 self.assertNotEqual(ingress_name, self.harness.charm.app.name)299 self.assertNotEqual(ingress_name, self.harness.charm.app.name)
300 expected = {300 expected = {
301 'kubernetesResources': {301 'kubernetesResources': {
@@ -310,7 +310,7 @@ class TestMattermostK8sCharmHooksDisabled(unittest.TestCase):
310 'paths': [310 'paths': [
311 {311 {
312 'path': '/',312 'path': '/',
313 'backend': {'serviceName': 'mattermost', 'servicePort': 8065},313 'backend': {'serviceName': 'mattermost-k8s', 'servicePort': 8065},
314 }314 }
315 ]315 ]
316 },316 },
@@ -344,7 +344,7 @@ class TestMattermostK8sCharmHooksDisabled(unittest.TestCase):
344 'paths': [344 'paths': [
345 {345 {
346 'path': '/',346 'path': '/',
347 'backend': {'serviceName': 'mattermost', 'servicePort': 8065},347 'backend': {'serviceName': 'mattermost-k8s', 'servicePort': 8065},
348 }348 }
349 ]349 ]
350 },350 },
@@ -370,12 +370,12 @@ class TestMattermostK8sCharmHooksDisabled(unittest.TestCase):
370 # When we can, this test will need updating.370 # When we can, this test will need updating.
371 self.harness.update_config({'performance_monitoring_enabled': True})371 self.harness.update_config({'performance_monitoring_enabled': True})
372 pod_spec = {372 pod_spec = {
373 'containers': [{'name': 'mattermost', 'envConfig': {}}],373 'containers': [{'name': 'mattermost-k8s', 'envConfig': {}}],
374 }374 }
375 expected = {375 expected = {
376 'containers': [376 'containers': [
377 {377 {
378 'name': 'mattermost',378 'name': 'mattermost-k8s',
379 'envConfig': {379 'envConfig': {
380 'MM_METRICSSETTINGS_ENABLE': 'true',380 'MM_METRICSSETTINGS_ENABLE': 'true',
381 'MM_METRICSSETTINGS_LISTENADDRESS': ':{}'.format(METRICS_PORT),381 'MM_METRICSSETTINGS_LISTENADDRESS': ':{}'.format(METRICS_PORT),
@@ -395,15 +395,15 @@ class TestMattermostK8sCharmHooksDisabled(unittest.TestCase):
395 self.assertEqual(pod_spec, {})395 self.assertEqual(pod_spec, {})
396 self.harness.update_config({'clustering': True})396 self.harness.update_config({'clustering': True})
397 pod_spec = {397 pod_spec = {
398 'containers': [{'name': 'mattermost', 'envConfig': {}}],398 'containers': [{'name': 'mattermost-k8s', 'envConfig': {}}],
399 }399 }
400 expected = {400 expected = {
401 'containers': [401 'containers': [
402 {402 {
403 'name': 'mattermost',403 'name': 'mattermost-k8s',
404 'envConfig': {404 'envConfig': {
405 'MM_CLUSTERSETTINGS_ENABLE': 'true',405 'MM_CLUSTERSETTINGS_ENABLE': 'true',
406 'MM_CLUSTERSETTINGS_CLUSTERNAME': 'mattermost-fakeuuid',406 'MM_CLUSTERSETTINGS_CLUSTERNAME': 'mattermost-k8s-fakeuuid',
407 'MM_CLUSTERSETTINGS_USEIPADDRESS': 'true',407 'MM_CLUSTERSETTINGS_USEIPADDRESS': 'true',
408 },408 },
409 }409 }
@@ -420,12 +420,12 @@ class TestMattermostK8sCharmHooksDisabled(unittest.TestCase):
420 self.assertEqual(pod_spec, {})420 self.assertEqual(pod_spec, {})
421 self.harness.update_config({'use_canonical_defaults': True})421 self.harness.update_config({'use_canonical_defaults': True})
422 pod_spec = {422 pod_spec = {
423 'containers': [{'name': 'mattermost', 'envConfig': {}}],423 'containers': [{'name': 'mattermost-k8s', 'envConfig': {}}],
424 }424 }
425 expected = {425 expected = {
426 'containers': [426 'containers': [
427 {427 {
428 'name': 'mattermost',428 'name': 'mattermost-k8s',
429 'envConfig': {429 'envConfig': {
430 'MM_SERVICESETTINGS_CLOSEUNUSEDDIRECTMESSAGES': 'true',430 'MM_SERVICESETTINGS_CLOSEUNUSEDDIRECTMESSAGES': 'true',
431 'MM_SERVICESETTINGS_ENABLECUSTOMEMOJI': 'true',431 'MM_SERVICESETTINGS_ENABLECUSTOMEMOJI': 'true',

Subscribers

People subscribed via source and target branches