Merge ~mthaddon/charm-k8s-ingress/+git/charm-k8s-ingress:patch-vs-replace into charm-k8s-ingress:master

Proposed by Tom Haddon
Status: Merged
Approved by: Jon Seager
Approved revision: e5a15f95b453fd434613151202a13dcfe71d0d22
Merged at revision: f66f4e4506e83d9e9c1090a97c91c5f3d2f60c3d
Proposed branch: ~mthaddon/charm-k8s-ingress/+git/charm-k8s-ingress:patch-vs-replace
Merge into: charm-k8s-ingress:master
Diff against target: 13 lines (+1/-1)
1 file modified
src/charm.py (+1/-1)
Reviewer Review Type Date Requested Status
🤖 prod-jenkaas-is (community) continuous-integration Approve
ingress-charmers Pending
Review via email: mp+400520@code.launchpad.net

Commit message

Replace rather than patching the ingress so if we remove an item (such as max-body-size) it actually gets removed

To post a comment you must log in.
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
🤖 prod-jenkaas-is (prod-jenkaas-is) wrote :

A CI job is currently in progress. A follow up comment will be added when it completes.

Revision history for this message
🤖 prod-jenkaas-is (prod-jenkaas-is) wrote :

PASSED: Continuous integration, rev:e5a15f95b453fd434613151202a13dcfe71d0d22
https://jenkins.canonical.com/is/job/lp-charm-k8s-ingress-ci/24/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/is/job/lp-charm-test/56/
    None: https://jenkins.canonical.com/is/job/lp-update-mp/63450/

Click here to trigger a rebuild:
https://jenkins.canonical.com/is/job/lp-charm-k8s-ingress-ci/24//rebuild

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

Change successfully merged at revision f66f4e4506e83d9e9c1090a97c91c5f3d2f60c3d

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/src/charm.py b/src/charm.py
2index 56572ab..4ed2e20 100755
3--- a/src/charm.py
4+++ b/src/charm.py
5@@ -293,7 +293,7 @@ class CharmK8SIngressCharm(CharmBase):
6 body = self._get_k8s_ingress()
7 ingresses = api.list_namespaced_ingress(namespace=self._namespace)
8 if self._ingress_name in [x.metadata.name for x in ingresses.items]:
9- api.patch_namespaced_ingress(
10+ api.replace_namespaced_ingress(
11 name=self._ingress_name,
12 namespace=self._namespace,
13 body=body,

Subscribers

People subscribed via source and target branches

to all changes: