Merge ~mthaddon/charm-k8s-ingress/+git/charm-k8s-ingress:dummy-container into charm-k8s-ingress:master

Proposed by Tom Haddon
Status: Merged
Approved by: Jon Seager
Approved revision: 0869b96f6709f648d4c87efa4fb9019c826d6df9
Merged at revision: 6477223711b73ee457213f8b9e5580703a01676c
Proposed branch: ~mthaddon/charm-k8s-ingress/+git/charm-k8s-ingress:dummy-container
Merge into: charm-k8s-ingress:master
Diff against target: 78 lines (+13/-20)
4 files modified
README.md (+3/-9)
config.yaml (+0/-4)
metadata.yaml (+9/-0)
src/charm.py (+1/-7)
Reviewer Review Type Date Requested Status
ingress-charmers Pending
Review via email: mp+401549@code.launchpad.net

Commit message

Juju needs a dummy container per lp#1925350

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
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision 6477223711b73ee457213f8b9e5580703a01676c

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/README.md b/README.md
2index c443f7c..9f2052b 100644
3--- a/README.md
4+++ b/README.md
5@@ -19,17 +19,11 @@ below.
6
7 To build the charm, run `charmcraft build`.
8
9-You'll need version to be using Juju [version 2.9-rc8](https://discourse.charmhub.io/t/juju-2-9-rc8-release-notes/4394/) or later.
10+You'll need version to be using Juju [version 2.9-rc11](https://discourse.charmhub.io/t/juju-2-9-rc11-release-notes/4501) or later.
11
12-Once https://bugs.launchpad.net/juju/+bug/1920102 has been addressed, this
13-charm will be able to use the credentials provided in cluster. However, for
14-now, you will need to provide this charm with credentials to be able to talk
15-to the K8s API directly. This is done via the `kube-config` config option,
16-which should be set to the contents of your kubernetes client configuration.
17-If you're using microk8s you can get this via `microk8s config`. As an example
18-you could deploy this charm as follows:
19+As an example, you could deploy this charm as follows:
20 ```
21-juju deploy ./nginx-ingress-integrator.charm ingress --config kube-config="$(microk8s config)"
22+juju deploy ./nginx-ingress-integrator.charm ingress --resource placeholder-image=google/pause
23 ```
24 To create an ingress for your service, you'd then add a relation to a charm
25 that supports the `ingress` relation. As an example:
26diff --git a/config.yaml b/config.yaml
27index 885c09b..edaed4c 100644
28--- a/config.yaml
29+++ b/config.yaml
30@@ -11,10 +11,6 @@ options:
31 annotation is unset. This value isn't available to be set via the relation
32 as it's a deploy-time configuration item.
33 type: string
34- kube-config:
35- default: ""
36- description: k8s config. If you're using microk8s, this should be the output of `microk8s config`.
37- type: string
38 limit-rps:
39 default: 0
40 description: >
41diff --git a/metadata.yaml b/metadata.yaml
42index 09af63e..ec3b17e 100644
43--- a/metadata.yaml
44+++ b/metadata.yaml
45@@ -9,6 +9,15 @@ bases:
46 - name: ubuntu
47 channel: 20.04/stable
48
49+containers:
50+ placeholder:
51+ resource: placeholder-image
52+
53+resources:
54+ placeholder-image:
55+ type: oci-image
56+ description: Docker image for placeholder - won't be used
57+
58 provides:
59 ingress:
60 interface: ingress
61diff --git a/src/charm.py b/src/charm.py
62index dcba16a..ff69cea 100755
63--- a/src/charm.py
64+++ b/src/charm.py
65@@ -169,13 +169,7 @@ class NginxIngressCharm(CharmBase):
66
67 _fix_lp_1892255()
68
69- # Work around for lp#1920102 - allow the user to pass in k8s config manually.
70- if self.config["kube-config"]:
71- with open('/kube-config', 'w') as kube_config:
72- kube_config.write(self.config["kube-config"])
73- kubernetes.config.load_kube_config(config_file='/kube-config')
74- else:
75- kubernetes.config.load_incluster_config()
76+ kubernetes.config.load_incluster_config()
77
78 self._authed = True
79

Subscribers

People subscribed via source and target branches

to all changes: