At the moment, we have a single app module - influxdb1x
- and its spec has been (somewhat) hacked together as part of building.
Before making that too concrete, should probably think about whether it meets the needs of other apps so that we can adjust.
Then, as a test of the new spec, I'd like to chuck together a package for something different (Grafana maybe?)
Activity
10-Nov-24 13:49
assigned to @btasker
10-Nov-24 13:51
Lets start with the current signature then:
At some point we'll also want a
describe()
that returns information about the package.10-Nov-24 13:52
I guess the answer, then, is to start writing a package for grafana and see what headaches we run into
10-Nov-24 14:15
mentioned in commit 2d37e51baea5dcbac7b87132b89cb5928fff6d24
Message
feat: introduce grafana app (#3)
10-Nov-24 14:16
That wasn't too bad at all.
There's relatively little difference between the two modules:
But that's because they're also both quite simple in terms of demands.
One thing I think we need to do, though, is have
create
include an attribute that can be used to passed a dict of generic config in (for example, if we wanted to add support for SMTP config to grafana).We should also make sure the signature doesn't need updating to pass some other k8s api handle in
10-Nov-24 14:25
mentioned in commit f2b235a84368f4bc1c71064ab2a0a394a5710a2f
Message
feat: add ability to pass an arbitrary dict of config into modules (#3)
Nothing currently sets or consumes these, but it'll allow us to pass app specific config through in future
10-Nov-24 14:25
mentioned in commit de66f0f43df8191a2b0a94aea1cfb046f75f29a1
Message
fix: pass API handles through as a dict (#3)
This makes it easy for other modules to use more complex modules if needed
10-Nov-24 14:27
mentioned in commit 8583afd593879e857e00a478f47fb099f2a5bdc6
Message
chore: make it clear these utility functions aren't part of the ABI (#3)
10-Nov-24 14:36
Although I'm not planning on doing anything with it at the moment, I'd like to add a
resize_disk()
function too.Most app instances are actually going to be a
StateFulSet
and you can't simply resize a PV included in the claim template - you have to go through a bit of mischief.Each module is the authority on how its volumes are defined, so it'd probably be best to give them the (optional) ability to resize.
10-Nov-24 14:40
mentioned in commit 59f80954a543305cd4f6fd899e4179b2359d0718
Message
feat: add
describe()
to module API (#3)10-Nov-24 14:40
mentioned in commit 72fd3f1a2705ac060faaee704b8c45e440c52fd7
Message
feat: introduce
resize_disk()
(#3)10-Nov-24 14:43
OK, so that gives us the following
10-Nov-24 14:44
mentioned in commit 8052b79a8c4b8abe2e5d89d1a28d43745b711ef4
Message
fix: make return type consistent (#3)