Skip to content

hex.k8s.services.build ​

Total args: 83

Required Args ​

ArgNotes
name-
labels-
image-

Optional Args ​

ArgDefaultNotes
namespace"default"-
minreplicas-
maxreplicas * 2-
autoscaletrue-
networkPolicytrue-
serviceAccounttrue-
serviceAccountTokenfalse-
roleBindingtrue-
port443-
altPortnull-
extraServicePorts[ ]-
cpuUtilization75-
replicas2-
revisionHistoryLimit2-
maxSurge1-
maxUnavailable1-
cpuRequest"400m"-
cpuLimitnull-
memoryRequest"1Gi"-
memoryLimitnull-
ephemeralStorageRequestnull-
ephemeralStorageLimitnull-
commandnull-
argsnull-
env[ ]env vars, standard spec
envAttrs{ }env vars, as a nix attrset
envFrom[ ]envFrom standard spec
volumes[ ]our custom format for volume
initContainersnullwill only add to main container
ipnull-
servicetrue-
loadBalancerfalse-
ingressfalse-
nodePortfalse-
subdomainnull-
nodeSelectornull-
tolerationsnull-
lifecyclenull-
livenessProbenull-
readinessProbenull-
securityContextnull-
egressPolicydefaults.egressPolicy-
ingressPolicydefaults.ingressPolicy-
daemonSetfalse-
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_18false-
pre1_30false-
hostnull-
extraContainer{ }-
extraDeploymentAnnotations{ }-
extraServiceAccountAnnotations{ }-
extraServiceAnnotations{ }-
extraIngressAnnotations{ }-
extraPodAnnotations{ }-
imagePullSecrets[ ]-
ingressTLSSecret""-
softAntiAffinityfalse-
hardAntiAffinityfalse-
disableHttptrue-
tailscaleSidecarfalse-
tailscale_image_basehex.k8s.tailscale.defaults.tailscale_image_base-
tailscale_image_taghex.k8s.tailscale.defaults.tailscale_image_tag-
hostAliases[ ]-
appArmorif pre1_30 then "unconfined" else "Unconfined"-
extraDep{ }-
extraSA{ }-
extraNP{ }-
extraRB{ }-
extraHPA{ }-
extraSvc{ }-
extraIng{ }-
__initfalse-

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";
  })
]