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.imagePullSecrets Global Docker registry secret names as an array
18## @param global.defaultStorageClass Global default StorageClass for Persistent Volume(s)
19## @param global.storageClass DEPRECATED: use global.defaultStorageClass instead
25 ## - myRegistryKeySecretName
28 defaultStorageClass: ""
30 ## Security parameters
33 ## @param global.security.allowInsecureImages Allows skipping image verification
34 allowInsecureImages: false
35 ## Compatibility adaptations for Kubernetes platforms
38 ## Compatibility adaptations for Openshift
41 ## @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)
43 adaptSecurityContext: auto
45## @section Common parameters
48## @param kubeVersion Override Kubernetes version
51## @param nameOverride String to partially override common.names.fullname
54## @param fullnameOverride String to fully override common.names.fullname
57## @param commonLabels Labels to add to all deployed objects
60## @param commonAnnotations Annotations to add to all deployed objects
63## @param clusterDomain Kubernetes cluster domain name
65clusterDomain: cluster.local
66## @param extraDeploy Array of extra objects to deploy with the release
69## @param deploymentAnnotations Annotations to add to the deployment
71deploymentAnnotations: {}
72## Enable diagnostic mode in the deployment
75 ## @param diagnosticMode.enabled Enable diagnostic mode (all probes will be disabled and the command will be overridden)
78 ## @param diagnosticMode.command Command to override all containers in the deployment
82 ## @param diagnosticMode.args Args to override all containers in the deployment
86## @section Traffic Exposure Parameters
89## haproxy service parameters
92 ## @param service.type haproxy service type
95 ## @param service.ports [array] List of haproxy service ports
102 ## @param service.clusterIP haproxy service Cluster IP
107 ## @param service.loadBalancerIP haproxy service Load Balancer IP
108 ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-loadbalancer
111 ## @param service.loadBalancerSourceRanges haproxy service Load Balancer sources
112 ## ref: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
114 ## loadBalancerSourceRanges:
117 loadBalancerSourceRanges: []
118 ## @param service.externalTrafficPolicy haproxy service external traffic policy
119 ## ref https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip
121 ## @param service.externalIPs [array] External IPs
122 ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#external-ips
125 externalTrafficPolicy: Cluster
126 ## @param service.annotations Additional custom annotations for haproxy service
129 ## @param service.sessionAffinity Session Affinity for Kubernetes service, can be "None" or "ClientIP"
130 ## If "ClientIP", consecutive client requests will be directed to the same mongos Pod
131 ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
133 sessionAffinity: None
134 ## @param service.sessionAffinityConfig Additional settings for the sessionAffinity
135 ## sessionAffinityConfig:
137 ## timeoutSeconds: 300
139 sessionAffinityConfig: {}
140 ## @param service.labels Additional custom labels for haproxy service
143 ## @param service.ipFamilyPolicy IP family policy for the service
144 ## Allowed values: SingleStack, PreferDualStack, RequireDualStack
145 ## ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services
148 ## @param service.ipFamilies IP families for the service
149 ## Allowed values: IPv4, IPv6
150 ## ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services
158## Ref: https://kubernetes.io/docs/concepts/services-networking/network-policies/
161 ## @param networkPolicy.enabled Specifies whether a NetworkPolicy should be created
164 ## @param networkPolicy.allowExternal Don't require server label for connections
165 ## The Policy model to apply. When set to false, only pods with the correct
166 ## server label will have network access to the ports server is listening
167 ## on. When true, server will accept connections from any source
168 ## (with the correct destination port).
171 ## @param networkPolicy.allowExternalEgress Allow the pod to access any range of port and all destinations.
173 allowExternalEgress: true
174 ## @param networkPolicy.extraIngress [array] Add extra ingress rules to the NetworkPolicy
184 ## - matchExpressions:
190 ## @param networkPolicy.extraEgress [array] Add extra ingress rules to the NetworkPolicy
200 ## - matchExpressions:
207 ## @param networkPolicy.ingressNSMatchLabels [object] Labels to match to allow traffic from other namespaces
208 ## @param networkPolicy.ingressNSPodMatchLabels [object] Pod labels to match to allow traffic from other namespaces
210 ingressNSMatchLabels: {}
211 ingressNSPodMatchLabels: {}
212## Configure the ingress resource that allows you to access the haproxy installation
213## ref: https://kubernetes.io/docs/concepts/services-networking/ingress/
216 ## @param ingress.enabled Enable ingress record generation for haproxy
219 ## @param ingress.pathType Ingress path type
221 pathType: ImplementationSpecific
222 ## @param ingress.apiVersion Force Ingress API version (automatically detected if not set)
225 ## @param ingress.hostname Default host for the ingress record
227 hostname: haproxy.local
228 ## @param ingress.path Default path for the ingress record
229 ## NOTE: You may need to set this to '/*' in order to use this with ALB ingress controllers
232 ## @param ingress.annotations Additional annotations for the Ingress resource. To enable certificate autogeneration, place here your cert-manager annotations.
233 ## For a full list of possible ingress annotations, please see
234 ## ref: https://github.com/kubernetes/ingress-nginx/blob/main/docs/user-guide/nginx-configuration/annotations.md
235 ## Use this parameter to set the required annotations for cert-manager, see
236 ## ref: https://cert-manager.io/docs/usage/ingress/#supported-annotations
240 ## kubernetes.io/ingress.class: nginx
241 ## cert-manager.io/cluster-issuer: cluster-issuer-name
244 ## @param ingress.tls Enable TLS configuration for the host defined at `ingress.hostname` parameter
245 ## TLS certificates will be retrieved from a TLS secret with name: `{{- printf "%s-tls" .Values.ingress.hostname }}`
247 ## - Use the `ingress.secrets` parameter to create this TLS secret
248 ## - Rely on cert-manager to create it by setting the corresponding annotations
249 ## - Rely on Helm to create self-signed certificates by setting `ingress.selfSigned=true`
252 ## DEPRECATED: Use ingress.annotations instead of ingress.certManager
253 ## certManager: false
256 ## @param ingress.selfSigned Create a TLS secret for this ingress record using self-signed certificates generated by Helm
259 ## @param ingress.extraHosts An array with additional hostname(s) to be covered with the ingress record
262 ## - name: haproxy.local
266 ## @param ingress.extraPaths An array with additional arbitrary paths that may need to be added to the ingress under the main host
271 ## serviceName: ssl-redirect
272 ## servicePort: use-annotation
275 ## @param ingress.extraTls TLS configuration for additional hostname(s) to be covered with this ingress record
276 ## ref: https://kubernetes.io/docs/concepts/services-networking/ingress/#tls
281 ## secretName: haproxy.local-tls
284 ## @param ingress.secrets Custom TLS certificates as secrets
285 ## NOTE: 'key' and 'certificate' are expected in PEM format
286 ## NOTE: 'name' should line up with a 'secretName' set further up
287 ## 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
288 ## If it is not set and you're NOT using cert-manager either, self-signed certificates will be created valid for 365 days
289 ## It is also possible to create and manage the certificates outside of this helm chart
290 ## Please see README.md for more information
293 ## - name: haproxy.local-tls
295 ## -----BEGIN RSA PRIVATE KEY-----
297 ## -----END RSA PRIVATE KEY-----
299 ## -----BEGIN CERTIFICATE-----
301 ## -----END CERTIFICATE-----
304 ## @param ingress.ingressClassName IngressClass that will be be used to implement the Ingress (Kubernetes 1.18+)
305 ## This is supported in Kubernetes 1.18+ and required if you have more than one IngressClass marked as the default for your cluster .
306 ## ref: https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/
309 ## @param ingress.extraRules Additional rules to be covered with this ingress record
310 ## ref: https://kubernetes.io/docs/concepts/services-networking/ingress/#ingress-rules
313 ## - host: example.local
323## @param terminationGracePeriodSeconds Seconds HAProxy pod needs to terminate gracefully
324## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods
325terminationGracePeriodSeconds: ""
326## @section HAProxy Parameters
328## @param image.registry [default: REGISTRY_NAME] HAProxy image registry
329## @param image.repository [default: REPOSITORY_NAME/haproxy] HAProxy image repository
330## @skip image.tag HAProxy image tag (immutable tags are recommended)
331## @param image.digest HAProxy image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag
332## @param image.pullPolicy HAProxy image pull policy
333## @param image.pullSecrets HAProxy image pull secrets
337 repository: chainguard-private/haproxy-iamguarded
340 ## Specify a imagePullPolicy
341 ## ref: https://kubernetes.io/docs/concepts/containers/images/#pre-pulled-images
343 pullPolicy: IfNotPresent
344 ## Optionally specify an array of imagePullSecrets.
345 ## Secrets must be manually created in the namespace.
346 ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
349 ## - myRegistryKeySecretName
352## @param replicaCount Number of haproxy replicas to deploy
355## Configure extra options for haproxy containers' liveness and readiness probes
356## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes
357## @param startupProbe.enabled Enable startupProbe on haproxy nodes
358## @param startupProbe.initialDelaySeconds Initial delay seconds for startupProbe
359## @param startupProbe.periodSeconds Period seconds for startupProbe
360## @param startupProbe.timeoutSeconds Timeout seconds for startupProbe
361## @param startupProbe.failureThreshold Failure threshold for startupProbe
362## @param startupProbe.successThreshold Success threshold for startupProbe
367 initialDelaySeconds: 15
371## @param livenessProbe.enabled Enable livenessProbe on haproxy nodes
372## @param livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe
373## @param livenessProbe.periodSeconds Period seconds for livenessProbe
374## @param livenessProbe.timeoutSeconds Timeout seconds for livenessProbe
375## @param livenessProbe.failureThreshold Failure threshold for livenessProbe
376## @param livenessProbe.successThreshold Success threshold for livenessProbe
381 initialDelaySeconds: 15
385## @param readinessProbe.enabled Enable readinessProbe on haproxy nodes
386## @param readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe
387## @param readinessProbe.periodSeconds Period seconds for readinessProbe
388## @param readinessProbe.timeoutSeconds Timeout seconds for readinessProbe
389## @param readinessProbe.failureThreshold Failure threshold for readinessProbe
390## @param readinessProbe.successThreshold Success threshold for readinessProbe
395 initialDelaySeconds: 15
399## @param customStartupProbe Custom startupProbe that overrides the default one
401customStartupProbe: {}
402## @param customLivenessProbe Custom livenessProbe that overrides the default one
404customLivenessProbe: {}
405## @param customReadinessProbe Custom readinessProbe that overrides the default one
407customReadinessProbe: {}
408## haproxy resource requests and limits
409## ref: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
410## @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).
412resourcesPreset: "nano"
413## @param resources Set container requests and limits for different resources like CPU or memory (essential for production workloads)
424## Configure Pods Security Context
425## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod
426## @param podSecurityContext.enabled Enabled haproxy pods' Security Context
427## @param podSecurityContext.fsGroupChangePolicy Set filesystem group change policy
428## @param podSecurityContext.sysctls Set kernel settings using the sysctl interface
429## @param podSecurityContext.supplementalGroups Set filesystem extra groups
430## @param podSecurityContext.fsGroup Set haproxy pod's Security Context fsGroup
434 fsGroupChangePolicy: Always
436 supplementalGroups: []
438## Configure Container Security Context
439## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod
440## @param containerSecurityContext.enabled Enabled containers' Security Context
441## @param containerSecurityContext.seLinuxOptions [object,nullable] Set SELinux options in container
442## @param containerSecurityContext.runAsUser Set containers' Security Context runAsUser
443## @param containerSecurityContext.runAsGroup Set containers' Security Context runAsGroup
444## @param containerSecurityContext.runAsNonRoot Set container's Security Context runAsNonRoot
445## @param containerSecurityContext.privileged Set container's Security Context privileged
446## @param containerSecurityContext.readOnlyRootFilesystem Set container's Security Context readOnlyRootFilesystem
447## @param containerSecurityContext.allowPrivilegeEscalation Set container's Security Context allowPrivilegeEscalation
448## @param containerSecurityContext.capabilities.drop List of capabilities to be dropped
449## @param containerSecurityContext.seccompProfile.type Set container's Security Context seccomp profile
451containerSecurityContext:
458 readOnlyRootFilesystem: true
459 allowPrivilegeEscalation: false
462 add: ["NET_BIND_SERVICE"]
464 type: "RuntimeDefault"
465## HAProxy Pod Disruption Budget configuration
466## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/
467## @param pdb.create Enable a Pod Disruption Budget creation
468## @param pdb.minAvailable Minimum number/percentage of pods that should remain scheduled
469## @param pdb.maxUnavailable Maximum number/percentage of pods that may be made unavailable
475## HAProxy Autoscaling configuration
476## ref: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/
477## @param autoscaling.enabled Enable Horizontal POD autoscaling for HAProxy
478## @param autoscaling.minReplicas Minimum number of HAProxy replicas
479## @param autoscaling.maxReplicas Maximum number of HAProxy replicas
480## @param autoscaling.targetCPU Target CPU utilization percentage
481## @param autoscaling.targetMemory Target Memory utilization percentage
489## @param command Override default container command (useful when using custom images)
492## @param args Override default container args (useful when using custom images)
495## @param automountServiceAccountToken Mount Service Account token in pod
497automountServiceAccountToken: false
498## @param hostAliases haproxy pods host aliases
499## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
502## @param podLabels Extra labels for haproxy pods
503## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
506## @param podAnnotations Annotations for haproxy pods
507## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
510## @param podAffinityPreset Pod affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard`
511## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
514## @param podAntiAffinityPreset Pod anti-affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard`
515## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
517podAntiAffinityPreset: soft
518## Node affinity preset
519## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity
522 ## @param nodeAffinityPreset.type Node affinity preset type. Ignored if `affinity` is set. Allowed values: `soft` or `hard`
525 ## @param nodeAffinityPreset.key Node label key to match. Ignored if `affinity` is set
528 ## @param nodeAffinityPreset.values Node label values to match. Ignored if `affinity` is set
535## @param configuration [string] haproxy configuration
536## Taken from haproxytech/haproxy chart: https://github.com/haproxytech/helm-charts/tree/main/haproxy
540 log stdout format raw local0
549 default_backend be_main
551 server web1 10.0.0.1:8080 check
552## @param containerPorts [array] List of container ports to enable in the haproxy container
557## @param existingConfigmap configmap with HAProxy configuration
560## @param affinity Affinity for haproxy pods assignment
561## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
562## NOTE: `podAffinityPreset`, `podAntiAffinityPreset`, and `nodeAffinityPreset` will be ignored when it's set
565## @param nodeSelector Node labels for haproxy pods assignment
566## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/
569## @param tolerations Tolerations for haproxy pods assignment
570## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
573## @param schedulerName Name of the k8s scheduler (other than default)
574## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
577## @param topologySpreadConstraints Topology Spread Constraints for pod assignment
578## https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/
579## The value is evaluated as a template
581topologySpreadConstraints: []
582## @param updateStrategy.type haproxy statefulset strategy type
583## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies
587 ## Can be set to RollingUpdate or OnDelete
590## @param priorityClassName haproxy pods' priorityClassName
593## @param lifecycleHooks for the haproxy container(s) to automate configuration before or after startup
596## @param extraEnvVars Array with extra environment variables to add to haproxy nodes
603## @param extraEnvVarsCM Name of existing ConfigMap containing extra env vars for haproxy nodes
606## @param extraEnvVarsSecret Name of existing Secret containing extra env vars for haproxy nodes
608extraEnvVarsSecret: ""
609## @param extraVolumes Optionally specify extra list of additional volumes for the haproxy pod(s)
612## @param extraVolumeMounts Optionally specify extra list of additional volumeMounts for the haproxy container(s)
615## @param sidecars Add additional sidecar containers to the haproxy pod(s)
618## - name: your-image-name
620## imagePullPolicy: Always
623## containerPort: 1234
626## @param initContainers Add additional init containers to the haproxy pod(s)
627## ref: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
630## - name: your-image-name
632## imagePullPolicy: Always
633## command: ['sh', '-c', 'echo "hello world"']
636## @section Other Parameters
639## ServiceAccount configuration
640## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
641## @param serviceAccount.create Specifies whether a ServiceAccount should be created
642## @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.
643## @param serviceAccount.automountServiceAccountToken Automount service account token for the server service account
644## @param serviceAccount.annotations Annotations for service account. Evaluated as a template. Only used if `create` is `true`.
647 ## @param serviceAccount.create Specifies whether a ServiceAccount should be created
650 ## @param serviceAccount.name The name of the ServiceAccount to use.
651 ## If not set and create is true, a name is generated using the common.names.fullname template
654 automountServiceAccountToken: false
656## @param enableServiceLinks If set to false, disable Kubernetes service links in the pod spec
657## Ref: https://kubernetes.io/docs/tutorials/services/connect-applications-service/#accessing-the-service
659enableServiceLinks: true