Skip to content

Commit

Permalink
doc: add more documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
wood-push-melon committed Jan 5, 2024
1 parent 5ee495c commit 20746b4
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 15 deletions.
23 changes: 12 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,22 @@ this operator.

## Developing

You can use the environments created by `tox` for development:
You can use the environments created by `tox` for development. It helps
install `pre-commit` and `mypy` type checker.

```shell
tox --notest -e unit
source .tox/unit/bin/activate
$ tox -e dev
$ source .tox/unit/bin/activate
```

## Testing

```shell
tox -e fmt # update your code according to linting rules
tox -e lint # code style
tox -e unit # unit tests
tox -e integration # integration tests
tox # runs 'fmt', 'lint', and 'unit' environments
$ tox -e fmt # update your code according to linting rules
$ tox -e lint # code style
$ tox -e unit # unit tests
$ tox -e integration # integration tests
$ tox # runs 'fmt', 'lint', and 'unit' environments
```

## Build the charm
Expand All @@ -58,13 +59,13 @@ $ charmcraft pack

```shell
# Create a juju model
juju add-model dev
$ juju add-model dev

# Enable DEBUG logging
juju model-config logging-config="<root>=INFO;unit=DEBUG"
$ juju model-config logging-config="<root>=INFO;unit=DEBUG"

# Deploy the charm
juju deploy ./glauth-k8s_ubuntu-*-amd64.charm --resource oci-image=$(yq eval '.resources.oci-image.upstream-source' metadata.yaml)
$ juju deploy ./glauth-k8s_ubuntu-*-amd64.charm --resource oci-image=$(yq eval '.resources.oci-image.upstream-source' metadata.yaml)
```

## Observability
Expand Down
44 changes: 40 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,51 @@ $ juju integrate glauth-k8s postgresql-k8s

## Integrations

TBD.
### `postgresql_client` Integration

The `glauth-k8s` charmed operator requires the integration with the
`postgres-k8s` charmed operator following the [`postgresql_client` interface
protocol](https://github.com/canonical/charm-relation-interfaces/tree/main/interfaces/postgresql_client/v0).

```shell
$ juju integrate glauth-k8s postgresql-k8s
```

### `ldap` Integration

The `glauth-k8s` charmed operator offers the `ldap` integration with any
LDAP client charmed operator following
the [`ldap` interface protocol](https://github.com/canonical/charm-relation-interfaces/tree/main/interfaces/ldap/v0).

```shell
$ juju integrate <ldap-client-charm>:ldap glauth-k8s:ldap
```

### `glauth_auxiliary` Integration

The `glauth-k8s` charmed operator provides the `glauth_auxiliary`
integration with
the [`glauth-utils` charmed operator](https://github.com/canonical/glauth-utils)
to deliver necessary auxiliary configurations.

```shell
$ juju integrate glauth-k8s glauth-utils
```

## Configurations

TBD.
The `glauth-k8s` charmed operator offers the following charm configuration
options.

## Actions
| Charm Config Option | Description | Example |
|:-------------------:|------------------------------------------------------------------|---------------------------------------------------------|
| `base-dn` | The portion of the DIT in which to search for matching entries | `juju config <charm-app> base-dn="dc=glauth,dc=com"` |
| `hostname` | The hostname of the LDAP server in `glauth-k8s` charmed operator | `juju config <charm-app> hostname="ldap.canonical.com"` |

TBD.
> ⚠️ **NOTE**
>
> The `hostname` should **NOT** contain the ldap scheme (e.g. `ldap://`) and
> port.
## Contributing

Expand Down

0 comments on commit 20746b4

Please sign in to comment.