mirror of
https://git.sr.ht/~goorzhel/turboprop
synced 2024-12-14 11:37:37 +00:00
s/user/userData
"user" alone is too ambiguous for a variable name.
This commit is contained in:
parent
a107476ca1
commit
f8e2703225
4 changed files with 14 additions and 14 deletions
14
README.rst
14
README.rst
|
@ -108,7 +108,7 @@ This is a module that defines a *service derivation*:
|
|||
|
||||
.. code-block:: nix
|
||||
|
||||
{ charts, lib, user, ... }: { # I
|
||||
{ charts, lib, userData, ... }: { # I
|
||||
builder = lib.builders.helmChart; # I2; O1
|
||||
args = { # < - - - - - - - - - - - O2
|
||||
chart = charts.jetstack.cert-manager; # I1
|
||||
|
@ -129,8 +129,8 @@ This is a module that defines a *service derivation*:
|
|||
{
|
||||
apiVersion = "cert-manager.io/v1";
|
||||
kind = "ClusterIssuer";
|
||||
metadata.name = user.vars.k8sCert.name; # I3
|
||||
spec.ca.secretName = user.vars.k8sCert.name;
|
||||
metadata.name = userData.vars.k8sCert.name; # I3
|
||||
spec.ca.secretName = userData.vars.k8sCert.name;
|
||||
}
|
||||
];
|
||||
}
|
||||
|
@ -312,7 +312,7 @@ These functions are only available outside of service modules.
|
|||
mkDerivation
|
||||
------------
|
||||
|
||||
``{charts, user?}
|
||||
``{charts, userData?}
|
||||
-> {pname, version, src, serviceRoot, nsMetadata?, kubeVersion?, apiVersions?}
|
||||
-> <derivation: a dir of Kustomization dirs>``
|
||||
|
||||
|
@ -321,7 +321,7 @@ The main interface to Turboprop.
|
|||
The first attrset instantiates the derivation builder:
|
||||
|
||||
- **charts** (attrs): A tree of Helm chart derivations.
|
||||
- **user** (attrs, default: ``{}``): Additional data to be used by the service modules.
|
||||
- **userData** (attrs, default: ``{}``): Additional data to be used by the service modules.
|
||||
|
||||
The second attrset specifies the derivation to build:
|
||||
|
||||
|
@ -466,7 +466,7 @@ Other signatures
|
|||
Service (unbuilt)
|
||||
-----------------
|
||||
|
||||
``{name, namespace, charts?, lib?, pkgs?, user?} -> {builder, args, extraObjects?}``
|
||||
``{name, namespace, charts?, lib?, pkgs?, userData?} -> {builder, args, extraObjects?}``
|
||||
|
||||
A service module as defined in your flake.
|
||||
|
||||
|
@ -475,7 +475,7 @@ Input attrset, of which any of its attributes may be omitted if unused:
|
|||
- **charts** (attrs): A tree of Helm chart derivations.
|
||||
- **lib** (attrs): Turboprop library.
|
||||
- **pkgs** (attrs): Nixpkgs.
|
||||
- **user** (attrs): Additional data for the service module.
|
||||
- **userData** (attrs): Additional data for the service module.
|
||||
|
||||
Output attrset:
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
haumea,
|
||||
lib,
|
||||
pkgs,
|
||||
user,
|
||||
userData,
|
||||
} @ inputs: let
|
||||
mk = import src/mk.nix inputs;
|
||||
in {
|
||||
|
|
|
@ -45,10 +45,10 @@
|
|||
lib = lib // {
|
||||
mkDerivation = {
|
||||
charts,
|
||||
user ? {},
|
||||
userData ? {},
|
||||
}:
|
||||
(import self {
|
||||
inherit charts haumea lib pkgs user;
|
||||
inherit charts haumea lib pkgs userData;
|
||||
})
|
||||
.mkDerivation;
|
||||
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
haumea,
|
||||
lib,
|
||||
pkgs,
|
||||
user,
|
||||
userData,
|
||||
}: let
|
||||
# This is a Haumea loader that transforms unbuilt service modules:
|
||||
# {charts, lib, pkgs, user, ...} -> {builder, args}
|
||||
# {charts, lib, pkgs, userData, ...} -> {builder, args}
|
||||
# into almost-built modules:
|
||||
# {kubeVersion, apiVersions} -> {out, extra}
|
||||
#
|
||||
|
@ -16,7 +16,7 @@
|
|||
charts,
|
||||
lib,
|
||||
pkgs,
|
||||
user,
|
||||
userData,
|
||||
...
|
||||
} @ inputs: p: let
|
||||
srcPath =
|
||||
|
@ -64,7 +64,7 @@ in {
|
|||
}: let
|
||||
modules = haumea.lib.load {
|
||||
src = serviceRoot;
|
||||
inputs = {inherit charts lib pkgs user;};
|
||||
inputs = {inherit charts lib pkgs userData;};
|
||||
loader = serviceLoader;
|
||||
transformer = lib.liftDefault;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue