# Kubernetes Deployment Schemas
#
# Hybrid pattern: defaults + makers + instances

let contracts_lib = import "./contracts.ncl" in
let defaults_lib = import "./defaults.ncl" in

{
  defaults = defaults_lib,

  # Maker functions (not exported)
  make_port | not_exported = fun overrides =>
    defaults_lib.K8sPort & overrides,

  make_key_val | not_exported = fun overrides =>
    defaults_lib.K8sKeyVal & overrides,

  make_key_path | not_exported = fun overrides =>
    defaults_lib.K8sKeyPath & overrides,

  make_volume_mount | not_exported = fun overrides =>
    defaults_lib.K8sVolumeMount & overrides,

  make_volume_claim | not_exported = fun overrides =>
    defaults_lib.K8sVolumeClaim & overrides,

  make_config_map | not_exported = fun overrides =>
    defaults_lib.K8sConfigMap & overrides,

  make_secret | not_exported = fun overrides =>
    defaults_lib.K8sSecret & overrides,

  make_volume | not_exported = fun overrides =>
    defaults_lib.K8sVolume & overrides,

  make_service | not_exported = fun overrides =>
    defaults_lib.K8sService & overrides,

  make_resources | not_exported = fun overrides =>
    defaults_lib.K8sResources & overrides,

  make_container | not_exported = fun overrides =>
    defaults_lib.K8sContainers & overrides,

  make_backup | not_exported = fun overrides =>
    defaults_lib.K8sBackup & overrides,

  make_affinity_match | not_exported = fun overrides =>
    defaults_lib.K8sAffinityMatch & overrides,

  make_affinity_selector | not_exported = fun overrides =>
    defaults_lib.K8sAffinityLabelSelector & overrides,

  make_anti_affinity_selector | not_exported = fun overrides =>
    defaults_lib.K8sAntyAffinityLabelSelector & overrides,

  make_affinity | not_exported = fun overrides =>
    defaults_lib.K8sAffinity & overrides,

  make_deploy_spec | not_exported = fun overrides =>
    defaults_lib.K8sDeploySpec & overrides,

  make_prxy_tls | not_exported = fun overrides =>
    defaults_lib.K8sPrxyTLS & overrides,

  make_prxy_port | not_exported = fun overrides =>
    defaults_lib.K8sPrxyPort & overrides,

  make_prxy_gateway_server | not_exported = fun overrides =>
    defaults_lib.K8sPrxyGatewayServer & overrides,

  make_prxy_vs_route | not_exported = fun overrides =>
    defaults_lib.K8sPrxyVirtualServiceRoute & overrides,

  make_prxy_vs_match_url | not_exported = fun overrides =>
    defaults_lib.K8sPrxyVirtualServiceMatchURL & overrides,

  make_prxy_vs_match | not_exported = fun overrides =>
    defaults_lib.K8sPrxyVirtualServiceMatch & overrides,

  make_prxy_virtual_service | not_exported = fun overrides =>
    defaults_lib.K8sPrxyVirtualService & overrides,

  make_defs | not_exported = fun overrides =>
    defaults_lib.K8sDefs & overrides,

  make_service_mesh_config | not_exported = fun overrides =>
    defaults_lib.K8sServiceMeshConfig & overrides,

  make_ingress_config | not_exported = fun overrides =>
    defaults_lib.K8sIngressConfig & overrides,

  make_deploy | not_exported = fun overrides =>
    defaults_lib.K8sDeploy & overrides,

  # Default instances
  DefaultK8sPort = defaults_lib.K8sPort,
  DefaultK8sKeyVal = defaults_lib.K8sKeyVal,
  DefaultK8sKeyPath = defaults_lib.K8sKeyPath,
  DefaultK8sVolumeMount = defaults_lib.K8sVolumeMount,
  DefaultK8sVolumeClaim = defaults_lib.K8sVolumeClaim,
  DefaultK8sConfigMap = defaults_lib.K8sConfigMap,
  DefaultK8sSecret = defaults_lib.K8sSecret,
  DefaultK8sVolume = defaults_lib.K8sVolume,
  DefaultK8sService = defaults_lib.K8sService,
  DefaultK8sResources = defaults_lib.K8sResources,
  DefaultK8sContainers = defaults_lib.K8sContainers,
  DefaultK8sBackup = defaults_lib.K8sBackup,
  DefaultK8sAffinityMatch = defaults_lib.K8sAffinityMatch,
  DefaultK8sAffinityLabelSelector = defaults_lib.K8sAffinityLabelSelector,
  DefaultK8sAntyAffinityLabelSelector = defaults_lib.K8sAntyAffinityLabelSelector,
  DefaultK8sAffinity = defaults_lib.K8sAffinity,
  DefaultK8sDeploySpec = defaults_lib.K8sDeploySpec,
  DefaultK8sPrxyTLS = defaults_lib.K8sPrxyTLS,
  DefaultK8sPrxyPort = defaults_lib.K8sPrxyPort,
  DefaultK8sPrxyGatewayServer = defaults_lib.K8sPrxyGatewayServer,
  DefaultK8sPrxyVirtualServiceRoute = defaults_lib.K8sPrxyVirtualServiceRoute,
  DefaultK8sPrxyVirtualServiceMatchURL = defaults_lib.K8sPrxyVirtualServiceMatchURL,
  DefaultK8sPrxyVirtualServiceMatch = defaults_lib.K8sPrxyVirtualServiceMatch,
  DefaultK8sPrxyVirtualService = defaults_lib.K8sPrxyVirtualService,
  DefaultK8sDefs = defaults_lib.K8sDefs,
  DefaultK8sServiceMeshConfig = defaults_lib.K8sServiceMeshConfig,
  DefaultK8sIngressConfig = defaults_lib.K8sIngressConfig,
  DefaultK8sDeploy = defaults_lib.K8sDeploy,
}
