From 6aace993925142f33969a966cf45a8e22cd3b641 Mon Sep 17 00:00:00 2001 From: Tony Meyer Date: Thu, 5 Sep 2024 17:07:38 +1200 Subject: [PATCH] chore: merging diff --- charmcraft.yaml | 90 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/charmcraft.yaml b/charmcraft.yaml index 900d34a..cc7f82f 100644 --- a/charmcraft.yaml +++ b/charmcraft.yaml @@ -9,3 +9,93 @@ bases: run-on: - name: ubuntu channel: "22.04" +<<<<<<< ours +======= + +parts: + charm: + build-packages: + # Required for the cos-lite packages, which have a Rust dependency. + - cargo + +# This file populates the Overview on Charmhub. +# See https://juju.is/docs/sdk/metadata-reference for a checklist and guidance. + +# The charm package name, no spaces (required) +# See https://juju.is/docs/sdk/naming#heading--naming-charms for guidance. +name: demo-api-charm +title: | + demo-fastapi-k8s +description: | + This is a demo charm built on top of a small Python FastAPI server. + This charm could be related to PostgreSQL charm and COS Lite bundle (Canonical Observability Stack). +summary: | + FastAPI Demo charm for Kubernetes + +# This section defines charm config options, and populates the Configure tab on Charmhub. +# If your charm does not require configuration options, delete this section entirely. +# +# See https://juju.is/docs/config for guidance. +config: + options: + server-port: + default: 8000 + description: Default port on which FastAPI is available + type: int + +# If you don't need actions, you can remove this section entirely. +# It ties to `_on_get_db_info_action` handler in src/charm.py +# +# Learn more about actions at: https://juju.is/docs/sdk/actions +actions: + get-db-info: + description: Fetches Database authentication information + params: + show-password: + description: "Show username and password in output information" + type: boolean + default: False + +assumes: + - juju >= 3.1 + - k8s-api + +peers: + fastapi-peer: + interface: fastapi_demo_peers + +requires: + database: + interface: postgresql_client + limit: 1 + log-proxy: + interface: loki_push_api + limit: 1 + +provides: + metrics-endpoint: + interface: prometheus_scrape + grafana-dashboard: + interface: grafana_dashboard + + +# The containers and resources metadata apply to Kubernetes charms only. +# Remove them if not required. + +# Your workload’s containers. +containers: + demo-server: + resource: demo-server-image + +# This field populates the Resources tab on Charmhub. +resources: + # An OCI image resource for each container listed above. + # You may remove this if your charm will run without a workload sidecar container. + demo-server-image: + type: oci-image + description: OCI image from GitHub Container Repository + # The upstream-source field is ignored by Juju. It is included here as a reference + # so the integration testing suite knows which image to deploy during testing. This field + # is also used by the 'canonical/charming-actions' GitHub action for automated releasing. + upstream-source: ghcr.io/canonical/api_demo_server:1.0.1 +>>>>>>> theirs