1# This file has been modified by Chainguard, Inc.
3# Copyright Chainguard, Inc. All Rights Reserved.
4# Chainguard, Inc. modifications are subject to the license
5# available at: https://www.chainguard.dev/legal/software-license-agreement
7# Copyright Broadcom, Inc. All Rights Reserved.
8# SPDX-License-Identifier: APACHE-2.0
10## @section Global parameters
11## Global Docker image parameters
12## Please, note that this will override the image parameters, including dependencies, configured to use the global value
13## Current available global Docker image parameters: imageRegistry, imagePullSecrets and storageClass
16## @param global.imageRegistry Global Docker image registry
17## @param global.useImageTags Pull every image by tag and ignore all image digests, including digests set in values. Use this when your registry mirror does not have the chart's default image digests.
18## @param global.imagePullSecrets Global Docker registry secret names as an array
19## @param global.defaultStorageClass Global default StorageClass for Persistent Volume(s)
20## @param global.storageClass DEPRECATED: use global.defaultStorageClass instead
27 ## - myRegistryKeySecretName
30 defaultStorageClass: ""
32 ## Security parameters
35 ## @param global.security.allowInsecureImages Allows skipping image verification
36 allowInsecureImages: false
37 ## Compatibility adaptations for Kubernetes platforms
40 ## Compatibility adaptations for Openshift
43 ## @param global.compatibility.openshift.adaptSecurityContext Adapt the securityContext sections of the deployment to make them compatible with Openshift restricted-v2 SCC: remove runAsUser, runAsGroup and fsGroup and let the platform use their allowed default IDs. Possible values: auto (apply if the detected running cluster is Openshift), force (perform the adaptation always), disabled (do not perform adaptation)
45 adaptSecurityContext: auto
47## @section Common parameters
50## @param kubeVersion Override Kubernetes version
53## @param nameOverride String to partially override common.names.fullname
56## @param fullnameOverride String to fully override common.names.fullname
59## @param commonLabels Labels to add to all deployed objects
62## @param commonAnnotations Annotations to add to all deployed objects
65## @param clusterDomain Kubernetes cluster domain name
67clusterDomain: cluster.local
68## @param extraDeploy Array of extra objects to deploy with the release
71## @param deploymentAnnotations Annotations to add to the deployment
73deploymentAnnotations: {}
74## Enable diagnostic mode in the deployment
77 ## @param diagnosticMode.enabled Enable diagnostic mode (all probes will be disabled and the command will be overridden)
80 ## @param diagnosticMode.command Command to override all containers in the deployment
84 ## @param diagnosticMode.args Args to override all containers in the deployment
88## @section Traffic Exposure Parameters
91## haproxy service parameters
94 ## @param service.type haproxy service type
97 ## @param service.ports [array] List of haproxy service ports
104 ## @param service.clusterIP haproxy service Cluster IP
109 ## @param service.loadBalancerIP haproxy service Load Balancer IP
110 ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-loadbalancer
113 ## @param service.loadBalancerSourceRanges haproxy service Load Balancer sources
114 ## ref: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
116 ## loadBalancerSourceRanges:
119 loadBalancerSourceRanges: []
120 ## @param service.externalTrafficPolicy haproxy service external traffic policy
121 ## ref https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip
123 ## @param service.externalIPs [array] External IPs
124 ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#external-ips
127 externalTrafficPolicy: Cluster
128 ## @param service.annotations Additional custom annotations for haproxy service
131 ## @param service.sessionAffinity Session Affinity for Kubernetes service, can be "None" or "ClientIP"
132 ## If "ClientIP", consecutive client requests will be directed to the same mongos Pod
133 ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
135 sessionAffinity: None
136 ## @param service.sessionAffinityConfig Additional settings for the sessionAffinity
137 ## sessionAffinityConfig:
139 ## timeoutSeconds: 300
141 sessionAffinityConfig: {}
142 ## @param service.labels Additional custom labels for haproxy service
145 ## @param service.ipFamilyPolicy IP family policy for the service
146 ## Allowed values: SingleStack, PreferDualStack, RequireDualStack
147 ## ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services
150 ## @param service.ipFamilies IP families for the service
151 ## Allowed values: IPv4, IPv6
152 ## ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services
160## Ref: https://kubernetes.io/docs/concepts/services-networking/network-policies/
163 ## @param networkPolicy.enabled Specifies whether a NetworkPolicy should be created
166 ## @param networkPolicy.allowExternal Don't require server label for connections
167 ## The Policy model to apply. When set to false, only pods with the correct
168 ## server label will have network access to the ports server is listening
169 ## on. When true, server will accept connections from any source
170 ## (with the correct destination port).
173 ## @param networkPolicy.allowExternalEgress Allow the pod to access any range of port and all destinations.
175 allowExternalEgress: true
176 ## @param networkPolicy.extraIngress [array] Add extra ingress rules to the NetworkPolicy
186 ## - matchExpressions:
192 ## @param networkPolicy.extraEgress [array] Add extra ingress rules to the NetworkPolicy
202 ## - matchExpressions:
209 ## @param networkPolicy.ingressNSMatchLabels [object] Labels to match to allow traffic from other namespaces
210 ## @param networkPolicy.ingressNSPodMatchLabels [object] Pod labels to match to allow traffic from other namespaces
212 ingressNSMatchLabels: {}
213 ingressNSPodMatchLabels: {}
214## Configure the ingress resource that allows you to access the haproxy installation
215## ref: https://kubernetes.io/docs/concepts/services-networking/ingress/
218 ## @param ingress.enabled Enable ingress record generation for haproxy
221 ## @param ingress.pathType Ingress path type
223 pathType: ImplementationSpecific
224 ## @param ingress.apiVersion Force Ingress API version (automatically detected if not set)
227 ## @param ingress.hostname Default host for the ingress record
229 hostname: haproxy.local
230 ## @param ingress.path Default path for the ingress record
231 ## NOTE: You may need to set this to '/*' in order to use this with ALB ingress controllers
234 ## @param ingress.annotations Additional annotations for the Ingress resource. To enable certificate autogeneration, place here your cert-manager annotations.
235 ## For a full list of possible ingress annotations, please see
236 ## ref: https://github.com/kubernetes/ingress-nginx/blob/main/docs/user-guide/nginx-configuration/annotations.md
237 ## Use this parameter to set the required annotations for cert-manager, see
238 ## ref: https://cert-manager.io/docs/usage/ingress/#supported-annotations
242 ## kubernetes.io/ingress.class: nginx
243 ## cert-manager.io/cluster-issuer: cluster-issuer-name
246 ## @param ingress.tls Enable TLS configuration for the host defined at `ingress.hostname` parameter
247 ## TLS certificates will be retrieved from a TLS secret with name: `{{- printf "%s-tls" .Values.ingress.hostname }}`
249 ## - Use the `ingress.secrets` parameter to create this TLS secret
250 ## - Rely on cert-manager to create it by setting the corresponding annotations
251 ## - Rely on Helm to create self-signed certificates by setting `ingress.selfSigned=true`
254 ## DEPRECATED: Use ingress.annotations instead of ingress.certManager
255 ## certManager: false
258 ## @param ingress.selfSigned Create a TLS secret for this ingress record using self-signed certificates generated by Helm
261 ## @param ingress.extraHosts An array with additional hostname(s) to be covered with the ingress record
264 ## - name: haproxy.local
268 ## @param ingress.extraPaths An array with additional arbitrary paths that may need to be added to the ingress under the main host
273 ## serviceName: ssl-redirect
274 ## servicePort: use-annotation
277 ## @param ingress.extraTls TLS configuration for additional hostname(s) to be covered with this ingress record
278 ## ref: https://kubernetes.io/docs/concepts/services-networking/ingress/#tls
283 ## secretName: haproxy.local-tls
286 ## @param ingress.secrets Custom TLS certificates as secrets
287 ## NOTE: 'key' and 'certificate' are expected in PEM format
288 ## NOTE: 'name' should line up with a 'secretName' set further up
289 ## If it is not set and you're using cert-manager, this is unneeded, as it will create a secret for you with valid certificates
290 ## If it is not set and you're NOT using cert-manager either, self-signed certificates will be created valid for 365 days
291 ## It is also possible to create and manage the certificates outside of this helm chart
292 ## Please see README.md for more information
295 ## - name: haproxy.local-tls
297 ## -----BEGIN RSA PRIVATE KEY-----
299 ## -----END RSA PRIVATE KEY-----
301 ## -----BEGIN CERTIFICATE-----
303 ## -----END CERTIFICATE-----
306 ## @param ingress.ingressClassName IngressClass that will be be used to implement the Ingress (Kubernetes 1.18+)
307 ## This is supported in Kubernetes 1.18+ and required if you have more than one IngressClass marked as the default for your cluster .
308 ## ref: https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/
311 ## @param ingress.extraRules Additional rules to be covered with this ingress record
312 ## ref: https://kubernetes.io/docs/concepts/services-networking/ingress/#ingress-rules
315 ## - host: example.local
325## @param terminationGracePeriodSeconds Seconds HAProxy pod needs to terminate gracefully
326## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods
327terminationGracePeriodSeconds: ""
328## @section HAProxy Parameters
330## @param image.registry [default: REGISTRY_NAME] HAProxy image registry
331## @param image.repository [default: REPOSITORY_NAME/haproxy] HAProxy image repository
332## @skip image.tag HAProxy image tag (immutable tags are recommended)
333## @param image.digest HAProxy image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag
334## @param image.pullPolicy HAProxy image pull policy
335## @param image.pullSecrets HAProxy image pull secrets
339 repository: chainguard-private/haproxy-iamguarded
341 digest: sha256:4f9438b2c3318714da77741c394ddd17c86b610601000ee6910f62d3f5cfa43d
342 ## Specify a imagePullPolicy
343 ## ref: https://kubernetes.io/docs/concepts/containers/images/#pre-pulled-images
345 pullPolicy: IfNotPresent
346 ## Optionally specify an array of imagePullSecrets.
347 ## Secrets must be manually created in the namespace.
348 ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
351 ## - myRegistryKeySecretName
354## @param replicaCount Number of haproxy replicas to deploy
357## Configure extra options for haproxy containers' liveness and readiness probes
358## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes
359## @param startupProbe.enabled Enable startupProbe on haproxy nodes
360## @param startupProbe.initialDelaySeconds Initial delay seconds for startupProbe
361## @param startupProbe.periodSeconds Period seconds for startupProbe
362## @param startupProbe.timeoutSeconds Timeout seconds for startupProbe
363## @param startupProbe.failureThreshold Failure threshold for startupProbe
364## @param startupProbe.successThreshold Success threshold for startupProbe
369 initialDelaySeconds: 15
373## @param livenessProbe.enabled Enable livenessProbe on haproxy nodes
374## @param livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe
375## @param livenessProbe.periodSeconds Period seconds for livenessProbe
376## @param livenessProbe.timeoutSeconds Timeout seconds for livenessProbe
377## @param livenessProbe.failureThreshold Failure threshold for livenessProbe
378## @param livenessProbe.successThreshold Success threshold for livenessProbe
383 initialDelaySeconds: 15
387## @param readinessProbe.enabled Enable readinessProbe on haproxy nodes
388## @param readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe
389## @param readinessProbe.periodSeconds Period seconds for readinessProbe
390## @param readinessProbe.timeoutSeconds Timeout seconds for readinessProbe
391## @param readinessProbe.failureThreshold Failure threshold for readinessProbe
392## @param readinessProbe.successThreshold Success threshold for readinessProbe
397 initialDelaySeconds: 15
401## @param customStartupProbe Custom startupProbe that overrides the default one
403customStartupProbe: {}
404## @param customLivenessProbe Custom livenessProbe that overrides the default one
406customLivenessProbe: {}
407## @param customReadinessProbe Custom readinessProbe that overrides the default one
409customReadinessProbe: {}
410## haproxy resource requests and limits
411## ref: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
412## @param resourcesPreset Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if resources is set (resources is recommended for production).
414resourcesPreset: "nano"
415## @param resources Set container requests and limits for different resources like CPU or memory (essential for production workloads)
426## Configure Pods Security Context
427## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod
428## @param podSecurityContext.enabled Enabled haproxy pods' Security Context
429## @param podSecurityContext.fsGroupChangePolicy Set filesystem group change policy
430## @param podSecurityContext.sysctls Set kernel settings using the sysctl interface
431## @param podSecurityContext.supplementalGroups Set filesystem extra groups
432## @param podSecurityContext.fsGroup Set haproxy pod's Security Context fsGroup
436 fsGroupChangePolicy: Always
438 supplementalGroups: []
440## Configure Container Security Context
441## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod
442## @param containerSecurityContext.enabled Enabled containers' Security Context
443## @param containerSecurityContext.seLinuxOptions [object,nullable] Set SELinux options in container
444## @param containerSecurityContext.runAsUser Set containers' Security Context runAsUser
445## @param containerSecurityContext.runAsGroup Set containers' Security Context runAsGroup
446## @param containerSecurityContext.runAsNonRoot Set container's Security Context runAsNonRoot
447## @param containerSecurityContext.privileged Set container's Security Context privileged
448## @param containerSecurityContext.readOnlyRootFilesystem Set container's Security Context readOnlyRootFilesystem
449## @param containerSecurityContext.allowPrivilegeEscalation Set container's Security Context allowPrivilegeEscalation
450## @param containerSecurityContext.capabilities.drop List of capabilities to be dropped
451## @param containerSecurityContext.seccompProfile.type Set container's Security Context seccomp profile
453containerSecurityContext:
460 readOnlyRootFilesystem: true
461 allowPrivilegeEscalation: false
464 add: ["NET_BIND_SERVICE"]
466 type: "RuntimeDefault"
467## HAProxy Pod Disruption Budget configuration
468## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/
469## @param pdb.create Enable a Pod Disruption Budget creation
470## @param pdb.minAvailable Minimum number/percentage of pods that should remain scheduled
471## @param pdb.maxUnavailable Maximum number/percentage of pods that may be made unavailable
477## HAProxy Autoscaling configuration
478## ref: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/
479## @param autoscaling.enabled Enable Horizontal POD autoscaling for HAProxy
480## @param autoscaling.minReplicas Minimum number of HAProxy replicas
481## @param autoscaling.maxReplicas Maximum number of HAProxy replicas
482## @param autoscaling.targetCPU Target CPU utilization percentage
483## @param autoscaling.targetMemory Target Memory utilization percentage
491## @param command Override default container command (useful when using custom images)
494## @param args Override default container args (useful when using custom images)
497## @param automountServiceAccountToken Mount Service Account token in pod
499automountServiceAccountToken: false
500## @param hostAliases haproxy pods host aliases
501## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
504## @param podLabels Extra labels for haproxy pods
505## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
508## @param podAnnotations Annotations for haproxy pods
509## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
512## @param podAffinityPreset Pod affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard`
513## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
516## @param podAntiAffinityPreset Pod anti-affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard`
517## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
519podAntiAffinityPreset: soft
520## Node affinity preset
521## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity
524 ## @param nodeAffinityPreset.type Node affinity preset type. Ignored if `affinity` is set. Allowed values: `soft` or `hard`
527 ## @param nodeAffinityPreset.key Node label key to match. Ignored if `affinity` is set
530 ## @param nodeAffinityPreset.values Node label values to match. Ignored if `affinity` is set
537## @param configuration [string] haproxy configuration
538## Taken from haproxytech/haproxy chart: https://github.com/haproxytech/helm-charts/tree/main/haproxy
542 log stdout format raw local0
551 default_backend be_main
553 server web1 10.0.0.1:8080 check
554## @param containerPorts [array] List of container ports to enable in the haproxy container
559## @param existingConfigmap configmap with HAProxy configuration
562## @param affinity Affinity for haproxy pods assignment
563## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
564## NOTE: `podAffinityPreset`, `podAntiAffinityPreset`, and `nodeAffinityPreset` will be ignored when it's set
567## @param nodeSelector Node labels for haproxy pods assignment
568## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/
571## @param tolerations Tolerations for haproxy pods assignment
572## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
575## @param schedulerName Name of the k8s scheduler (other than default)
576## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
579## @param topologySpreadConstraints Topology Spread Constraints for pod assignment
580## https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/
581## The value is evaluated as a template
583topologySpreadConstraints: []
584## @param updateStrategy.type haproxy statefulset strategy type
585## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies
589 ## Can be set to RollingUpdate or OnDelete
592## @param priorityClassName haproxy pods' priorityClassName
595## @param lifecycleHooks for the haproxy container(s) to automate configuration before or after startup
598## @param extraEnvVars Array with extra environment variables to add to haproxy nodes
605## @param extraEnvVarsCM Name of existing ConfigMap containing extra env vars for haproxy nodes
608## @param extraEnvVarsSecret Name of existing Secret containing extra env vars for haproxy nodes
610extraEnvVarsSecret: ""
611## @param extraVolumes Optionally specify extra list of additional volumes for the haproxy pod(s)
614## @param extraVolumeMounts Optionally specify extra list of additional volumeMounts for the haproxy container(s)
617## @param sidecars Add additional sidecar containers to the haproxy pod(s)
620## - name: your-image-name
622## imagePullPolicy: Always
625## containerPort: 1234
628## @param initContainers Add additional init containers to the haproxy pod(s)
629## ref: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
632## - name: your-image-name
634## imagePullPolicy: Always
635## command: ['sh', '-c', 'echo "hello world"']
638## @section Other Parameters
641## ServiceAccount configuration
642## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
643## @param serviceAccount.create Specifies whether a ServiceAccount should be created
644## @param serviceAccount.name Name of the service account to use. If not set and create is true, a name is generated using the fullname template.
645## @param serviceAccount.automountServiceAccountToken Automount service account token for the server service account
646## @param serviceAccount.annotations Annotations for service account. Evaluated as a template. Only used if `create` is `true`.
649 ## @param serviceAccount.create Specifies whether a ServiceAccount should be created
652 ## @param serviceAccount.name The name of the ServiceAccount to use.
653 ## If not set and create is true, a name is generated using the common.names.fullname template
656 automountServiceAccountToken: false
658## @param enableServiceLinks If set to false, disable Kubernetes service links in the pod spec
659## Ref: https://kubernetes.io/docs/tutorials/services/connect-applications-service/#accessing-the-service
661enableServiceLinks: true