Merge ~mthaddon/charm-k8s-mattermost/+git/charm-k8s-mattermost:rename-charm into charm-k8s-mattermost:master
- Git
- lp:~mthaddon/charm-k8s-mattermost/+git/charm-k8s-mattermost
- rename-charm
- Merge into 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) |
Related bugs: |
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
Description of the change
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 : | # |
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote : | # |
Change successfully merged at revision f6916af8983cd3b
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | diff --git a/Makefile b/Makefile | |||
2 | index b241423..1bf76cc 100644 | |||
3 | --- a/Makefile | |||
4 | +++ b/Makefile | |||
5 | @@ -8,7 +8,7 @@ lint: blacken | |||
6 | 8 | 8 | ||
7 | 9 | # We actually use the build directory created by charmcraft, | 9 | # We actually use the build directory created by charmcraft, |
8 | 10 | # but the .charm file makes a much more convenient sentinel. | 10 | # but the .charm file makes a much more convenient sentinel. |
10 | 11 | unittest: mattermost.charm | 11 | unittest: mattermost-k8s.charm |
11 | 12 | @tox -e unit | 12 | @tox -e unit |
12 | 13 | 13 | ||
13 | 14 | test: lint unittest | 14 | test: lint unittest |
14 | @@ -17,7 +17,7 @@ clean: | |||
15 | 17 | @echo "Cleaning files" | 17 | @echo "Cleaning files" |
16 | 18 | @git clean -fXd | 18 | @git clean -fXd |
17 | 19 | 19 | ||
19 | 20 | mattermost.charm: src/*.py requirements.txt | 20 | mattermost-k8s.charm: src/*.py requirements.txt |
20 | 21 | charmcraft build | 21 | charmcraft build |
21 | 22 | 22 | ||
22 | 23 | .PHONY: lint test unittest clean | 23 | .PHONY: lint test unittest clean |
23 | diff --git a/README.md b/README.md | |||
24 | index 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 | 20 | To deploy the charm and relate it to [the PostgreSQL K8s charm](https://charmhub.io/postgresql-k8s) within a Juju | 20 | To deploy the charm and relate it to [the PostgreSQL K8s charm](https://charmhub.io/postgresql-k8s) within a Juju |
29 | 21 | Kubernetes model: | 21 | Kubernetes model: |
30 | 22 | 22 | ||
35 | 23 | juju deploy cs:~postgresql-charmers/postgresql-k8s postgresql | 23 | juju deploy postgresql-k8s |
36 | 24 | juju deploy cs:~mattermost-charmers/mattermost --config juju-external-hostname=foo.internal | 24 | juju deploy mattermost-k8s --config juju-external-hostname=foo.internal |
37 | 25 | juju relate mattermost postgresql:db | 25 | juju relate mattermost-k8s postgresql-k8s:db |
38 | 26 | juju expose mattermost | 26 | juju expose mattermost-k8s |
39 | 27 | 27 | ||
41 | 28 | Once the deployment has completed and the "mattermost" workload state in `juju | 28 | Once the deployment has completed and the "mattermost-k8s" workload state in `juju |
42 | 29 | status` has changed to "active" you can visit http://${mattermost_ip}:8065 in a browser and log in to | 29 | status` has changed to "active" you can visit http://${mattermost_ip}:8065 in a browser and log in to |
43 | 30 | your Mattermost instance, and you'll be presented with a screen to create an | 30 | your Mattermost instance, and you'll be presented with a screen to create an |
44 | 31 | initial admin account. Further accounts must be created using this admin account, or by | 31 | initial admin account. Further accounts must be created using this admin account, or by |
45 | diff --git a/metadata.yaml b/metadata.yaml | |||
46 | index 75f7830..f19cb73 100644 | |||
47 | --- a/metadata.yaml | |||
48 | +++ b/metadata.yaml | |||
49 | @@ -1,4 +1,5 @@ | |||
51 | 1 | name: mattermost | 1 | name: mattermost-k8s |
52 | 2 | display-name: Mattermost | ||
53 | 2 | summary: Mattermost is a flexible, open source messaging platform that enables secure team collaboration. | 3 | summary: Mattermost is a flexible, open source messaging platform that enables secure team collaboration. |
54 | 3 | docs: https://discourse.charmhub.io/t/mattermost-documentation-overview/3758 | 4 | docs: https://discourse.charmhub.io/t/mattermost-documentation-overview/3758 |
55 | 4 | maintainers: | 5 | maintainers: |
56 | diff --git a/tests/unit/test_charm.py b/tests/unit/test_charm.py | |||
57 | index 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 | 214 | expected = { | 214 | expected = { |
62 | 215 | 'containers': [ | 215 | 'containers': [ |
63 | 216 | { | 216 | { |
65 | 217 | 'name': 'mattermost', | 217 | 'name': 'mattermost-k8s', |
66 | 218 | 'envConfig': { | 218 | 'envConfig': { |
67 | 219 | 'MM_EMAILSETTINGS_SENDPUSHNOTIFICATIONS': 'true', | 219 | 'MM_EMAILSETTINGS_SENDPUSHNOTIFICATIONS': 'true', |
68 | 220 | 'MM_EMAILSETTINGS_PUSHNOTIFICATIONCONTENTS': 'id_loaded', | 220 | 'MM_EMAILSETTINGS_PUSHNOTIFICATIONCONTENTS': 'id_loaded', |
69 | @@ -224,7 +224,7 @@ class TestMattermostK8sCharmHooksDisabled(unittest.TestCase): | |||
70 | 224 | ], | 224 | ], |
71 | 225 | } | 225 | } |
72 | 226 | pod_spec = { | 226 | pod_spec = { |
74 | 227 | 'containers': [{'name': 'mattermost', 'envConfig': {}}], | 227 | 'containers': [{'name': 'mattermost-k8s', 'envConfig': {}}], |
75 | 228 | } | 228 | } |
76 | 229 | self.harness.charm._update_pod_spec_for_push(pod_spec) | 229 | self.harness.charm._update_pod_spec_for_push(pod_spec) |
77 | 230 | self.assertEqual(pod_spec, expected) | 230 | self.assertEqual(pod_spec, expected) |
78 | @@ -235,7 +235,7 @@ class TestMattermostK8sCharmHooksDisabled(unittest.TestCase): | |||
79 | 235 | expected = { | 235 | expected = { |
80 | 236 | 'containers': [ | 236 | 'containers': [ |
81 | 237 | { | 237 | { |
83 | 238 | 'name': 'mattermost', | 238 | 'name': 'mattermost-k8s', |
84 | 239 | 'envConfig': { | 239 | 'envConfig': { |
85 | 240 | 'MM_EMAILSETTINGS_SENDPUSHNOTIFICATIONS': 'true', | 240 | 'MM_EMAILSETTINGS_SENDPUSHNOTIFICATIONS': 'true', |
86 | 241 | 'MM_EMAILSETTINGS_PUSHNOTIFICATIONCONTENTS': 'full', | 241 | 'MM_EMAILSETTINGS_PUSHNOTIFICATIONCONTENTS': 'full', |
87 | @@ -245,7 +245,7 @@ class TestMattermostK8sCharmHooksDisabled(unittest.TestCase): | |||
88 | 245 | ], | 245 | ], |
89 | 246 | } | 246 | } |
90 | 247 | pod_spec = { | 247 | pod_spec = { |
92 | 248 | 'containers': [{'name': 'mattermost', 'envConfig': {}}], | 248 | 'containers': [{'name': 'mattermost-k8s', 'envConfig': {}}], |
93 | 249 | } | 249 | } |
94 | 250 | self.harness.charm._update_pod_spec_for_push(pod_spec) | 250 | self.harness.charm._update_pod_spec_for_push(pod_spec) |
95 | 251 | self.assertEqual(pod_spec, expected) | 251 | self.assertEqual(pod_spec, expected) |
96 | @@ -253,7 +253,7 @@ class TestMattermostK8sCharmHooksDisabled(unittest.TestCase): | |||
97 | 253 | def test_get_licence_secret_name(self): | 253 | def test_get_licence_secret_name(self): |
98 | 254 | """Test the licence secret name is correctly constructed""" | 254 | """Test the licence secret name is correctly constructed""" |
99 | 255 | self.harness.update_config(CONFIG_LICENCE_SECRET) | 255 | self.harness.update_config(CONFIG_LICENCE_SECRET) |
101 | 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") |
102 | 257 | 257 | ||
103 | 258 | def test_make_licence_k8s_secrets(self): | 258 | def test_make_licence_k8s_secrets(self): |
104 | 259 | """Test making licence k8s secrets""" | 259 | """Test making licence k8s secrets""" |
105 | @@ -261,7 +261,7 @@ class TestMattermostK8sCharmHooksDisabled(unittest.TestCase): | |||
106 | 261 | self.assertEqual(self.harness.charm._make_licence_k8s_secrets(), []) | 261 | self.assertEqual(self.harness.charm._make_licence_k8s_secrets(), []) |
107 | 262 | self.harness.update_config(CONFIG_LICENCE_SECRET) | 262 | self.harness.update_config(CONFIG_LICENCE_SECRET) |
108 | 263 | expected = [ | 263 | expected = [ |
110 | 264 | {'name': 'mattermost-licence-b5bbb1bf', 'type': 'Opaque', 'stringData': {'licence': 'RANDOMSTRING'}} | 264 | {'name': 'mattermost-k8s-licence-b5bbb1bf', 'type': 'Opaque', 'stringData': {'licence': 'RANDOMSTRING'}} |
111 | 265 | ] | 265 | ] |
112 | 266 | self.assertEqual(self.harness.charm._make_licence_k8s_secrets(), expected) | 266 | self.assertEqual(self.harness.charm._make_licence_k8s_secrets(), expected) |
113 | 267 | 267 | ||
114 | @@ -275,7 +275,7 @@ class TestMattermostK8sCharmHooksDisabled(unittest.TestCase): | |||
115 | 275 | 'name': 'licence', | 275 | 'name': 'licence', |
116 | 276 | 'mountPath': '/secrets', | 276 | 'mountPath': '/secrets', |
117 | 277 | 'secret': { | 277 | 'secret': { |
119 | 278 | 'name': 'mattermost-licence-b5bbb1bf', | 278 | 'name': 'mattermost-k8s-licence-b5bbb1bf', |
120 | 279 | 'files': [{'key': 'licence', 'path': 'licence.txt', 'mode': 0o444}], | 279 | 'files': [{'key': 'licence', 'path': 'licence.txt', 'mode': 0o444}], |
121 | 280 | }, | 280 | }, |
122 | 281 | } | 281 | } |
123 | @@ -295,7 +295,7 @@ class TestMattermostK8sCharmHooksDisabled(unittest.TestCase): | |||
124 | 295 | 'tls_secret_name': 'chat-example-com-tls', | 295 | 'tls_secret_name': 'chat-example-com-tls', |
125 | 296 | } | 296 | } |
126 | 297 | ) | 297 | ) |
128 | 298 | ingress_name = 'mattermost-ingress' | 298 | ingress_name = 'mattermost-k8s-ingress' |
129 | 299 | self.assertNotEqual(ingress_name, self.harness.charm.app.name) | 299 | self.assertNotEqual(ingress_name, self.harness.charm.app.name) |
130 | 300 | expected = { | 300 | expected = { |
131 | 301 | 'kubernetesResources': { | 301 | 'kubernetesResources': { |
132 | @@ -310,7 +310,7 @@ class TestMattermostK8sCharmHooksDisabled(unittest.TestCase): | |||
133 | 310 | 'paths': [ | 310 | 'paths': [ |
134 | 311 | { | 311 | { |
135 | 312 | 'path': '/', | 312 | 'path': '/', |
137 | 313 | 'backend': {'serviceName': 'mattermost', 'servicePort': 8065}, | 313 | 'backend': {'serviceName': 'mattermost-k8s', 'servicePort': 8065}, |
138 | 314 | } | 314 | } |
139 | 315 | ] | 315 | ] |
140 | 316 | }, | 316 | }, |
141 | @@ -344,7 +344,7 @@ class TestMattermostK8sCharmHooksDisabled(unittest.TestCase): | |||
142 | 344 | 'paths': [ | 344 | 'paths': [ |
143 | 345 | { | 345 | { |
144 | 346 | 'path': '/', | 346 | 'path': '/', |
146 | 347 | 'backend': {'serviceName': 'mattermost', 'servicePort': 8065}, | 347 | 'backend': {'serviceName': 'mattermost-k8s', 'servicePort': 8065}, |
147 | 348 | } | 348 | } |
148 | 349 | ] | 349 | ] |
149 | 350 | }, | 350 | }, |
150 | @@ -370,12 +370,12 @@ class TestMattermostK8sCharmHooksDisabled(unittest.TestCase): | |||
151 | 370 | # When we can, this test will need updating. | 370 | # When we can, this test will need updating. |
152 | 371 | self.harness.update_config({'performance_monitoring_enabled': True}) | 371 | self.harness.update_config({'performance_monitoring_enabled': True}) |
153 | 372 | pod_spec = { | 372 | pod_spec = { |
155 | 373 | 'containers': [{'name': 'mattermost', 'envConfig': {}}], | 373 | 'containers': [{'name': 'mattermost-k8s', 'envConfig': {}}], |
156 | 374 | } | 374 | } |
157 | 375 | expected = { | 375 | expected = { |
158 | 376 | 'containers': [ | 376 | 'containers': [ |
159 | 377 | { | 377 | { |
161 | 378 | 'name': 'mattermost', | 378 | 'name': 'mattermost-k8s', |
162 | 379 | 'envConfig': { | 379 | 'envConfig': { |
163 | 380 | 'MM_METRICSSETTINGS_ENABLE': 'true', | 380 | 'MM_METRICSSETTINGS_ENABLE': 'true', |
164 | 381 | 'MM_METRICSSETTINGS_LISTENADDRESS': ':{}'.format(METRICS_PORT), | 381 | 'MM_METRICSSETTINGS_LISTENADDRESS': ':{}'.format(METRICS_PORT), |
165 | @@ -395,15 +395,15 @@ class TestMattermostK8sCharmHooksDisabled(unittest.TestCase): | |||
166 | 395 | self.assertEqual(pod_spec, {}) | 395 | self.assertEqual(pod_spec, {}) |
167 | 396 | self.harness.update_config({'clustering': True}) | 396 | self.harness.update_config({'clustering': True}) |
168 | 397 | pod_spec = { | 397 | pod_spec = { |
170 | 398 | 'containers': [{'name': 'mattermost', 'envConfig': {}}], | 398 | 'containers': [{'name': 'mattermost-k8s', 'envConfig': {}}], |
171 | 399 | } | 399 | } |
172 | 400 | expected = { | 400 | expected = { |
173 | 401 | 'containers': [ | 401 | 'containers': [ |
174 | 402 | { | 402 | { |
176 | 403 | 'name': 'mattermost', | 403 | 'name': 'mattermost-k8s', |
177 | 404 | 'envConfig': { | 404 | 'envConfig': { |
178 | 405 | 'MM_CLUSTERSETTINGS_ENABLE': 'true', | 405 | 'MM_CLUSTERSETTINGS_ENABLE': 'true', |
180 | 406 | 'MM_CLUSTERSETTINGS_CLUSTERNAME': 'mattermost-fakeuuid', | 406 | 'MM_CLUSTERSETTINGS_CLUSTERNAME': 'mattermost-k8s-fakeuuid', |
181 | 407 | 'MM_CLUSTERSETTINGS_USEIPADDRESS': 'true', | 407 | 'MM_CLUSTERSETTINGS_USEIPADDRESS': 'true', |
182 | 408 | }, | 408 | }, |
183 | 409 | } | 409 | } |
184 | @@ -420,12 +420,12 @@ class TestMattermostK8sCharmHooksDisabled(unittest.TestCase): | |||
185 | 420 | self.assertEqual(pod_spec, {}) | 420 | self.assertEqual(pod_spec, {}) |
186 | 421 | self.harness.update_config({'use_canonical_defaults': True}) | 421 | self.harness.update_config({'use_canonical_defaults': True}) |
187 | 422 | pod_spec = { | 422 | pod_spec = { |
189 | 423 | 'containers': [{'name': 'mattermost', 'envConfig': {}}], | 423 | 'containers': [{'name': 'mattermost-k8s', 'envConfig': {}}], |
190 | 424 | } | 424 | } |
191 | 425 | expected = { | 425 | expected = { |
192 | 426 | 'containers': [ | 426 | 'containers': [ |
193 | 427 | { | 427 | { |
195 | 428 | 'name': 'mattermost', | 428 | 'name': 'mattermost-k8s', |
196 | 429 | 'envConfig': { | 429 | 'envConfig': { |
197 | 430 | 'MM_SERVICESETTINGS_CLOSEUNUSEDDIRECTMESSAGES': 'true', | 430 | 'MM_SERVICESETTINGS_CLOSEUNUSEDDIRECTMESSAGES': 'true', |
198 | 431 | 'MM_SERVICESETTINGS_ENABLECUSTOMEMOJI': 'true', | 431 | 'MM_SERVICESETTINGS_ENABLECUSTOMEMOJI': 'true', |
This merge proposal is being monitored by mergebot. Change the status to Approved to merge.