1
0
Fork 0
mirror of https://git.sr.ht/~goorzhel/turboprop synced 2024-12-15 17:50:52 +00:00
Commit graph

26 commits

Author SHA1 Message Date
Antonio Gurgel
b90ffcace4 Use nixhelm as input; rework AT and lib interface
In 0fb8e4d I forgot that flake input-following exists. I don't _have_ to
ship nixhelm myself, but I do need to include it so I can stop bundling
data for an oudated AT version.

In fact, I need not bundle _anything_ for the AT library to be useful;
it's better to make the builder's `chart` arg mandatory and let the user
supply their own (usually taken from nixhelm). If they get bored of
supplying the chart to every AT instance they can factor it out,
as I have in my own deployment.

In fact, my deployment relies on the AT library, which I used to provide
as a flake output -- but it didn't make sense to have one version of the
turboprop library available inside service definitions and another
available outside. So I've made the whole library a flake output.
This may bite me in the future.
2024-02-18 20:56:48 -08:00
Antonio Gurgel
3a6246ab83 Final refactor
Make flake importable at top level.
Move app-template to `./src`, removing `charts` from `./lib`.
Clean up unused bits elsewhere.
2023-12-03 21:45:40 -08:00
Antonio Gurgel
6907ae7373 Clean up 2023-12-03 21:29:15 -08:00
Antonio Gurgel
dbc9ac3501 Typo 2023-11-26 11:28:10 -08:00
Antonio Gurgel
8dd5735b73 Fix mkExistingClaim
Turns out subPath isn't a top-level attribute, as it used to be.
2023-11-26 01:19:00 -08:00
Antonio Gurgel
9594cf686b Deal with colons in image _tags_
intel-gpu-exporter tripped me up because it's pinned to a SHA256.
(As well it should be. I should survey the rest for this possibility.)
2023-11-26 00:42:05 -08:00
Antonio Gurgel
c53071ef67 Tidy up 2023-11-23 10:34:53 -08:00
Antonio Gurgel
b4deb0b258 Implement clusterData
kubelib.buildHelmChart can take the target Kubernetes version and
a list of custom APIs, so I'll bind them both up in an attrset
and pass them to `flake-builder.releases`.

Accordingly, the other release-builders will have to become variadic.
2023-11-20 23:31:11 -08:00
Antonio Gurgel
20aa7ee6d6 Make app-template builders apiVersion-aware 2023-11-20 19:31:14 -08:00
Antonio Gurgel
708e537c7c Remove verbs from lib.{build,fetch}ers.*
Reading things like `lib.builders.buildHelmChart` got exhausting.
2023-11-19 14:24:24 -08:00
Antonio Gurgel
6e09298a02 Tidy up 2023-11-19 11:46:27 -08:00
Antonio Gurgel
408befb503 Decouple homelab idiosyncrasies
My long-term vision for this flake is to use it as a control flake:
plug it into your homelab ("data-plane") flake and avail yourself
of its `lib.builders`, et cetera.

In short, I want this flake to be useful to many people, and that
means not shipping my homelab with it.
2023-11-19 11:35:35 -08:00
Antonio Gurgel
7443323ebb Last bout of refactoring before bed
- Moved external ServiceEntry generator to `lib.resources`.
- Gave it some company: a generator of HTTPRoutes for gateway/svc.
- Gave `lib.vars.svcGateway` a parentRef generator, at the cost of
  another level of recursion, and some variable renaming.
2023-11-18 23:45:45 -08:00
Antonio Gurgel
f62420754a Lower all of lib's imports into named attrs
The namespace was getting a bit crowded.
2023-11-18 22:38:17 -08:00
Antonio Gurgel
4b86013c58 Simplify main image argument
I'm trying to _reduce_ boilerplate, not create it.
2023-11-18 19:22:25 -08:00
Antonio Gurgel
9d888486c1 Learn recursive updates
Turns out `//` is more destructive than I thought. With it,
I was wiping `metadata` of everything but the `namespace` key.
2023-11-18 19:22:25 -08:00
Antonio Gurgel
11a3fcb002 Refactor modules
By declaring builders at the module level, only to call them in
flake.nix, I give myself the opportunity to inject `{name, namespace}`
there and need no longer pass these args into every module myself.
2023-11-18 19:22:25 -08:00
Antonio Gurgel
7609f8624a Add gtw/svc; refactor vars.svcGateway 2023-11-18 14:25:37 -08:00
Antonio Gurgel
fadab2d696 Make simpleHTTPRoute function signature consistent 2023-11-18 13:36:48 -08:00
Antonio Gurgel
048437e884 Fix silly typos from b7560b and 056046
I misspelled `svcGatewayName` and bungled the assignment of
`containers.main.image.tag`.
2023-11-18 13:36:48 -08:00
Antonio Gurgel
b7560fb29e Remove string-format fumbling from lib.mainImage
I can't imagine a time `repoDomain` would ever be unset.
(Yeah, docker.io, that means you too.)
2023-11-18 02:35:02 -08:00
Antonio Gurgel
e22c63f673 Factor out using existing PVCs 2023-11-18 02:29:24 -08:00
Antonio Gurgel
0405524191 Organize lib/vars; don't hard-code Gateway name 2023-11-18 02:20:55 -08:00
Antonio Gurgel
2ccc03bde6 Factor out app-template main container image 2023-11-18 02:19:19 -08:00
Antonio Gurgel
4a86b9a6d6 Missed a spot
I forgot upstream's default value for `route.main.enabled` is false.

And here I only had to change it IN ONE PLACE. This is truly the future.
2023-11-18 02:10:03 -08:00
Antonio Gurgel
05604660ea Factor out app-template HTTPRoutes 2023-11-18 02:09:30 -08:00