hex.k8s.services.build ​
Total args: 83
Required Args ​
| Arg | Notes |
|---|---|
name | - |
labels | - |
image | - |
Optional Args ​
| Arg | Default | Notes |
|---|---|---|
namespace | "default" | - |
min | replicas | - |
max | replicas * 2 | - |
autoscale | true | - |
networkPolicy | true | - |
serviceAccount | true | - |
serviceAccountToken | false | - |
roleBinding | true | - |
port | 443 | - |
altPort | null | - |
extraServicePorts | [ ] | - |
cpuUtilization | 75 | - |
replicas | 2 | - |
revisionHistoryLimit | 2 | - |
maxSurge | 1 | - |
maxUnavailable | 1 | - |
cpuRequest | "400m" | - |
cpuLimit | null | - |
memoryRequest | "1Gi" | - |
memoryLimit | null | - |
ephemeralStorageRequest | null | - |
ephemeralStorageLimit | null | - |
command | null | - |
args | null | - |
env | [ ] | env vars, standard spec |
envAttrs | { } | env vars, as a nix attrset |
envFrom | [ ] | envFrom standard spec |
volumes | [ ] | our custom format for volume |
initContainers | null | will only add to main container |
ip | null | - |
service | true | - |
loadBalancer | false | - |
ingress | false | - |
nodePort | false | - |
subdomain | null | - |
nodeSelector | null | - |
tolerations | null | - |
lifecycle | null | - |
livenessProbe | null | - |
readinessProbe | null | - |
securityContext | null | - |
egressPolicy | defaults.egressPolicy | - |
ingressPolicy | defaults.ingressPolicy | - |
daemonSet | false | - |
suffix | "" | - |
depSuffix | "${suffix}" | - |
saSuffix | "-service-account${suffix}" | - |
npSuffix | "-policy${suffix}" | - |
rbSuffix | "-role-binding-view${suffix}" | - |
hpaSuffix | "-hpa${suffix}" | - |
serviceSuffix | "-service${suffix}" | - |
ingressSuffix | "-ingress${suffix}" | - |
tsSuffix | "-ts${suffix}" | - |
pre1_18 | false | - |
pre1_30 | false | - |
host | null | - |
extraContainer | { } | - |
extraDeploymentAnnotations | { } | - |
extraServiceAccountAnnotations | { } | - |
extraServiceAnnotations | { } | - |
extraIngressAnnotations | { } | - |
extraPodAnnotations | { } | - |
imagePullSecrets | [ ] | - |
ingressTLSSecret | "" | - |
softAntiAffinity | false | - |
hardAntiAffinity | false | - |
disableHttp | true | - |
tailscaleSidecar | false | - |
tailscale_image_base | hex.k8s.tailscale.defaults.tailscale_image_base | - |
tailscale_image_tag | hex.k8s.tailscale.defaults.tailscale_image_tag | - |
hostAliases | [ ] | - |
appArmor | if pre1_30 then "unconfined" else "Unconfined" | - |
extraDep | { } | - |
extraSA | { } | - |
extraNP | { } | - |
extraRB | { } | - |
extraHPA | { } | - |
extraSvc | { } | - |
extraIng | { } | - |
__init | false | - |
Example ​
nix
{hex}:
hex [
(hex.k8s.services.build {
name = "api";
labels = {app = "api";};
image = "ghcr.io/example/api:latest";
port = 8080;
ingress = true;
host = "api.example.com";
})
]