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
23 ## - myRegistryKeySecretName
26 ## Security parameters
29 ## @param global.security.allowInsecureImages Allows skipping image verification
30 allowInsecureImages: false
31 ## Compatibility adaptations for Kubernetes platforms
34 ## Compatibility adaptations for Openshift
37 ## @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)
39 adaptSecurityContext: auto
41## @section Common parameters
44## @param kubeVersion Force target Kubernetes version (using Helm capabilities if not set)
47## @param nameOverride String to partially override `kube-state-metrics.name` template with a string (will prepend the release name)
50## @param fullnameOverride String to fully override `kube-state-metrics.fullname` template with a string
53## @param namespaceOverride String to fully override common.names.namespace
56## @param commonLabels Add labels to all the deployed resources
59## @param commonAnnotations Add annotations to all the deployed resources
62## @param extraDeploy Array of extra objects to deploy with the release
65## Enable diagnostic mode in the deployment(s)/statefulset(s)
68 ## @param diagnosticMode.enabled Enable diagnostic mode (all probes will be disabled and the command will be overridden)
71 ## @param diagnosticMode.command Command to override all containers in the the deployment(s)/statefulset(s)
75 ## @param diagnosticMode.args Args to override all containers in the the deployment(s)/statefulset(s)
79## @section kube-state-metrics parameters
82## @param automountServiceAccountToken Mount Service Account token in pod
84automountServiceAccountToken: true
85## @param hostAliases Add deployment host aliases
86## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
90## ref: https://kubernetes.io/docs/admin/authorization/rbac/
93 ## @param rbac.create Whether to create & use RBAC resources or not
96 ## @param rbac.pspEnabled Whether to create a PodSecurityPolicy and bound it with RBAC. WARNING: PodSecurityPolicy is deprecated in Kubernetes v1.21 or later, unavailable in v1.25 or later
99 ## @param rbac.rules Custom RBAC rules to set
111## Service account for kube-state-metrics to use.
112## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
113## @param serviceAccount.create Specifies whether a ServiceAccount should be created
114## @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.
115## @param serviceAccount.automountServiceAccountToken Automount service account token for the server service account
116## @param serviceAccount.annotations Annotations for service account. Evaluated as a template. Only used if `create` is `true`.
121 automountServiceAccountToken: false
123## Iamguarded kube-state-metrics image version
124## ref: https://hub.docker.com/r/iamguarded/kube-state-metrics/tags/
125## @param image.registry [default: REGISTRY_NAME] kube-state-metrics image registry
126## @param image.repository [default: REPOSITORY_NAME/kube-state-metrics] kube-state-metrics image repository
127## @skip image.tag kube-state-metrics image tag (immutable tags are recommended)
128## @param image.digest kube-state-metrics image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag
129## @param image.pullPolicy kube-state-metrics image pull policy
130## @param image.pullSecrets Specify docker-registry secret names as an array
134 repository: chainguard-private/kube-state-metrics-iamguarded
137 ## Specify a imagePullPolicy
138 ## ref: https://kubernetes.io/docs/concepts/containers/images/#pre-pulled-images
140 pullPolicy: IfNotPresent
141 ## Optionally specify an array of imagePullSecrets.
142 ## Secrets must be manually created in the namespace.
143 ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
146 ## - myRegistryKeySecretName
149## @param extraArgs Additional command line arguments to pass to kube-state-metrics
152## metric-labels-allowlist: pods=[*]
154## @param command Override default container command (useful when using custom images)
157## @param args Override default container args (useful when using custom images)
160## @param lifecycleHooks for the kube-state-metrics container(s) to automate configuration before or after startup
163## @param extraEnvVars Array with extra environment variables to add to kube-state-metrics nodes
170## @param extraEnvVarsCM Name of existing ConfigMap containing extra env vars for kube-state-metrics pod(s)
173## @param extraEnvVarsSecret Name of existing Secret containing extra env vars for kube-state-metrics pod(s)
175extraEnvVarsSecret: ""
176## @param extraVolumes Optionally specify extra list of additional volumes for the kube-state-metrics pod(s)
179## @param extraVolumeMounts Optionally specify extra list of additional volumeMounts for the kube-state-metrics container(s)
182## @param sidecars Add additional sidecar containers to the kube-state-metrics pod(s)
185## - name: your-image-name
187## imagePullPolicy: Always
190## containerPort: 1234
193## @param initContainers Add additional init containers to the kube-state-metrics pod(s)
194## ref: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
197## - name: your-image-name
199## imagePullPolicy: Always
200## command: ['sh', '-c', 'echo "hello world"']
203## Pod Disruption Budget configuration
204## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb
205## @param pdb.create Enable/disable a Pod Disruption Budget creation
206## @param pdb.minAvailable Minimum number/percentage of pods that should remain scheduled
207## @param pdb.maxUnavailable Maximum number/percentage of pods that may be made unavailable. Defaults to `1` if both `pdb.minAvailable` and `pdb.maxUnavailable` are empty.
213## @param namespaces Comma-separated list of namespaces to be enabled. Defaults to all namespaces. Evaluated as a template.
216## kube-state-metrics resources to be enabled
217## @param kubeResources.certificatesigningrequests Enable the `certificatesigningrequests` resource
218## @param kubeResources.configmaps Enable the `configmaps` resource
219## @param kubeResources.cronjobs Enable the `cronjobs` resource
220## @param kubeResources.daemonsets Enable the `daemonsets` resource
221## @param kubeResources.deployments Enable the `deployments` resource
222## @param kubeResources.endpoints Enable the `endpoints` resource
223## @param kubeResources.horizontalpodautoscalers Enable the `horizontalpodautoscalers` resource
224## @param kubeResources.ingresses Enable the `ingresses` resource
225## @param kubeResources.jobs Enable the `jobs` resource
226## @param kubeResources.leases Enable the `leases` resource
227## @param kubeResources.limitranges Enable the `limitranges` resource
228## @param kubeResources.mutatingwebhookconfigurations Enable the `mutatingwebhookconfigurations` resource
229## @param kubeResources.namespaces Enable the `namespaces` resource
230## @param kubeResources.networkpolicies Enable the `networkpolicies` resource
231## @param kubeResources.nodes Enable the `nodes` resource
232## @param kubeResources.persistentvolumeclaims Enable the `persistentvolumeclaims` resource
233## @param kubeResources.persistentvolumes Enable the `persistentvolumes` resource
234## @param kubeResources.poddisruptionbudgets Enable the `poddisruptionbudgets` resource
235## @param kubeResources.pods Enable the `pods` resource
236## @param kubeResources.replicasets Enable the `replicasets` resource
237## @param kubeResources.replicationcontrollers Enable the `replicationcontrollers` resource
238## @param kubeResources.resourcequotas Enable the `resourcequotas` resource
239## @param kubeResources.secrets Enable the `secrets` resource
240## @param kubeResources.services Enable the `services` resource
241## @param kubeResources.statefulsets Enable the `statefulsets` resource
242## @param kubeResources.storageclasses Enable the `storageclasses` resource
243## @param kubeResources.validatingwebhookconfigurations Enable the `validatingwebhookconfigurations` resource
244## @param kubeResources.volumeattachments Enable the `volumeattachments` resource
247 certificatesigningrequests: true
253 horizontalpodautoscalers: true
258 mutatingwebhookconfigurations: true
260 networkpolicies: true
262 persistentvolumeclaims: true
263 persistentvolumes: true
264 poddisruptionbudgets: true
267 replicationcontrollers: true
273 validatingwebhookconfigurations: false
274 volumeattachments: true
275## Configure custom resource state metrics
276## ref: https://github.com/kubernetes/kube-state-metrics/blob/main/docs/metrics/extend/customresourcestate-metrics.md
277## @param customResourceState.enabled Enabled custom resource state metrics
278## @param customResourceState.configuration Configuration of the CustomResourceStateMetrics to be added. Evaluated as a template.
283## Configure Pods Security Context
284## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod
285## @param podSecurityContext.enabled Enabled kube-state-metrics pods' Security Context
286## @param podSecurityContext.fsGroupChangePolicy Set filesystem group change policy
287## @param podSecurityContext.sysctls Set kernel settings using the sysctl interface
288## @param podSecurityContext.supplementalGroups Set filesystem extra groups
289## @param podSecurityContext.fsGroup Set kube-state-metrics pod's Security Context fsGroup
293 fsGroupChangePolicy: Always
295 supplementalGroups: []
297## Configure Container Security Context
298## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod
299## @param containerSecurityContext.enabled Enabled containers' Security Context
300## @param containerSecurityContext.seLinuxOptions [object,nullable] Set SELinux options in container
301## @param containerSecurityContext.runAsUser Set containers' Security Context runAsUser
302## @param containerSecurityContext.runAsGroup Set containers' Security Context runAsGroup
303## @param containerSecurityContext.runAsNonRoot Set container's Security Context runAsNonRoot
304## @param containerSecurityContext.privileged Set container's Security Context privileged
305## @param containerSecurityContext.readOnlyRootFilesystem Set container's Security Context readOnlyRootFilesystem
306## @param containerSecurityContext.allowPrivilegeEscalation Set container's Security Context allowPrivilegeEscalation
307## @param containerSecurityContext.capabilities.drop List of capabilities to be dropped
308## @param containerSecurityContext.seccompProfile.type Set container's Security Context seccomp profile
310containerSecurityContext:
317 readOnlyRootFilesystem: true
318 allowPrivilegeEscalation: false
322 type: "RuntimeDefault"
324## @param containerPorts.http HTTP container port
325## @param containerPorts.telemetry Telemetry container port
330## Ref: https://kubernetes.io/docs/concepts/services-networking/network-policies/
333 ## @param networkPolicy.enabled Specifies whether a NetworkPolicy should be created
336 ## @param networkPolicy.kubeAPIServerPorts [array] List of possible endpoints to kube-apiserver (limit to your cluster settings to increase security)
338 kubeAPIServerPorts: [443, 6443, 8443]
339 ## @param networkPolicy.allowExternal Don't require server label for connections
340 ## The Policy model to apply. When set to false, only pods with the correct
341 ## server label will have network access to the ports server is listening
342 ## on. When true, server will accept connections from any source
343 ## (with the correct destination port).
346 ## @param networkPolicy.allowExternalEgress Allow the pod to access any range of port and all destinations.
348 allowExternalEgress: true
349 ## @param networkPolicy.extraIngress [array] Add extra ingress rules to the NetworkPolicy
359 ## - matchExpressions:
365 ## @param networkPolicy.extraEgress [array] Add extra ingress rules to the NetworkPolicy
375 ## - matchExpressions:
382 ## @param networkPolicy.ingressNSMatchLabels [object] Labels to match to allow traffic from other namespaces
383 ## @param networkPolicy.ingressNSPodMatchLabels [object] Pod labels to match to allow traffic from other namespaces
385 ingressNSMatchLabels: {}
386 ingressNSPodMatchLabels: {}
387## kube-state-metrics Service
390 ## @param service.type Kubernetes service type
393 ## @param service.ports.http kube-state-metrics service port
397 ## @param service.nodePorts.http Specify the nodePort value for the LoadBalancer and NodePort service types.
398 ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
404 ## @param service.clusterIP Specific cluster IP when service type is cluster IP. Use `None` for headless service
409 ## @param service.loadBalancerIP `loadBalancerIP` if service type is `LoadBalancer`
410 ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
413 ## @param service.loadBalancerSourceRanges Address that are allowed when svc is `LoadBalancer`
414 ## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
416 ## loadBalancerSourceRanges:
419 loadBalancerSourceRanges: []
420 ## @param service.externalTrafficPolicy kube-state-metrics service external traffic policy
421 ## ref http://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip
423 externalTrafficPolicy: Cluster
424 ## @param service.extraPorts Extra ports to expose (normally used with the `sidecar` value)
427 ## @param service.annotations Additional annotations for kube-state-metrics service
430 ## @param service.labels Additional labels for kube-state-metrics service
433 ## @param service.sessionAffinity Session Affinity for Kubernetes service, can be "None" or "ClientIP"
434 ## If "ClientIP", consecutive client requests will be directed to the same Pod
435 ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
437 sessionAffinity: None
438 ## @param service.sessionAffinityConfig Additional settings for the sessionAffinity
439 ## sessionAffinityConfig:
441 ## timeoutSeconds: 300
443 sessionAffinityConfig: {}
444## @param hostNetwork Enable hostNetwork mode
447## @param priorityClassName Priority class assigned to the Pods
450## @param schedulerName Name of the k8s scheduler (other than default)
451## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
454## @param terminationGracePeriodSeconds In seconds, time the given to the kube-state-metrics pod needs to terminate gracefully
455## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods
457terminationGracePeriodSeconds: ""
458## @param topologySpreadConstraints Topology Spread Constraints for pod assignment
459## https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/
460## The value is evaluated as a template
462topologySpreadConstraints: []
463## Resource requests and limits
464## ref: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
465## choice for the user. This also increases chances charts run on environments with little
466## resources, such as Minikube. If you do want to specify resources, uncomment the following
467## lines, adjust them as necessary, and remove the curly braces after 'resources:'.
468## @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).
469## More information: https://github.com/iamguarded/charts/blob/main/iamguarded/common/templates/_resources.tpl#L15
471resourcesPreset: "micro"
472## @param resources Set container requests and limits for different resources like CPU or memory (essential for production workloads)
483## @param replicaCount Desired number of controller pods
486## @param podLabels Pod labels
487## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
490## @param podAnnotations Pod annotations
491## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
494## @param updateStrategy Allows setting of `RollingUpdate` strategy
495## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies
498## @param minReadySeconds How many seconds a pod needs to be ready before killing the next, during update
501## @param podAffinityPreset Pod affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard`
502## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
505## @param podAntiAffinityPreset Pod anti-affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard`
506## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
508podAntiAffinityPreset: soft
509## Node affinity preset
510## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity
513 ## @param nodeAffinityPreset.type Node affinity preset type. Ignored if `affinity` is set. Allowed values: `soft` or `hard`
516 ## @param nodeAffinityPreset.key Node label key to match. Ignored if `affinity` is set.
518 ## key: "kubernetes.io/e2e-az-name"
521 ## @param nodeAffinityPreset.values Node label values to match. Ignored if `affinity` is set.
528## @param affinity Affinity for pod assignment
529## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
530## Note: podAffinityPreset, podAntiAffinityPreset, and nodeAffinityPreset will be ignored when it's set
533## @param nodeSelector Node labels for pod assignment
534## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/
537## @param tolerations Tolerations for pod assignment
538## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
541## Configure extra options for liveness probe
542## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes
543## @param livenessProbe.enabled Turn on and off liveness probe
544## @param livenessProbe.initialDelaySeconds Delay before liveness probe is initiated
545## @param livenessProbe.periodSeconds How often to perform the probe
546## @param livenessProbe.timeoutSeconds When the probe times out
547## @param livenessProbe.failureThreshold Minimum consecutive failures for the probe
548## @param livenessProbe.successThreshold Minimum consecutive successes for the probe
552 initialDelaySeconds: 120
557## Configure extra options for readiness probe
558## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes
559## @param readinessProbe.enabled Turn on and off readiness probe
560## @param readinessProbe.initialDelaySeconds Delay before readiness probe is initiated
561## @param readinessProbe.periodSeconds How often to perform the probe
562## @param readinessProbe.timeoutSeconds When the probe times out
563## @param readinessProbe.failureThreshold Minimum consecutive failures for the probe
564## @param readinessProbe.successThreshold Minimum consecutive successes for the probe
568 initialDelaySeconds: 30
573## Configure extra options for startup probe
574## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes
575## @param startupProbe.enabled Turn on and off startup probe
576## @param startupProbe.initialDelaySeconds Delay before startup probe is initiated
577## @param startupProbe.periodSeconds How often to perform the probe
578## @param startupProbe.timeoutSeconds When the probe times out
579## @param startupProbe.failureThreshold Minimum consecutive failures for the probe
580## @param startupProbe.successThreshold Minimum consecutive successes for the probe
584 initialDelaySeconds: 30
589## @param customStartupProbe Custom liveness probe for the Web component
591customStartupProbe: {}
592## @param customLivenessProbe Custom liveness probe for the Web component
594customLivenessProbe: {}
595## @param customReadinessProbe Custom readiness probe for the Web component
597customReadinessProbe: {}
598## ServiceMonitor configuration
601 ## @param serviceMonitor.enabled Creates a ServiceMonitor to monitor kube-state-metrics
604 ## @param serviceMonitor.namespace Namespace in which Prometheus is running
606 ## namespace: monitoring
609 ## @param serviceMonitor.jobLabel The name of the label on the target service to use as the job name in prometheus.
612 ## @param serviceMonitor.interval Scrape interval (use by default, falling back to Prometheus' default)
613 ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint
618 ## @param serviceMonitor.scrapeTimeout Timeout after which the scrape is ended
619 ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint
621 ## scrapeTimeout: 10s
624 ## @param serviceMonitor.selector ServiceMonitor selector labels
625 ## ref: https://github.com/iamguarded/charts/tree/main/iamguarded/prometheus-operator#prometheus-configuration
628 ## prometheus: my-prometheus
631 ## @param serviceMonitor.honorLabels Honor metrics labels
632 ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint
634 ## honorLabels: false
637 ## @param serviceMonitor.relabelings ServiceMonitor relabelings
638 ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#relabelconfig
641 ## @param serviceMonitor.metricRelabelings ServiceMonitor metricRelabelings
642 ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#relabelconfig
644 metricRelabelings: []
645 ## @param serviceMonitor.labels Extra labels for the ServiceMonitor
648 ## @param serviceMonitor.extraParameters Any extra parameter to be added to the endpoint configured in the ServiceMonitor
649 ## (e.g. tlsConfig for further customization of the HTTPS behavior)
650 ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#monitoring.coreos.com/v1.Endpoint
653 ## @param serviceMonitor.sampleLimit Per-scrape limit on number of scraped samples that will be accepted.
656## selfMonitor configuration
659 ## @param selfMonitor.enabled Creates a selfMonitor to monitor kube-state-metrics itself
662 ## @param selfMonitor.telemetryNodePort Kube-state-metrics Node Port
664 telemetryNodePort: ""