Merge ~mthaddon/charm-k8s-ingress/+git/charm-k8s-ingress:readme-charmhub-deploy into charm-k8s-ingress:master

Proposed by Tom Haddon
Status: Merged
Merge reported by: Tom Haddon
Merged at revision: bb0c25981835b5e20edff0e4314428818f3e7a07
Proposed branch: ~mthaddon/charm-k8s-ingress/+git/charm-k8s-ingress:readme-charmhub-deploy
Merge into: charm-k8s-ingress:master
Diff against target: 67 lines (+18/-12)
1 file modified
README.md (+18/-12)
Reviewer Review Type Date Requested Status
🤖 prod-jenkaas-is (community) continuous-integration Needs Fixing
ingress-charmers Pending
Review via email: mp+402049@code.launchpad.net

Commit message

Update README to include a published charm to avoid users needing to download and build a charm to try things out

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 :

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 :

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 :

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 :
review: Needs Fixing (continuous-integration)
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Failed to merge change (no changes to merge), setting status to needs review.

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

Change cannot be self approved, setting status to needs review.

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

Failed to merge change (no changes to merge), setting status to needs review.

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 32895fd..5d18bfa 100644
3--- a/README.md
4+++ b/README.md
5@@ -20,14 +20,17 @@ juju deploy nginx-ingress-integrator ingress
6 To create an ingress for your service, you'd then add a relation to a charm
7 that supports the `ingress` relation. As an example:
8 ```
9-juju deploy ./gunicorn.charm --resource gunicorn-image='gunicorncharmers/gunicorn-app:edge'
10-juju relate ingress gunicorn
11+juju deploy hello-kubecon
12+juju relate ingress hello-kubecon
13 ```
14-This will create an K8s ingress called `gunicorn-ingress` and a K8s service
15-called `gunicorn-service`. The gunicorn charm in question, which can be found
16-https://code.launchpad.net/~mthaddon/charm-k8s-gunicorn/+git/charm-k8s-gunicorn/+ref/pebble
17-implements the relation using the ingress library, as a trivial example by
18-adding the following to `src/charm.py`:
19+This will create an K8s ingress called `hello-kubecon-ingress` and a K8s service
20+called `hello-kubecon-service`.
21+
22+The nginx-ingress-integrator charm includes a library to make implementing the
23+ingress relation as easy as possible for charm authors. As a trivial example,
24+you can implement this relation by running `charmcraft fetch-lib charms.nginx_ingress_ingress_integrator.v0.ingress`
25+and then adding the following to `src/charm.py` (assuming your charm has a
26+config option of `external_hostname`):
27 ```
28 from charms.nginx_ingress_integrator.v0.ingress import IngressRequires
29
30@@ -39,20 +42,23 @@ self.ingress = IngressRequires(self, {"service-hostname": self.config["external_
31 # In config-changed handler
32 self.ingress.update_config({"service_hostname": self.config["external_hostname"]})
33 ```
34-Any charm implementing this relation will then need to add the following to
35+Any charm implementing this relation will also need to add the following to
36 `metadata.yaml`:
37 ```
38 requires:
39 ingress:
40 interface: ingress
41 ```
42-All of the config items in `config.yaml` with the exception of `kube-config` can
43+All of the config items in `config.yaml` with the exception of `ingress-class` can
44 be set via the relation, e.g. `tls-secret-name` or `max-body-size`.
45+`ingress-class` is a run-time option used to tell Kubernetes which ingress
46+controller to target, in the case where your cluster has multiple ingress
47+controllers.
48
49 Alternatively, you can configure the same ingress via Juju config options, to
50 avoid needing to modify the charm you're deploying it alongside. As an example:
51 ```
52-juju config ingress service-name=gunicorn service-port=80 service-hostname=foo.internal
53+juju config ingress service-name=hello-kubecon service-port=80 service-hostname=foo.internal
54 ```
55 Finally, if the charm you're relating to implements the ingress relation, you
56 can still override the configuration of the ingress using Juju config. Using
57@@ -60,8 +66,8 @@ the above example, where your charm sets the `service-port` as "80" in the
58 relation, you could override this by doing the following:
59 ```
60 juju deploy nginx-ingress-integrator ingress
61-juju deploy ./gunicorn.charm --resource gunicorn-image='gunicorncharmers/gunicorn-app:edge'
62-juju relate ingress gunicorn
63+juju deploy hello-kubecon
64+juju relate ingress hello-kubecon
65 juju config ingress service-port=8080
66 ```
67 In this case, the charm will use the `service-hostname` and `service-name` as

Subscribers

People subscribed via source and target branches

to all changes: