Merge ~pjdc/charm-k8s-mattermost/+git/charm-k8s-mattermost:outbound-proxy into charm-k8s-mattermost:master

Proposed by Paul Collins
Status: Merged
Approved by: Paul Collins
Approved revision: b7234e405df00752770b53153f0da400afacab9d
Merged at revision: b314a7bc7c3f906bab2a572f322be9bfb95f389b
Proposed branch: ~pjdc/charm-k8s-mattermost/+git/charm-k8s-mattermost:outbound-proxy
Merge into: charm-k8s-mattermost:master
Diff against target: 49 lines (+27/-0)
2 files modified
config.yaml (+21/-0)
src/charm.py (+6/-0)
Reviewer Review Type Date Requested Status
Tom Haddon Approve
Canonical IS Reviewers Pending
Review via email: mp+384687@code.launchpad.net

Commit message

add outbound_proxy and outbound_proxy_exceptions settings

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
Paul Collins (pjdc) wrote :
Revision history for this message
Tom Haddon (mthaddon) wrote :

LGTM

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

Change successfully merged at revision b314a7bc7c3f906bab2a572f322be9bfb95f389b

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/config.yaml b/config.yaml
2index 985f777..5a55055 100644
3--- a/config.yaml
4+++ b/config.yaml
5@@ -7,6 +7,27 @@ options:
6 type: boolean
7 description: Allows users to sign up from the root page without an invite
8 default: false
9+ outbound_proxy:
10+ type: string
11+ description: The proxy to use for outbound requests.
12+ default: ''
13+ outbound_proxy_exceptions:
14+ type: string
15+ description: |
16+ A list of destinations for which the outbound proxy will not
17+ be used.
18+
19+ This can be configured as a set of comma-separated IP
20+ addresses (e.g. "1.2.3.4"), IP address ranges specified in
21+ CIDR notation (e.g. "1.2.3.4/8"), or domain names. An IP
22+ address or domain name can also include a port number.
23+
24+ When a domain name is specified, the domain and all of its
25+ subdomains are matched. However, a domain name with a
26+ leading "." only matches the subdomains. For example,
27+ "example.com" matches both "example.com" and "sub.example.com"
28+ while ".example.com" only matches the latter.
29+ default: ''
30 site_url:
31 type: string
32 description: |
33diff --git a/src/charm.py b/src/charm.py
34index 05e97e9..077c8fc 100755
35--- a/src/charm.py
36+++ b/src/charm.py
37@@ -135,6 +135,12 @@ class MattermostK8sCharm(CharmBase):
38 if config['site_url']:
39 pod_config['MM_SERVICESETTINGS_SITEURL'] = config['site_url']
40
41+ if config['outbound_proxy']:
42+ pod_config['HTTP_PROXY'] = config['outbound_proxy']
43+ pod_config['HTTPS_PROXY'] = config['outbound_proxy']
44+ if config['outbound_proxy_exceptions']:
45+ pod_config['NO_PROXY'] = config['outbound_proxy_exceptions']
46+
47 return pod_config
48
49 def _make_k8s_resources(self):

Subscribers

People subscribed via source and target branches