Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makefile push microk8s #15

Merged
merged 3 commits into from
Jul 5, 2023
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
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ build-image:
docker build --target build \
--tag openfga:latest \
./images

push-microk8s: build-image
docker tag openfga:latest localhost:32000/openfga:latest
docker push localhost:32000/openfga:latest
5 changes: 5 additions & 0 deletions charms/openfga-k8s/lib/charms/openfga_k8s/v0/openfga.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,13 @@ def _on_openfga_store_created(self, event: OpenFGAStoreCreateEvent):
secret = self.model.get_secret(id=event.token_secret_id)
content = secret.get_content()
# and get the token with content["token"]
if event.token:
# get the token from event.token
```

As you can see the OpenFGA charm will attempt to use Juju secrets to pass the token
to the requiring charm. However if the Juju version does not support secrets it will
fall back to passing plaintext token via relation fata.
"""

import logging
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,13 @@ def _on_openfga_store_created(self, event: OpenFGAStoreCreateEvent):
secret = self.model.get_secret(id=event.token_secret_id)
content = secret.get_content()
# and get the token with content["token"]
if event.token:
# get the token from event.token
```

As you can see the OpenFGA charm will attempt to use Juju secrets to pass the token
to the requiring charm. However if the Juju version does not support secrets it will
fall back to passing plaintext token via relation fata.
"""

import logging
Expand Down