Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ resources:
# used by the 'canonical/charming-actions' GitHub action for automated releases.
# The test_deploy function in tests/integration/test_charm.py reads upstream-source
# to determine which OCI image to use when running the charm's integration tests.
upstream-source: ghcr.io/canonical/api_demo_server:1.0.2
upstream-source: ghcr.io/canonical/api_demo_server:1.0.3
```

### Define the charm class
Expand Down Expand Up @@ -232,7 +232,7 @@ Deploy the `.charm` file, as below. Juju will create a Kubernetes `StatefulSet`

```text
juju deploy ./fastapi-demo_amd64.charm --resource \
demo-server-image=ghcr.io/canonical/api_demo_server:1.0.2
demo-server-image=ghcr.io/canonical/api_demo_server:1.0.3
```


Expand Down Expand Up @@ -273,7 +273,7 @@ curl 10.1.157.73:8000/version
You should see a JSON string with the version of the application:

```
{"version":"1.0.2"}
{"version":"1.0.3"}
```

Congratulations, you've successfully created a minimal Kubernetes charm!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ charmcraft pack
juju refresh \
--path="./fastapi-demo_amd64.charm" \
fastapi-demo --force-units --resource \
demo-server-image=ghcr.io/canonical/api_demo_server:1.0.2
demo-server-image=ghcr.io/canonical/api_demo_server:1.0.3
```

Next, test that the basic action invocation works:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ charmcraft pack
juju refresh \
--path="./fastapi-demo_amd64.charm" \
fastapi-demo --force-units --resource \
demo-server-image=ghcr.io/canonical/api_demo_server:1.0.2
demo-server-image=ghcr.io/canonical/api_demo_server:1.0.3
```

Next, deploy the `postgresql-k8s` charm:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ charmcraft pack
juju refresh \
--path="./fastapi-demo_amd64.charm" \
fastapi-demo --force-units --resource \
demo-server-image=ghcr.io/canonical/api_demo_server:1.0.2
demo-server-image=ghcr.io/canonical/api_demo_server:1.0.3
```

Now, check the available configuration options:
Expand All @@ -201,7 +201,7 @@ Now, let's validate that the app is actually running and reachable on the new po
curl 10.1.157.74:5000/version
```

You should see JSON string with the version of the application: `{"version":"1.0.2"}`
You should see JSON string with the version of the application: `{"version":"1.0.3"}`

Let's also verify that our invalid port number check works by setting the port to `22` and then running `juju status`:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ charmcraft pack
juju refresh \
--path="./fastapi-demo_amd64.charm" \
fastapi-demo --force-units --resource \
demo-server-image=ghcr.io/canonical/api_demo_server:1.0.2
demo-server-image=ghcr.io/canonical/api_demo_server:1.0.3
```

Next, test your charm's ability to integrate with Prometheus, Loki, and Grafana by following the steps below.
Expand Down
2 changes: 1 addition & 1 deletion examples/k8s-1-minimal/charmcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ resources:
# used by the 'canonical/charming-actions' GitHub action for automated releases.
# The test_deploy function in tests/integration/test_charm.py reads upstream-source
# to determine which OCI image to use when running the charm's integration tests.
upstream-source: ghcr.io/canonical/api_demo_server:1.0.2
upstream-source: ghcr.io/canonical/api_demo_server:1.0.3
2 changes: 1 addition & 1 deletion examples/k8s-2-configurable/charmcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ resources:
# used by the 'canonical/charming-actions' GitHub action for automated releases.
# The test_deploy function in tests/integration/test_charm.py reads upstream-source
# to determine which OCI image to use when running the charm's integration tests.
upstream-source: ghcr.io/canonical/api_demo_server:1.0.2
upstream-source: ghcr.io/canonical/api_demo_server:1.0.3
2 changes: 1 addition & 1 deletion examples/k8s-3-postgresql/charmcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ resources:
# used by the 'canonical/charming-actions' GitHub action for automated releases.
# The test_deploy function in tests/integration/test_charm.py reads upstream-source
# to determine which OCI image to use when running the charm's integration tests.
upstream-source: ghcr.io/canonical/api_demo_server:1.0.2
upstream-source: ghcr.io/canonical/api_demo_server:1.0.3
2 changes: 1 addition & 1 deletion examples/k8s-4-action/charmcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ resources:
# used by the 'canonical/charming-actions' GitHub action for automated releases.
# The test_deploy function in tests/integration/test_charm.py reads upstream-source
# to determine which OCI image to use when running the charm's integration tests.
upstream-source: ghcr.io/canonical/api_demo_server:1.0.2
upstream-source: ghcr.io/canonical/api_demo_server:1.0.3
2 changes: 1 addition & 1 deletion examples/k8s-5-observe/charmcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,4 @@ resources:
# used by the 'canonical/charming-actions' GitHub action for automated releases.
# The test_deploy function in tests/integration/test_charm.py reads upstream-source
# to determine which OCI image to use when running the charm's integration tests.
upstream-source: ghcr.io/canonical/api_demo_server:1.0.2
upstream-source: ghcr.io/canonical/api_demo_server:1.0.3