Skip to content

Commit

Permalink
Rename SD-Core charms by adding -k8s as a suffix
Browse files Browse the repository at this point in the history
Signed-off-by: gatici <gulsum.atici@canonical.com>
  • Loading branch information
gatici committed Dec 5, 2023
1 parent a56010c commit b6f269b
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 25 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
integration-test:
uses: canonical/sdcore-github-workflows/.github/workflows/integration-test.yaml@main
with:
charm-file-name: "sdcore-amf_ubuntu-22.04-amd64.charm"
charm-file-name: "sdcore-amf-k8s_ubuntu-22.04-amd64.charm"

publish-charm:
name: Publish Charm
Expand All @@ -39,7 +39,7 @@ jobs:
if: ${{ github.ref_name == 'main' }}
uses: canonical/sdcore-github-workflows/.github/workflows/publish-charm.yaml@main
with:
charm-file-name: "sdcore-amf_ubuntu-22.04-amd64.charm"
charm-file-name: "sdcore-amf-k8s_ubuntu-22.04-amd64.charm"
secrets: inherit

lib-needs-publishing:
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SD-Core AMF Operator (k8s)
[![CharmHub Badge](https://charmhub.io/sdcore-amf/badge.svg)](https://charmhub.io/sdcore-amf)
# SD-Core AMF K8s Operator
[![CharmHub Badge](https://charmhub.io/sdcore-amf-k8s/badge.svg)](https://charmhub.io/sdcore-amf-k8s)

Charmed Operator for SD-Core's Access and Mobility Management Function (AMF).
Charmed K8s Operator for SD-Core's Access and Mobility Management Function (AMF).


## Pre-requisites
Expand All @@ -11,15 +11,15 @@ Juju model on a Kubernetes cluster.
## Usage

```bash
juju deploy sdcore-amf --trust --channel=edge
juju deploy sdcore-amf-k8s --trust --channel=edge
juju deploy mongodb-k8s --trust --channel=5/edge
juju deploy sdcore-nrf --channel=edge
juju deploy sdcore-nrf-k8s --channel=edge
juju deploy self-signed-certificates --channel=beta
juju integrate sdcore-nrf:database mongodb-k8s
juju integrate sdcore-nrf:certificates self-signed-certificates:certificates
juju integrate sdcore-amf:database mongodb-k8s
juju integrate sdcore-amf:fiveg-nrf sdcore-nrf:fiveg-nrf
juju integrate sdcore-amf:certificates self-signed-certificates:certificates
juju integrate sdcore-nrf-k8s:database mongodb-k8s
juju integrate sdcore-nrf-k8s:certificates self-signed-certificates:certificates
juju integrate sdcore-amf-k8s:database mongodb-k8s
juju integrate sdcore-amf-k8s:fiveg-nrf sdcore-nrf-k8s:fiveg-nrf
juju integrate sdcore-amf-k8s:certificates self-signed-certificates:certificates
```

### Overriding external access information for N2 interface
Expand All @@ -30,7 +30,7 @@ your network configuration, you can override that information through
configuration:

```bash
juju config sdcore-amf external-amf-ip=192.168.0.4 external-amf-hostname=amf.example.com
juju config sdcore-amf-k8s external-amf-ip=192.168.0.4 external-amf-hostname=amf.example.com
```

## Image
Expand Down
10 changes: 5 additions & 5 deletions metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: sdcore-amf
display-name: SD-Core AMF
name: sdcore-amf-k8s
display-name: SD-Core AMF K8s
summary: A Charmed Operator for SD-Core's Access and Mobility Management Function (AMF).
description: |
A Charmed Operator for SD-Core's Access and Mobility Management Function (AMF).
website: https://charmhub.io/sdcore-amf
source: https://github.com/canonical/sdcore-amf-operator
issues: https://github.com/canonical/sdcore-amf-operator/issues
website: https://charmhub.io/sdcore-amf-k8s
source: https://github.com/canonical/sdcore-amf-k8s-operator
issues: https://github.com/canonical/sdcore-amf-k8s-operator/issues

containers:
amf:
Expand Down
6 changes: 3 additions & 3 deletions src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
DEFAULT_FIELD_MANAGER = "controller"


class AMFOperatorCharm(CharmBase):
"""Main class to describe juju event handling for the SD-Core AMF operator."""
class AMFK8sOperatorCharm(CharmBase):
"""Main class to describe juju event handling for the SD-Core AMF K8s operator."""

def __init__(self, *args):
super().__init__(*args)
Expand Down Expand Up @@ -693,4 +693,4 @@ def _get_pod_ip() -> Optional[str]:


if __name__ == "__main__": # pragma: no cover
main(AMFOperatorCharm)
main(AMFK8sOperatorCharm)
2 changes: 1 addition & 1 deletion tests/integration/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
METADATA = yaml.safe_load(Path("./metadata.yaml").read_text())
APP_NAME = METADATA["name"]
DB_CHARM_NAME = "mongodb-k8s"
NRF_CHARM_NAME = "sdcore-nrf"
NRF_CHARM_NAME = "sdcore-nrf-k8s"
TLS_PROVIDER_CHARM_NAME = "self-signed-certificates"


Expand Down
6 changes: 3 additions & 3 deletions tests/unit/test_charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
from ops import testing
from ops.model import ActiveStatus, BlockedStatus, WaitingStatus

from charm import AMFOperatorCharm
from charm import AMFK8sOperatorCharm


class TestCharm(unittest.TestCase):
def setUp(self):
self.namespace = "whatever"
self.harness = testing.Harness(AMFOperatorCharm)
self.harness = testing.Harness(AMFK8sOperatorCharm)
self.harness.set_model_name(name=self.namespace)
self.addCleanup(self.harness.cleanup)
self.harness.set_leader(is_leader=True)
Expand Down Expand Up @@ -618,7 +618,7 @@ def test_given_n2_information_and_service_is_running_and_lb_service_has_no_hostn
)
self.assertEqual(relation_data["amf_ip_address"], "2.2.2.2")
self.assertEqual(
relation_data["amf_hostname"], "sdcore-amf-external.whatever.svc.cluster.local"
relation_data["amf_hostname"], "sdcore-amf-k8s-external.whatever.svc.cluster.local"
)
self.assertEqual(relation_data["amf_port"], "38412")

Expand Down

0 comments on commit b6f269b

Please sign in to comment.