## Global Docker image parameters
## Please, note that this will override the image parameters, including dependencies, configured to use the global value
## Current available global Docker image parameters: imageRegistry and imagePullSecrets
##
# global:
#   imageRegistry: myRegistryName
#   imagePullSecrets:
#     - myRegistryKeySecretName

name: controller

## Bitnami NGINX Ingress controller image version
## ref: https://hub.docker.com/r/bitnami/nginx-ingress-controller/tags/
##
image:
  registry: docker.io
  repository: bitnami/nginx-ingress-controller
  tag: 0.40.2-debian-10-r7
  ## Specify a imagePullPolicy
  ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
  ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
  ##
  pullPolicy: IfNotPresent
  ## Optionally specify an array of imagePullSecrets.
  ## Secrets must be manually created in the namespace.
  ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
  ##
  # pullSecrets:
  #   - myRegistryKeySecretName

## String to partially override nginx-ingress-controller.fullname template (will maintain the release name)
##
# nameOverride:

## String to fully override nginx-ingress-controller.fullname template
##
# fullnameOverride:

## Add labels to all the deployed resources
##
commonLabels: {}

## Add annotations to all the deployed resources
##
commonAnnotations: {}

## Custom configuration options for NGINX
## ref: https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/
##
config: {}

## Custom headers before sending traffic to backends
## ref: https://github.com/kubernetes/ingress-nginx/tree/master/docs/examples/customization/custom-headers
##
proxySetHeaders: {}

## Custom headers before sending response traffic to the client
## ref: https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/#add-headers
##
addHeaders: {}

## Required on CNI based K8s installations, since CNI and hostport don't mix yet.
## Can be deprecated once https://github.com/kubernetes/kubernetes/issues/23920 is merged
##
hostNetwork: false

## Optionally, change this to ClusterFirstWithHostNet in case you have 'hostNetwork: true'.
## By default, while using host network, name resolution uses the host's DNS. If you wish nginx-controller
## to keep resolving names inside the k8s network, use ClusterFirstWithHostNet.
##
dnsPolicy: ClusterFirst

## Required only if defaultBackend.enabled = false
## Must be <namespace>/<service_name>
##
defaultBackendService: ''

## Election ID to use for status update
##
electionID: ingress-controller-leader

## Bare-metal considerations via the host network
## ref: https://kubernetes.github.io/ingress-nginx/deploy/baremetal/#via-the-host-network
##
reportNodeInternalIp: false

## Name of the ingress class to route through this controller
##
ingressClass: nginx

## Allows customization of the external service
## the ingress will be bound to via DNS
##
publishService:
  enabled: false
  ## Allows overriding of the publish service to bind to
  ## Must be <namespace>/<service_name>
  ##
  pathOverride: ''

## Limit the scope of the controller
## Defaults to `.Release.Namespace`
##
scope:
  enabled: false

## Allows customization of the configmap / nginx-configmap namespace
## Defaults to .Release.Namespace
##
configMapNamespace: ''

## Allows customization of the tcp-services-configmap namespace
## Defaults to .Release.Namespace
##
tcpConfigMapNamespace: ''

## Allows customization of the udp-services-configmap namespace
## Defaults to .Release.Namespace
##
udpConfigMapNamespace: ''

## License key used to download Geolite2 database
##
maxmindLicenseKey: ''

## Additional command line arguments to pass to nginx-ingress-controller
## E.g. to specify the default SSL certificate you can use
## extraArgs:
##   default-ssl-certificate: "<namespace>/<secret_name>"
##
extraArgs: {}

## Additional environment variables to set
## E.g:
## extraEnvs:
##   - name: FOO
##     valueFrom:
##       secretKeyRef:
##         key: FOO
##         name: secret-resource
##
extraEnvs: []

## TCP service key:value pairs
## ref: https://github.com/kubernetes/contrib/tree/master/ingress/controllers/nginx/examples/tcp
##
tcp: {}
#  8080: "default/example-tcp-svc:9000"

## UDP service key:value pairs
## ref: https://github.com/kubernetes/contrib/tree/master/ingress/controllers/nginx/examples/udp
##
udp: {}
#  53: "kube-system/kube-dns:53"

## DaemonSet or Deployment
##
kind: DaemonSet

## Daemonset configuration
##
daemonset:
  ## Use hostPort for NGINX Ingress Controller
  ##
  useHostPort: false

  ## HTTP and HTTPS ports
  ##
  hostPorts:
    http: 80
    https: 443

## Number of replicas
##
replicaCount: 1
minAvailable: 1

## Pod extra labels
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
##
podLabels: {}

## Pod annotations
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
##
podAnnotations: {}

## Security Context policies for controller pods
## See https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/ for
## notes on enabling and using sysctls
##
podSecurityContext: {}

## Kubernetes Security Context
## https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
##
securityContext:
  fsGroup: 1001
  runAsUser: 1001
  allowPrivilegeEscalation: true

## updateStrategy
## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies
##
updateStrategy: {}

## minReadySeconds to avoid killing pods before we are ready
##
minReadySeconds: 0

## Affinity for pod assignment
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
##
affinity: {}

## Node labels for pod assignment. Evaluated as a template.
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
##
nodeSelector: {}

## Tolerations for pod assignment
## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
##
tolerations: []

## terminationGracePeriodSeconds
##
terminationGracePeriodSeconds: 60

## Container lifecycle
##
lifecycle: {}

## priorityClassName
## ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass
##
priorityClassName: ''

## Rollback limit
##
revisionHistoryLimit: 10

## Configures the ports the NGINX Ingress controller listens on
##
containerPort:
  http: 80
  https: 443

## Liveness and readiness probe values
## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
##
livenessProbe:
  failureThreshold: 3
  initialDelaySeconds: 10
  periodSeconds: 10
  successThreshold: 1
  timeoutSeconds: 1
  port: 10254
readinessProbe:
  failureThreshold: 3
  initialDelaySeconds: 10
  periodSeconds: 10
  successThreshold: 1
  timeoutSeconds: 1
  port: 10254

## Containers' resource requests and limits
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
##
resources:
  # We usually recommend not to specify default resources and to leave this as a conscious
  # choice for the user. This also increases chances charts run on environments with little
  # resources, such as Minikube. If you do want to specify resources, uncomment the following
  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
  limits: {}
  #   cpu: 250m
  #   memory: 256Mi
  requests: {}
  #   cpu: 250m
  #   memory: 256Mi

## Additional containers to be added to the controller pod
## See https://github.com/lemonldap-ng-controller/lemonldap-ng-controller as example.
##
extraContainers: []

## Additional volumeMounts to the controller main container.
## extraVolumeMounts:
##   - name: copy-portal-skins
##     mountPath: /var/lib/lemonldap-ng/portal/skins
##
extraVolumeMounts: []

## Additional volumes to the controller pod.
## extraVolumes
##   - name: copy-portal-skins
##     emptyDir: {}
##
extraVolumes: []

## Containers, which are run before the app containers are started.
## extraInitContainers:
##   - name: init-myservice
##     image: bitnami/minideb
##     command: ['sh', '-c', 'install_packages dnsutils && until nslookup myservice; do echo waiting for myservice; sleep 2; done;']
extraInitContainers: []

## Override NGINX template
##
customTemplate:
  configMapName: ''
  configMapKey: ''

## Service parameters
##
service:
  ## Service type
  ##
  type: LoadBalancer
  ## Service ports
  ##
  ports:
    http: 80
    https: 443
  ## Specify the nodePort value(s) for the LoadBalancer and NodePort service types.
  ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
  ##
  nodePorts:
    http: ''
    https: ''
    tcp: {}
    udp: {}

  ## Provide any additional annotations which may be required. This can be used to
  ## set the LoadBalancer service type to internal only.
  ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
  ##
  annotations: {}
  ## Provide any additional label which may be required.
  ##
  labels: {}

  ## clusterIP (optional)
  ##
  # clusterIP:

  ## List of IP addresses at which the controller services are available
  ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips
  ##
  externalIPs: []

  ## loadBalancerIP (optional, cloud specific)
  ## ref: http://kubernetes.io/docs/user-guide/services/#type-loadbalancer
  ##
  # loadBalancerIP:
  ## Load Balancer sources
  ## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
  ##
  loadBalancerSourceRanges: []

  ## Set external traffic policy to: "Local" to preserve source IP on providers supporting it
  ## Ref: https://kubernetes.io/docs/tutorials/services/source-ip/#source-ip-for-services-with-typeloadbalancer
  ##
  externalTrafficPolicy: ''
  healthCheckNodePort: 0

## Default 404 backend
##
defaultBackend:
  ## If false, defaultBackendService must be provided
  ##
  enabled: true
  name: default-backend
  ## Bitnami NGINX image
  ## ref: https://hub.docker.com/r/bitnami/nginx/tags/
  ##
  image:
    registry: docker.io
    repository: bitnami/nginx
    tag: 1.19.3-debian-10-r13
    pullPolicy: IfNotPresent
    ## Optionally specify an array of imagePullSecrets.
    ## Secrets must be manually created in the namespace.
    ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
    ##
    # pullSecrets:
    #   - myRegistryKeySecretName

  ## Additional command line arguments to pass to NGINX backend
  ##
  extraArgs: {}
  port: 8080

  ## Number of replicas
  ##
  replicaCount: 1
  minAvailable: 1

  ## Pod extra labels
  ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
  ##
  podLabels: {}

  ## Pod annotations
  ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
  ##
  podAnnotations: {}

  ## Security Context policies for controller pods
  ## See https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/ for
  ## notes on enabling and using sysctls
  ##
  podSecurityContext: {}

  ## Affinity for pod assignment
  ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
  ##
  affinity: {}

  ## Node labels for pod assignment. Evaluated as a template.
  ## Ref: https://kubernetes.io/docs/user-guide/node-selection/
  ##
  nodeSelector: {}

  ## Tolerations for pod assignment
  ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
  ##
  tolerations: []

  ## Containers' resource requests and limits
  ## ref: http://kubernetes.io/docs/user-guide/compute-resources/
  ##
  resources:
    # We usually recommend not to specify default resources and to leave this as a conscious
    # choice for the user. This also increases chances charts run on environments with little
    # resources, such as Minikube. If you do want to specify resources, uncomment the following
    # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
    limits: {}
    #   cpu: 250m
    #   memory: 256Mi
    requests: {}
    #   cpu: 250m
    #   memory: 256Mi

  ## Readiness and liveness probes for default backend
  ## Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/
  ##
  livenessProbe:
    path: /
    failureThreshold: 3
    initialDelaySeconds: 30
    periodSeconds: 10
    successThreshold: 1
    timeoutSeconds: 5
  readinessProbe:
    path: /
    failureThreshold: 6
    initialDelaySeconds: 0
    periodSeconds: 5
    successThreshold: 1
    timeoutSeconds: 5

  ## Service parameters
  ##
  service:
    ## Service type
    ##
    type: ClusterIP
    ## Service port
    ##
    port: 80

## Prometheus exporter parameters
##
metrics:
  enabled: true

  ## Prometheus exporter service parameters
  ##
  service:
    ## Prometheus exporter service type
    ##
    type: ClusterIP
    ## Prometheus exporter port
    ##
    port: 9913
    ## Annotations for the Prometheus exporter service
    ##
    annotations:
      prometheus.io/scrape: 'true'
      prometheus.io/port: '{{ .Values.metrics.service.port }}'

  ## Prometheus Operator ServiceMonitor configuration
  ##
  serviceMonitor:
    enabled: false
    ## Namespace in which Prometheus is running
    ##
    # namespace: monitoring
    ## Interval at which metrics should be scraped.
    ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint
    ##
    # interval: 10s
    ## Timeout after which the scrape is ended
    ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint
    ##
    # scrapeTimeout: 10s
    ## ServiceMonitor selector labels
    ## ref: https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-configuration
    ##
    # selector:
    #   prometheus: my-prometheus

  prometheusRule:
    enabled: false
    additionalLabels: {}
    namespace: ''
    rules: []

## Role Based Access
## Ref: https://kubernetes.io/docs/admin/authorization/rbac/
##
rbac:
  ## Specifies whether RBAC rules should be created
  ##
  create: true

## Topology spread constraints rely on node labels to identify the topology domain(s) that each Node is in.
## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/
##
## topologySpreadConstraints:
##   - maxSkew: 1
##     topologyKey: failure-domain.beta.kubernetes.io/zone
##     whenUnsatisfiable: DoNotSchedule
##     labelSelector:
##       matchLabels:
##         app.kubernetes.io/instance: ingress-nginx-internal
##
topologySpreadConstraints: []

## Pods Service Account
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
##
serviceAccount:
  ## Specifies whether a ServiceAccount should be created
  ##
  create: true
  ## The name of the ServiceAccount to use.
  ## If not set and create is true, a name is generated using the metrics-server.fullname template
  # name:

  ## Annotations for service account. Evaluated as a template.
  ## Only used if `create` is `true`.
  ##
  annotations: {}

## If true, create & use Pod Security Policy resources
## https://kubernetes.io/docs/concepts/policy/pod-security-policy/
##
podSecurityPolicy:
  enabled: false

## Autoscaling parameters
##
autoscaling:
  enabled: false
  #  minReplicas: 1
  #  maxReplicas: 11
  #  targetCPUUtilizationPercentage: 50
  #  targetMemoryUtilizationPercentage: 50
