# Copyright VMware, Inc.
# SPDX-License-Identifier: APACHE-2.0

## @section Global parameters
## 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, imagePullSecrets and storageClass
##

## @param global.imageRegistry Global Docker image registry
## @param global.imagePullSecrets Global Docker registry secret names as an array
## @param global.storageClass Global StorageClass for Persistent Volume(s)
##
global:
  imageRegistry: ""
  ## E.g.
  ## imagePullSecrets:
  ##   - myRegistryKeySecretName
  ##
  imagePullSecrets: []
  storageClass: ""

## @section Common parameters
##

## @param kubeVersion Override Kubernetes version
##
kubeVersion: ""
## @param nameOverride String to partially override common.names.name
##
nameOverride: ""
## @param fullnameOverride String to fully override common.names.fullname
##
fullnameOverride: ""
## @param namespaceOverride String to fully override common.names.namespace
##
namespaceOverride: ""
## @param commonLabels Labels to add to all deployed objects
##
commonLabels: {}
## @param commonAnnotations Annotations to add to all deployed objects
##
commonAnnotations: {}
## @param clusterDomain Kubernetes cluster domain name
##
clusterDomain: cluster.local
## @param extraDeploy Array of extra objects to deploy with the release
##
extraDeploy: []

## Enable diagnostic mode in the deployment
##
diagnosticMode:
  ## @param diagnosticMode.enabled Enable diagnostic mode (all probes will be disabled and the command will be overridden)
  ##
  enabled: false
  ## @param diagnosticMode.command Command to override all containers in the deployment
  ##
  command:
    - sleep
  ## @param diagnosticMode.args Args to override all containers in the deployment
  ##
  args:
    - infinity


## @section Vault Server Parameters
##
server:
  ## @param server.enabled Enable Vault Server
  ##
  enabled: true
  ## Bitnami Vault Server image
  ## ref: https://hub.docker.com/r/bitnami/vault/tags/
  ## @param server.image.registry [default: REGISTRY_NAME] Vault Server image registry
  ## @param server.image.repository [default: REPOSITORY_NAME/vault] Vault Server image repository
  ## @skip server.image.tag Vault Server image tag (immutable tags are recommended)
  ## @param server.image.digest Vault Server image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag image tag (immutable tags are recommended)
  ## @param server.image.pullPolicy Vault Server image pull policy
  ## @param server.image.pullSecrets Vault Server image pull secrets
  ## @param server.image.debug Enable Vault Server image debug mode
  ##
  image:
    registry: docker.io
    repository: bitnami/vault
    tag: 1.15.4-debian-11-r0
    digest: ""
    ## 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/
    ## e.g:
    ## pullSecrets:
    ##   - myRegistryKeySecretName
    ##
    pullSecrets: []
    ## Enable debug mode
    ##
    debug: false
  ## @param server.replicaCount Number of Vault Server replicas to deploy
  ##
  replicaCount: 1
  ## @param server.podManagementPolicy Pod management policy
  ## Should be initialized one by one when building the replicaset for the first time
  ##
  podManagementPolicy: Parallel
  ## @param server.containerPorts.http Vault Server http container port
  ## @param server.containerPorts.internal Vault Server internal (HTTPS) container port
  ##
  containerPorts:
    http: 8200
    internal: 8201
  ## Configure extra options for Vault Server containers' liveness and readiness probes
  ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes
  ## @param server.livenessProbe.enabled Enable livenessProbe on Vault Server containers
  ## @param server.livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe
  ## @param server.livenessProbe.periodSeconds Period seconds for livenessProbe
  ## @param server.livenessProbe.timeoutSeconds Timeout seconds for livenessProbe
  ## @param server.livenessProbe.failureThreshold Failure threshold for livenessProbe
  ## @param server.livenessProbe.successThreshold Success threshold for livenessProbe
  ##
  livenessProbe:
    # As the user needs to manually unseal the server, we don't want Vault to restart
    enabled: false
    initialDelaySeconds: 5
    periodSeconds: 10
    timeoutSeconds: 5
    failureThreshold: 5
    successThreshold: 1
  ## @param server.readinessProbe.enabled Enable readinessProbe on Vault Server containers
  ## @param server.readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe
  ## @param server.readinessProbe.periodSeconds Period seconds for readinessProbe
  ## @param server.readinessProbe.timeoutSeconds Timeout seconds for readinessProbe
  ## @param server.readinessProbe.failureThreshold Failure threshold for readinessProbe
  ## @param server.readinessProbe.successThreshold Success threshold for readinessProbe
  ##
  readinessProbe:
    enabled: true
    initialDelaySeconds: 5
    periodSeconds: 10
    timeoutSeconds: 5
    failureThreshold: 5
    successThreshold: 1
  ## @param server.startupProbe.enabled Enable startupProbe on Vault Server containers
  ## @param server.startupProbe.initialDelaySeconds Initial delay seconds for startupProbe
  ## @param server.startupProbe.periodSeconds Period seconds for startupProbe
  ## @param server.startupProbe.timeoutSeconds Timeout seconds for startupProbe
  ## @param server.startupProbe.failureThreshold Failure threshold for startupProbe
  ## @param server.startupProbe.successThreshold Success threshold for startupProbe
  ##
  startupProbe:
    enabled: false
    initialDelaySeconds: 5
    periodSeconds: 10
    timeoutSeconds: 5
    failureThreshold: 5
    successThreshold: 1
  ## @param server.customLivenessProbe Custom livenessProbe that overrides the default one
  ##
  customLivenessProbe: {}
  ## @param server.customReadinessProbe Custom readinessProbe that overrides the default one
  ##
  customReadinessProbe: {}
  ## @param server.customStartupProbe Custom startupProbe that overrides the default one
  ##
  customStartupProbe: {}
  ## Vault Server resource requests and limits
  ## ref: http://kubernetes.io/docs/user-guide/compute-resources/
  ## @param server.resources.limits The resources limits for the Vault Server containers
  ## @param server.resources.requests The requested resources for the Vault Server containers
  ##
  resources:
    limits: {}
    requests: {}
  ## Configure Pods Security Context
  ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod
  ## @param server.podSecurityContext.enabled Enabled Vault Server pods' Security Context
  ## @param server.podSecurityContext.fsGroup Set Vault Server pod's Security Context fsGroup
  ##
  podSecurityContext:
    enabled: true
    fsGroup: 1001
  ## Configure Container Security Context
  ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
  ## @param server.containerSecurityContext.enabled Enabled containers' Security Context
  ## @param server.containerSecurityContext.runAsUser Set containers' Security Context runAsUser
  ## @param server.containerSecurityContext.runAsNonRoot Set container's Security Context runAsNonRoot
  ## @param server.containerSecurityContext.privileged Set container's Security Context privileged
  ## @param server.containerSecurityContext.readOnlyRootFilesystem Set container's Security Context readOnlyRootFilesystem
  ## @param server.containerSecurityContext.allowPrivilegeEscalation Set container's Security Context allowPrivilegeEscalation
  ## @param server.containerSecurityContext.capabilities.drop List of capabilities to be dropped
  ## @param server.containerSecurityContext.seccompProfile.type Set container's Security Context seccomp profile
  ##
  containerSecurityContext:
    enabled: true
    runAsUser: 1001
    runAsNonRoot: true
    privileged: false
    readOnlyRootFilesystem: true
    allowPrivilegeEscalation: false
    capabilities:
      drop: ["ALL"]
    seccompProfile:
      type: "RuntimeDefault"

  ## @param server.command Override default container command (useful when using custom images)
  ##
  command: []
  ## @param server.args Override default container args (useful when using custom images)
  ##
  args: []
  ## @param server.hostAliases Vault Server pods host aliases
  ## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
  ##
  hostAliases: []
  ## @param server.config [string] Vault server configuration (evaluated as a template)
  ##
  config: |
    disable_mlock = true
    ui = true
    listener "tcp" {
      tls_disable = 1
      address = "[::]:{{ .Values.server.containerPorts.http }}"
      cluster_address = "[::]:{{ .Values.server.containerPorts.internal }}"
      {{- if .Values.server.metrics.enabled }}
      # Enable unauthenticated metrics access (necessary for Prometheus Operator)
      telemetry {
        unauthenticated_metrics_access = "true"
      }
      {{- end }}
    }
    storage "raft" {
      path = "{{ .Values.server.persistence.mountPath }}"
    }

    service_registration "kubernetes" {}

  ## @param server.existingConfigMap name of a ConfigMap with existing configuration for the server
  ##
  existingConfigMap: ""

  ## @param server.podLabels Extra labels for Vault Server pods
  ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
  ##
  podLabels: {}
  ## @param server.podAnnotations Annotations for Vault Server pods
  ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
  ##
  podAnnotations: {}
  ## @param server.podAffinityPreset Pod affinity preset. Ignored if `server.affinity` is set. Allowed values: `soft` or `hard`
  ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
  ##
  podAffinityPreset: ""
  ## @param server.podAntiAffinityPreset Pod anti-affinity preset. Ignored if `server.affinity` is set. Allowed values: `soft` or `hard`
  ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
  ##
  podAntiAffinityPreset: soft
  ## Pod Disruption Budget configuration
  ## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb
  ## @param server.pdb.create Enable/disable a Pod Disruption Budget creation
  ## @param server.pdb.minAvailable Minimum number/percentage of pods that should remain scheduled
  ## @param server.pdb.maxUnavailable Maximum number/percentage of pods that may be made unavailable
  ##
  pdb:
    create: false
    minAvailable: 1
    maxUnavailable: ""
  ## Node server.affinity preset
  ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity
  ##
  nodeAffinityPreset:
    ## @param server.nodeAffinityPreset.type Node affinity preset type. Ignored if `server.affinity` is set. Allowed values: `soft` or `hard`
    ##
    type: ""
    ## @param server.nodeAffinityPreset.key Node label key to match. Ignored if `server.affinity` is set
    ##
    key: ""
    ## @param server.nodeAffinityPreset.values Node label values to match. Ignored if `server.affinity` is set
    ## E.g.
    ## values:
    ##   - e2e-az1
    ##   - e2e-az2
    ##
    values: []
  ## @param server.affinity Affinity for Vault Server pods assignment
  ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
  ## NOTE: `server.podAffinityPreset`, `server.podAntiAffinityPreset`, and `server.nodeAffinityPreset` will be ignored when it's set
  ##
  affinity: {}
  ## @param server.nodeSelector Node labels for Vault Server pods assignment
  ## ref: https://kubernetes.io/docs/user-guide/node-selection/
  ##
  nodeSelector: {}
  ## @param server.tolerations Tolerations for Vault Server pods assignment
  ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
  ##
  tolerations: []
  ## @param server.updateStrategy.type Vault Server statefulset strategy type
  ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies
  ##
  updateStrategy:
    ## StrategyType
    ## Can be set to RollingUpdate or OnDelete
    ##
    type: RollingUpdate

  ## @param server.priorityClassName Vault Server pods' priorityClassName
  ##
  priorityClassName: ""
  ## @param server.topologySpreadConstraints Topology Spread Constraints for pod assignment spread across your cluster among failure-domains. Evaluated as a template
  ## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/#spread-constraints-for-pods
  ##
  topologySpreadConstraints: []
  ## @param server.schedulerName Name of the k8s scheduler (other than default) for Vault Server pods
  ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
  ##
  schedulerName: ""
  ## @param server.terminationGracePeriodSeconds Seconds Redmine pod needs to terminate gracefully
  ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods
  ##
  terminationGracePeriodSeconds: ""
  ## @param server.lifecycleHooks for the Vault Server container(s) to automate configuration before or after startup
  ##
  lifecycleHooks: {}
  ## @param server.extraEnvVars Array with extra environment variables to add to Vault Server nodes
  ## e.g:
  ## extraEnvVars:
  ##   - name: FOO
  ##     value: "bar"
  ##
  extraEnvVars: []
  ## @param server.extraEnvVarsCM Name of existing ConfigMap containing extra env vars for Vault Server nodes
  ##
  extraEnvVarsCM: ""
  ## @param server.extraEnvVarsSecret Name of existing Secret containing extra env vars for Vault Server nodes
  ##
  extraEnvVarsSecret: ""
  ## @param server.extraVolumes Optionally specify extra list of additional volumes for the Vault Server pod(s)
  ##
  extraVolumes: []
  ## @param server.extraVolumeMounts Optionally specify extra list of additional volumeMounts for the Vault Server container(s)
  ##
  extraVolumeMounts: []
  ## @param server.sidecars Add additional sidecar containers to the Vault Server pod(s)
  ## e.g:
  ## sidecars:
  ##   - name: your-image-name
  ##     image: your-image
  ##     imagePullPolicy: Always
  ##     ports:
  ##       - name: portname
  ##         containerPort: 1234
  ##
  sidecars: []
  ## @param server.initContainers Add additional init containers to the Vault Server pod(s)
  ## ref: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
  ## e.g:
  ## initContainers:
  ##  - name: your-image-name
  ##    image: your-image
  ##    imagePullPolicy: Always
  ##    command: ['sh', '-c', 'echo "hello world"']
  ##
  initContainers: []

  ## @section Vault Server Traffic Exposure Parameters
  ##
  service:
    general:
      ## @param server.service.general.type Vault Server service type
      ##
      type: ClusterIP
      ## @param server.service.general.ports.http Vault Server service HTTP port
      ## @param server.service.general.ports.internal Vault Server internal port
      ##
      ports:
        http: 8200
        internal: 8201
      ## Node ports to expose
      ## @param server.service.general.nodePorts.http Node port for HTTP
      ## @param server.service.general.nodePorts.internal Node port for HTTP
      ## NOTE: choose port between <30000-32767>
      ##
      nodePorts:
        http: ""
        internal: ""
      ## @param server.service.general.clusterIP Vault Server service Cluster IP
      ## e.g.:
      ## clusterIP: None
      ##
      clusterIP: ""
      ## @param server.service.general.loadBalancerIP Vault Server service Load Balancer IP
      ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-loadbalancer
      ##
      loadBalancerIP: ""
      ## @param server.service.general.loadBalancerSourceRanges Vault Server service Load Balancer sources
      ## ref: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
      ## e.g:
      ## loadBalancerSourceRanges:
      ##   - 10.10.10.0/24
      ##
      loadBalancerSourceRanges: []
      ## @param server.service.general.externalTrafficPolicy Vault Server service external traffic policy
      ## ref http://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-web-source-ip
      ##
      externalTrafficPolicy: Cluster
      ## @param server.service.general.annotations Additional custom annotations for Vault Server service
      ##
      annotations: {}
      ## @param server.service.general.extraPorts Extra ports to expose in Vault Server service (normally used with the `sidecars` value)
      ##
      extraPorts: []
      ## @param server.service.general.sessionAffinity Control where web requests go, to the same pod or round-robin
      ## Values: WebIP or None
      ## ref: https://kubernetes.io/docs/user-guide/services/
      ##
      sessionAffinity: None
      ## @param server.service.general.sessionAffinityConfig Additional settings for the sessionAffinity
      ## sessionAffinityConfig:
      ##   webIP:
      ##     timeoutSeconds: 300
      ##
      sessionAffinityConfig: {}
    active:
      ## @param server.service.active.type Vault Server service type
      ##
      type: ClusterIP
      ## @param server.service.active.ports.http Vault Server service HTTP port
      ## @param server.service.active.ports.internal Vault Server internal port
      ##
      ports:
        http: 8200
        internal: 8201
      ## Node ports to expose
      ## @param server.service.active.nodePorts.http Node port for HTTP
      ## @param server.service.active.nodePorts.internal Node port for HTTP
      ## NOTE: choose port between <30000-32767>
      ##
      nodePorts:
        http: ""
        internal: ""
      ## @param server.service.active.clusterIP Vault Server service Cluster IP
      ## e.g.:
      ## clusterIP: None
      ##
      clusterIP: ""
      ## @param server.service.active.loadBalancerIP Vault Server service Load Balancer IP
      ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-loadbalancer
      ##
      loadBalancerIP: ""
      ## @param server.service.active.loadBalancerSourceRanges Vault Server service Load Balancer sources
      ## ref: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
      ## e.g:
      ## loadBalancerSourceRanges:
      ##   - 10.10.10.0/24
      ##
      loadBalancerSourceRanges: []
      ## @param server.service.active.externalTrafficPolicy Vault Server service external traffic policy
      ## ref http://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-web-source-ip
      ##
      externalTrafficPolicy: Cluster
      ## @param server.service.active.annotations Additional custom annotations for Vault Server service
      ##
      annotations: {}
      ## @param server.service.active.extraPorts Extra ports to expose in Vault Server service (normally used with the `sidecars` value)
      ##
      extraPorts: []
      ## @param server.service.active.sessionAffinity Control where web requests go, to the same pod or round-robin
      ## Values: WebIP or None
      ## ref: https://kubernetes.io/docs/user-guide/services/
      ##
      sessionAffinity: None
      ## @param server.service.active.sessionAffinityConfig Additional settings for the sessionAffinity
      ## sessionAffinityConfig:
      ##   webIP:
      ##     timeoutSeconds: 300
      ##
      sessionAffinityConfig: {}

  ## ref: http://kubernetes.io/docs/user-guide/ingress/
  ##
  ingress:
    ## @param server.ingress.enabled Enable ingress record generation for Vault
    ##
    enabled: false
    ## @param server.ingress.pathType Ingress path type
    ##
    pathType: ImplementationSpecific
    ## @param server.ingress.apiVersion Force Ingress API version (automatically detected if not set)
    ##
    apiVersion: ""
    ## @param server.ingress.hostname Default host for the ingress record
    ##
    hostname: vault.local
    ## @param server.ingress.ingressClassName IngressClass that will be be used to implement the Ingress (Kubernetes 1.18+)
    ## This is supported in Kubernetes 1.18+ and required if you have more than one IngressClass marked as the default for your cluster .
    ## ref: https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/
    ##
    ingressClassName: ""
    ## @param server.ingress.path Default path for the ingress record
    ## NOTE: You may need to set this to '/*' in order to use this with ALB ingress controllers
    ##
    path: /
    ## @param server.ingress.annotations Additional annotations for the Ingress resource. To enable certificate autogeneration, place here your cert-manager annotations.
    ## Use this parameter to set the required annotations for cert-manager, see
    ## ref: https://cert-manager.io/docs/usage/ingress/#supported-annotations
    ## e.g:
    ## annotations:
    ##   kubernetes.io/ingress.class: nginx
    ##   cert-manager.io/cluster-issuer: cluster-issuer-name
    ##
    annotations: {}
    ## @param server.ingress.tls Enable TLS configuration for the host defined at `client.ingress.hostname` parameter
    ## TLS certificates will be retrieved from a TLS secret with name: `{{- printf "%s-tls" .Values.ingress.hostname }}`
    ## You can:
    ##   - Use the `client.ingress.secrets` parameter to create this TLS secret
    ##   - Rely on cert-manager to create it by setting the corresponding annotations
    ##   - Rely on Helm to create self-signed certificates by setting `client.ingress.selfSigned=true`
    ##
    tls: false
    ## @param server.ingress.selfSigned Create a TLS secret for this ingress record using self-signed certificates generated by Helm
    ##
    selfSigned: false
    ## @param server.ingress.extraHosts An array with additional hostname(s) to be covered with the ingress record
    ## e.g:
    ## extraHosts:
    ##   - name: vault.local
    ##     path: /
    ##
    extraHosts: []
    ## @param server.ingress.extraPaths An array with additional arbitrary paths that may need to be added to the ingress under the main host
    ## e.g:
    ## extraPaths:
    ## - path: /*
    ##   backend:
    ##     serviceName: ssl-redirect
    ##     servicePort: use-annotation
    ##
    extraPaths: []
    ## @param server.ingress.extraTls TLS configuration for additional hostname(s) to be covered with this ingress record
    ## ref: https://kubernetes.io/docs/concepts/services-networking/ingress/#tls
    ## e.g:
    ## extraTls:
    ## - hosts:
    ##     - vault.local
    ##   secretName: vault.local-tls
    ##
    extraTls: []
    ## @param server.ingress.secrets Custom TLS certificates as secrets
    ## NOTE: 'key' and 'certificate' are expected in PEM format
    ## NOTE: 'name' should line up with a 'secretName' set further up
    ## 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
    ## If it is not set and you're NOT using cert-manager either, self-signed certificates will be created valid for 365 days
    ## It is also possible to create and manage the certificates outside of this helm chart
    ## Please see README.md for more information
    ## e.g:
    ## secrets:
    ##   - name: vault.local-tls
    ##     key: |-
    ##       -----BEGIN RSA PRIVATE KEY-----
    ##       ...
    ##       -----END RSA PRIVATE KEY-----
    ##     certificate: |-
    ##       -----BEGIN CERTIFICATE-----
    ##       ...
    ##       -----END CERTIFICATE-----
    ##
    secrets: []
    ## @param server.ingress.extraRules Additional rules to be covered with this ingress record
    ## ref: https://kubernetes.io/docs/concepts/services-networking/ingress/#ingress-rules
    ## e.g:
    ## extraRules:
    ## - host: example.local
    ##     http:
    ##       path: /
    ##       backend:
    ##         service:
    ##           name: example-svc
    ##           port:
    ##             name: http
    ##
    extraRules: []



  ## @section Vault Server RBAC Parameters
  ##

  ## RBAC configuration
  ##
  rbac:
    ## @param server.rbac.create Specifies whether RBAC resources should be created
    ##
    create: true

  ## ServiceAccount configuration
  ##
  serviceAccount:
    ## @param server.serviceAccount.create Specifies whether a ServiceAccount should be created
    ##
    create: true
    ## @param server.serviceAccount.name The name of the ServiceAccount to use.
    ## If not set and create is true, a name is generated using the common.names.fullname template
    ##
    name: ""
    ## @param server.serviceAccount.annotations Additional Service Account annotations (evaluated as a template)
    ##
    annotations: {}
    ## @param server.serviceAccount.automountServiceAccountToken Automount service account token for the server service account
    ##
    automountServiceAccountToken: true

  ## @section Source Conttroller Persistence Parameters
  ## ref: https://kubernetes.io/docs/user-guide/persistent-volumes/
  ##
  persistence:
    ## @param server.persistence.enabled Enable persistence using Persistent Volume Claims
    ##
    enabled: true
    ## @param server.persistence.mountPath Persistent Volume mount root path
    ##
    mountPath: /bitnami/vault/data
    ## @param server.persistence.storageClass Persistent Volume storage class
    ## If defined, storageClassName: <storageClass>
    ## If set to "-", storageClassName: "", which disables dynamic provisioning
    ## If undefined (the default) or set to null, no storageClassName spec is set, choosing the default provisioner
    ##
    storageClass: ""
    ## @param server.persistence.accessModes [array] Persistent Volume access modes
    ##
    accessModes:
      - ReadWriteOnce
    ## @param server.persistence.size Persistent Volume size
    ##
    size: 10Gi
    ## @param server.persistence.dataSource Custom PVC data source
    ##
    dataSource: {}
    ## @param server.persistence.annotations Annotations for the PVC
    ##
    annotations: {}
    ## @param server.persistence.selector Selector to match an existing Persistent Volume (this value is evaluated as a template)
    ## selector:
    ##   matchLabels:
    ##     app: my-app
    ##
    selector: {}
    ## @param server.persistence.existingClaim The name of an existing PVC to use for persistence
    ##
    existingClaim: ""


  ## @section Vault Server Metrics Parameters
  ##

  ## Prometheus metrics
  ##
  metrics:
    ## @param server.metrics.enabled Enable the export of Prometheus metrics
    ##
    enabled: false
    ## @param server.metrics.annotations [object] Annotations for the server service in order to scrape metrics
    annotations:
      prometheus.io/scrape: "true"
      prometheus.io/port: "{{ .Values.server.service.general.ports.http }}"
    ## Prometheus Operator ServiceMonitor configuration
    ##
    serviceMonitor:
      ## @param server.metrics.serviceMonitor.enabled if `true`, creates a Prometheus Operator ServiceMonitor (also requires `metrics.enabled` to be `true`)
      ##
      enabled: false
      ## @param server.metrics.serviceMonitor.namespace Namespace in which Prometheus is running
      ##
      namespace: ""
      ## @param server.metrics.serviceMonitor.annotations Additional custom annotations for the ServiceMonitor
      ##
      annotations: {}
      ## @param server.metrics.serviceMonitor.labels Extra labels for the ServiceMonitor
      ##
      labels: {}
      ## @param server.metrics.serviceMonitor.jobLabel The name of the label on the target service to use as the job name in Prometheus
      ##
      jobLabel: ""
      ## @param server.metrics.serviceMonitor.honorLabels honorLabels chooses the metric's labels on collisions with target labels
      ##
      honorLabels: false
      ## @param server.metrics.serviceMonitor.interval Interval at which metrics should be scraped.
      ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint
      ## e.g:
      ## interval: 10s
      ##
      interval: ""
      ## @param server.metrics.serviceMonitor.scrapeTimeout Timeout after which the scrape is ended
      ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint
      ## e.g:
      ## scrapeTimeout: 10s
      ##
      scrapeTimeout: ""
      ## @param server.metrics.serviceMonitor.metricRelabelings Specify additional relabeling of metrics
      ##
      metricRelabelings: []
      ## @param server.metrics.serviceMonitor.relabelings Specify general relabeling
      ##
      relabelings: []
      ## @param server.metrics.serviceMonitor.selector Prometheus instance selector labels
      ## ref: https://github.com/bitnami/charts/tree/main/bitnami/prometheus-operator#prometheus-configuration
      ## selector:
      ##   prometheus: my-prometheus
      ##
      selector: {}


## @section Vault CSI Provider Parameters
##
csiProvider:
  ## @param csiProvider.enabled Enable Vault CSI Provider
  ## (NOTE: This is disabled in upstream Vault chart because it requires plugins in the K8s cluster)
  ##
  enabled: false
  ## Bitnami Vault CSI Provider image
  ## ref: https://hub.docker.com/r/bitnami/vault-csi-provider/tags/
  ## @param csiProvider.image.registry [default: REGISTRY_NAME] Vault CSI Provider image registry
  ## @param csiProvider.image.repository [default: REPOSITORY_NAME/vault-csi-provider] Vault CSI Provider image repository
  ## @skip csiProvider.image.tag Vault CSI Provider image tag (immutable tags are recommended)
  ## @param csiProvider.image.digest Vault CSI Provider image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag image tag (immutable tags are recommended)
  ## @param csiProvider.image.pullPolicy Vault CSI Provider image pull policy
  ## @param csiProvider.image.pullSecrets Vault CSI Provider image pull secrets
  ## @param csiProvider.image.debug Enable Vault CSI Provider image debug mode
  ##
  image:
    registry: docker.io
    repository: bitnami/vault-csi-provider
    tag: 1.4.1-debian-11-r3
    digest: ""
    ## 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/
    ## e.g:
    ## pullSecrets:
    ##   - myRegistryKeySecretName
    ##
    pullSecrets: []
    ## Enable debug mode
    ##
    debug: false

  ## @param csiProvider.config [string] Vault CSI Provider configuration (evaluated as a template)
  ##
  config: |
    vault {
        "address" = "http://{{ include "vault.server.fullname" . }}:{{ .Values.server.service.general.ports.http }}
    }

    cache {}

    listener "unix" {
        address = "/var/run/vault/agent.sock"
        tls_disable = true
    }

  ## @param csiProvider.existingConfigMap name of a ConfigMap with existing configuration for the CSI Provider
  ##
  existingConfigMap: ""

  ## @param csiProvider.secretStoreHostPath Path to the host CSI Provider folder
  ##
  secretStoreHostPath: "/etc/kubernetes/secrets-store-csi-providers"

  ## @param csiProvider.hostAliases Vault CSI Provider pods host aliases
  ## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
  ##
  hostAliases: []
  ## @param csiProvider.podLabels Extra labels for Vault CSI Provider pods
  ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
  ##
  podLabels: {}
  ## @param csiProvider.podAnnotations Annotations for Vault CSI Provider pods
  ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
  ##
  podAnnotations: {}
  ## @param csiProvider.podAffinityPreset Pod affinity preset. Ignored if `csiProvider.affinity` is set. Allowed values: `soft` or `hard`
  ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
  ##
  podAffinityPreset: ""
  ## @param csiProvider.podAntiAffinityPreset Pod anti-affinity preset. Ignored if `csiProvider.affinity` is set. Allowed values: `soft` or `hard`
  ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
  ##
  podAntiAffinityPreset: soft
  ## Node csiProvider.affinity preset
  ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity
  ##
  nodeAffinityPreset:
    ## @param csiProvider.nodeAffinityPreset.type Node affinity preset type. Ignored if `csiProvider.affinity` is set. Allowed values: `soft` or `hard`
    ##
    type: ""
    ## @param csiProvider.nodeAffinityPreset.key Node label key to match. Ignored if `csiProvider.affinity` is set
    ##
    key: ""
    ## @param csiProvider.nodeAffinityPreset.values Node label values to match. Ignored if `csiProvider.affinity` is set
    ## E.g.
    ## values:
    ##   - e2e-az1
    ##   - e2e-az2
    ##
    values: []
  ## @param csiProvider.affinity Affinity for Vault CSI Provider pods assignment
  ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
  ## NOTE: `csiProvider.podAffinityPreset`, `csiProvider.podAntiAffinityPreset`, and `csiProvider.nodeAffinityPreset` will be ignored when it's set
  ##
  affinity: {}
  ## @param csiProvider.nodeSelector Node labels for Vault CSI Provider pods assignment
  ## ref: https://kubernetes.io/docs/user-guide/node-selection/
  ##
  nodeSelector: {}
  ## @param csiProvider.tolerations Tolerations for Vault CSI Provider pods assignment
  ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
  ##
  tolerations: []
  ## @param csiProvider.updateStrategy.type Vault CSI Provider statefulset strategy type
  ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies
  ##
  updateStrategy:
    ## StrategyType
    ## Can be set to RollingUpdate or OnDelete
    ##
    type: RollingUpdate

  ## @param csiProvider.priorityClassName Vault CSI Provider pods' priorityClassName
  ##
  priorityClassName: ""
  ## @param csiProvider.topologySpreadConstraints Topology Spread Constraints for pod assignment spread across your cluster among failure-domains. Evaluated as a template
  ## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/#spread-constraints-for-pods
  ##
  topologySpreadConstraints: []
  ## @param csiProvider.schedulerName Name of the k8s scheduler (other than default) for Vault CSI Provider pods
  ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
  ##
  schedulerName: ""
  ## @param csiProvider.terminationGracePeriodSeconds Seconds Redmine pod needs to terminate gracefully
  ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods
  ##
  terminationGracePeriodSeconds: ""
  ## @param csiProvider.extraVolumes Optionally specify extra list of additional volumes for the Vault CSI Provider pod(s)
  ##
  extraVolumes: []
  ## @param csiProvider.sidecars Add additional sidecar containers to the Vault CSI Provider pod(s)
  ## e.g:
  ## sidecars:
  ##   - name: your-image-name
  ##     image: your-image
  ##     imagePullPolicy: Always
  ##     ports:
  ##       - name: portname
  ##         containerPort: 1234
  ##
  sidecars: []
  ## @param csiProvider.initContainers Add additional init containers to the Vault CSI Provider pod(s)
  ## ref: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
  ## e.g:
  ## initContainers:
  ##  - name: your-image-name
  ##    image: your-image
  ##    imagePullPolicy: Always
  ##    command: ['sh', '-c', 'echo "hello world"']
  ##
  initContainers: []

  ## Configure Pods Security Context
  ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod
  ## @param csiProvider.podSecurityContext.enabled Enabled CSI Provider pods' Security Context
  ## @param csiProvider.podSecurityContext.fsGroup Set CSI Provider pod's Security Context fsGroup
  ##
  podSecurityContext:
    enabled: true
    fsGroup: 1001

  provider:
    ## @param csiProvider.provider.containerPorts.health CSI Provider health container port
    ##
    containerPorts:
      health: 8080
    ## Configure extra options for CSI Provider container' liveness and readiness probes
    ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes
    ## @param csiProvider.provider.livenessProbe.enabled Enable livenessProbe on CSI Provider container
    ## @param csiProvider.provider.livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe
    ## @param csiProvider.provider.livenessProbe.periodSeconds Period seconds for livenessProbe
    ## @param csiProvider.provider.livenessProbe.timeoutSeconds Timeout seconds for livenessProbe
    ## @param csiProvider.provider.livenessProbe.failureThreshold Failure threshold for livenessProbe
    ## @param csiProvider.provider.livenessProbe.successThreshold Success threshold for livenessProbe
    ##
    livenessProbe:
      enabled: true
      initialDelaySeconds: 5
      periodSeconds: 10
      timeoutSeconds: 5
      failureThreshold: 5
      successThreshold: 1
    ## @param csiProvider.provider.readinessProbe.enabled Enable readinessProbe on CSI Provider container
    ## @param csiProvider.provider.readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe
    ## @param csiProvider.provider.readinessProbe.periodSeconds Period seconds for readinessProbe
    ## @param csiProvider.provider.readinessProbe.timeoutSeconds Timeout seconds for readinessProbe
    ## @param csiProvider.provider.readinessProbe.failureThreshold Failure threshold for readinessProbe
    ## @param csiProvider.provider.readinessProbe.successThreshold Success threshold for readinessProbe
    ##
    readinessProbe:
      enabled: true
      initialDelaySeconds: 5
      periodSeconds: 10
      timeoutSeconds: 5
      failureThreshold: 5
      successThreshold: 1
    ## @param csiProvider.provider.startupProbe.enabled Enable startupProbe on CSI Provider container
    ## @param csiProvider.provider.startupProbe.initialDelaySeconds Initial delay seconds for startupProbe
    ## @param csiProvider.provider.startupProbe.periodSeconds Period seconds for startupProbe
    ## @param csiProvider.provider.startupProbe.timeoutSeconds Timeout seconds for startupProbe
    ## @param csiProvider.provider.startupProbe.failureThreshold Failure threshold for startupProbe
    ## @param csiProvider.provider.startupProbe.successThreshold Success threshold for startupProbe
    ##
    startupProbe:
      enabled: false
      initialDelaySeconds: 5
      periodSeconds: 10
      timeoutSeconds: 5
      failureThreshold: 5
      successThreshold: 1
    ## @param csiProvider.provider.customLivenessProbe Custom livenessProbe that overrides the default one
    ##
    customLivenessProbe: {}
    ## @param csiProvider.provider.customReadinessProbe Custom readinessProbe that overrides the default one
    ##
    customReadinessProbe: {}
    ## @param csiProvider.provider.customStartupProbe Custom startupProbe that overrides the default one
    ##
    customStartupProbe: {}
    ## CSI Provider resource requests and limits
    ## ref: http://kubernetes.io/docs/user-guide/compute-resources/
    ## @param csiProvider.provider.resources.limits The resources limits for the CSI Provider container
    ## @param csiProvider.provider.resources.requests The requested resources for the CSI Provider container
    ##
    resources:
      limits: {}
      requests: {}
    ## Configure Container Security Context
    ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
    ## @param csiProvider.provider.containerSecurityContext.enabled Enabled containers' Security Context
    ## @param csiProvider.provider.containerSecurityContext.runAsUser Set containers' Security Context runAsUser
    ## @param csiProvider.provider.containerSecurityContext.runAsNonRoot Set container's Security Context runAsNonRoot
    ## @param csiProvider.provider.containerSecurityContext.privileged Set container's Security Context privileged
    ## @param csiProvider.provider.containerSecurityContext.readOnlyRootFilesystem Set container's Security Context readOnlyRootFilesystem
    ## @param csiProvider.provider.containerSecurityContext.allowPrivilegeEscalation Set container's Security Context allowPrivilegeEscalation
    ## @param csiProvider.provider.containerSecurityContext.capabilities.drop List of capabilities to be dropped
    ## @param csiProvider.provider.containerSecurityContext.seccompProfile.type Set container's Security Context seccomp profile
    ##
    containerSecurityContext:
      enabled: true
      runAsUser: 1001
      runAsNonRoot: true
      privileged: false
      readOnlyRootFilesystem: true
      allowPrivilegeEscalation: false
      capabilities:
        drop: ["ALL"]
      seccompProfile:
        type: "RuntimeDefault"

    ## @param csiProvider.provider.command Override default container command (useful when using custom images)
    ##
    command: []
    ## @param csiProvider.provider.args Override default container args (useful when using custom images)
    ##
    args: []

    ## @param csiProvider.provider.lifecycleHooks for the CSI Provider container(s) to automate configuration before or after startup
    ##
    lifecycleHooks: {}
    ## @param csiProvider.provider.extraEnvVars Array with extra environment variables to add to CSI Provider nodes
    ## e.g:
    ## extraEnvVars:
    ##   - name: FOO
    ##     value: "bar"
    ##
    extraEnvVars: []
    ## @param csiProvider.provider.extraEnvVarsCM Name of existing ConfigMap containing extra env vars for CSI Provider nodes
    ##
    extraEnvVarsCM: ""
    ## @param csiProvider.provider.extraEnvVarsSecret Name of existing Secret containing extra env vars for CSI Provider nodes
    ##
    extraEnvVarsSecret: ""

    ## @param csiProvider.provider.extraVolumeMounts Optionally specify extra list of additional volumeMounts for the Vault CSI Provider container
    ##
    extraVolumeMounts: []

  agent:
    ## @param csiProvider.agent.containerPorts.tcp CSI Provider Agent metrics container port
    ##
    containerPorts:
      tcp: 8200
    ## Configure extra options for CSI Provider Agent container' liveness and readiness probes
    ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes
    ## @param csiProvider.agent.livenessProbe.enabled Enable livenessProbe on CSI Provider Agent container
    ## @param csiProvider.agent.livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe
    ## @param csiProvider.agent.livenessProbe.periodSeconds Period seconds for livenessProbe
    ## @param csiProvider.agent.livenessProbe.timeoutSeconds Timeout seconds for livenessProbe
    ## @param csiProvider.agent.livenessProbe.failureThreshold Failure threshold for livenessProbe
    ## @param csiProvider.agent.livenessProbe.successThreshold Success threshold for livenessProbe
    ##
    livenessProbe:
      enabled: true
      initialDelaySeconds: 5
      periodSeconds: 10
      timeoutSeconds: 5
      failureThreshold: 5
      successThreshold: 1
    ## @param csiProvider.agent.readinessProbe.enabled Enable readinessProbe on CSI Provider Agent container
    ## @param csiProvider.agent.readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe
    ## @param csiProvider.agent.readinessProbe.periodSeconds Period seconds for readinessProbe
    ## @param csiProvider.agent.readinessProbe.timeoutSeconds Timeout seconds for readinessProbe
    ## @param csiProvider.agent.readinessProbe.failureThreshold Failure threshold for readinessProbe
    ## @param csiProvider.agent.readinessProbe.successThreshold Success threshold for readinessProbe
    ##
    readinessProbe:
      enabled: true
      initialDelaySeconds: 5
      periodSeconds: 10
      timeoutSeconds: 5
      failureThreshold: 5
      successThreshold: 1
    ## @param csiProvider.agent.startupProbe.enabled Enable startupProbe on CSI Provider Agent container
    ## @param csiProvider.agent.startupProbe.initialDelaySeconds Initial delay seconds for startupProbe
    ## @param csiProvider.agent.startupProbe.periodSeconds Period seconds for startupProbe
    ## @param csiProvider.agent.startupProbe.timeoutSeconds Timeout seconds for startupProbe
    ## @param csiProvider.agent.startupProbe.failureThreshold Failure threshold for startupProbe
    ## @param csiProvider.agent.startupProbe.successThreshold Success threshold for startupProbe
    ##
    startupProbe:
      enabled: false
      initialDelaySeconds: 5
      periodSeconds: 10
      timeoutSeconds: 5
      failureThreshold: 5
      successThreshold: 1
    ## @param csiProvider.agent.customLivenessProbe Custom livenessProbe that overrides the default one
    ##
    customLivenessProbe: {}
    ## @param csiProvider.agent.customReadinessProbe Custom readinessProbe that overrides the default one
    ##
    customReadinessProbe: {}
    ## @param csiProvider.agent.customStartupProbe Custom startupProbe that overrides the default one
    ##
    customStartupProbe: {}
    ## Configure Container Security Context
    ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
    ## @param csiProvider.agent.containerSecurityContext.enabled Enabled containers' Security Context
    ## @param csiProvider.agent.containerSecurityContext.runAsUser Set containers' Security Context runAsUser
    ## @param csiProvider.agent.containerSecurityContext.runAsNonRoot Set container's Security Context runAsNonRoot
    ## @param csiProvider.agent.containerSecurityContext.privileged Set container's Security Context privileged
    ## @param csiProvider.agent.containerSecurityContext.readOnlyRootFilesystem Set container's Security Context readOnlyRootFilesystem
    ## @param csiProvider.agent.containerSecurityContext.allowPrivilegeEscalation Set container's Security Context allowPrivilegeEscalation
    ## @param csiProvider.agent.containerSecurityContext.capabilities.drop List of capabilities to be dropped
    ## @param csiProvider.agent.containerSecurityContext.seccompProfile.type Set container's Security Context seccomp profile
    ##
    containerSecurityContext:
      enabled: true
      runAsUser: 1001
      runAsNonRoot: true
      privileged: false
      readOnlyRootFilesystem: true
      allowPrivilegeEscalation: false
      capabilities:
        drop: ["ALL"]
      seccompProfile:
        type: "RuntimeDefault"
    ## CSI Provider Agent resource requests and limits
    ## ref: http://kubernetes.io/docs/user-guide/compute-resources/
    ## @param csiProvider.agent.resources.limits The resources limits for the CSI Provider Agent container
    ## @param csiProvider.agent.resources.requests The requested resources for the CSI Provider Agent container
    ##
    resources:
      limits: {}
      requests: {}

    ## @param csiProvider.agent.command Override default container command (useful when using custom images)
    ##
    command: []
    ## @param csiProvider.agent.args Override default container args (useful when using custom images)
    ##
    args: []

    ## @param csiProvider.agent.lifecycleHooks for the CSI Provider Agent container(s) to automate configuration before or after startup
    ##
    lifecycleHooks: {}
    ## @param csiProvider.agent.extraEnvVars Array with extra environment variables to add to CSI Provider Agent nodes
    ## e.g:
    ## extraEnvVars:
    ##   - name: FOO
    ##     value: "bar"
    ##
    extraEnvVars: []
    ## @param csiProvider.agent.extraEnvVarsCM Name of existing ConfigMap containing extra env vars for CSI Provider Agent nodes
    ##
    extraEnvVarsCM: ""
    ## @param csiProvider.agent.extraEnvVarsSecret Name of existing Secret containing extra env vars for CSI Provider Agent nodes
    ##
    extraEnvVarsSecret: ""

    ## @param csiProvider.agent.extraVolumeMounts Optionally specify extra list of additional volumeMounts for the CSI Provider container(s)
    ##
    extraVolumeMounts: []

  ## @section Vault CSI Provider RBAC Parameters
  ##

  ## RBAC configuration
  ##
  rbac:
    ## @param csiProvider.rbac.create Specifies whether RBAC resources should be created
    ##
    create: true
    ## @param csiProvider.rbac.rules Custom RBAC rules to set
    ## e.g:
    ## rules:
    ##   - apiGroups:
    ##       - ""
    ##     resources:
    ##       - pods
    ##     verbs:
    ##       - get
    ##       - list
    ##
    rules: []

  ## ServiceAccount configuration
  ##
  serviceAccount:
    ## @param csiProvider.serviceAccount.create Specifies whether a ServiceAccount should be created
    ##
    create: true
    ## @param csiProvider.serviceAccount.name The name of the ServiceAccount to use.
    ## If not set and create is true, a name is generated using the common.names.fullname template
    ##
    name: ""
    ## @param csiProvider.serviceAccount.annotations Additional Service Account annotations (evaluated as a template)
    ##
    annotations: {}
    ## @param csiProvider.serviceAccount.automountServiceAccountToken Automount service account token for the server service account
    ##
    automountServiceAccountToken: true


## @section Vault Kubernetes Injector Parameters
##
injector:
  ## @param injector.enabled Enable Vault Kubernetes Injector
  ##
  enabled: true
  ## Bitnami Vault Kubernetes Injector image
  ## ref: https://hub.docker.com/r/bitnami/vault-k8s/tags/
  ## @param injector.image.registry [default: REGISTRY_NAME] Vault Kubernetes Injector image registry
  ## @param injector.image.repository [default: REPOSITORY_NAME/vault-k8s] Vault Kubernetes Injector image repository
  ## @skip injector.image.tag Vault Kubernetes Injector image tag (immutable tags are recommended)
  ## @param injector.image.digest Vault Kubernetes Injector image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag image tag (immutable tags are recommended)
  ## @param injector.image.pullPolicy Vault Kubernetes Injector image pull policy
  ## @param injector.image.pullSecrets Vault Kubernetes Injector image pull secrets
  ## @param injector.image.debug Enable Vault Kubernetes Injector image debug mode
  ##
  image:
    registry: docker.io
    repository: bitnami/vault-k8s
    tag: 1.3.1-debian-11-r3
    digest: ""
    ## 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/
    ## e.g:
    ## pullSecrets:
    ##   - myRegistryKeySecretName
    ##
    pullSecrets: []
    ## Enable debug mode
    ##
    debug: false
  ## @param injector.replicaCount Number of Vault Kubernetes Injector replicas to deploy
  ##
  replicaCount: 1
  ## @param injector.containerPorts.https Vault Kubernetes Injector metrics container port
  ##
  containerPorts:
    https: 8080
  ## Configure extra options for Vault Kubernetes Injector containers' liveness and readiness probes
  ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes
  ## @param injector.livenessProbe.enabled Enable livenessProbe on Vault Kubernetes Injector containers
  ## @param injector.livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe
  ## @param injector.livenessProbe.periodSeconds Period seconds for livenessProbe
  ## @param injector.livenessProbe.timeoutSeconds Timeout seconds for livenessProbe
  ## @param injector.livenessProbe.failureThreshold Failure threshold for livenessProbe
  ## @param injector.livenessProbe.successThreshold Success threshold for livenessProbe
  ##
  livenessProbe:
    enabled: true
    initialDelaySeconds: 5
    periodSeconds: 10
    timeoutSeconds: 5
    failureThreshold: 5
    successThreshold: 1
  ## @param injector.readinessProbe.enabled Enable readinessProbe on Vault Kubernetes Injector containers
  ## @param injector.readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe
  ## @param injector.readinessProbe.periodSeconds Period seconds for readinessProbe
  ## @param injector.readinessProbe.timeoutSeconds Timeout seconds for readinessProbe
  ## @param injector.readinessProbe.failureThreshold Failure threshold for readinessProbe
  ## @param injector.readinessProbe.successThreshold Success threshold for readinessProbe
  ##
  readinessProbe:
    enabled: true
    initialDelaySeconds: 5
    periodSeconds: 10
    timeoutSeconds: 5
    failureThreshold: 5
    successThreshold: 1
  ## @param injector.startupProbe.enabled Enable startupProbe on Vault Kubernetes Injector containers
  ## @param injector.startupProbe.initialDelaySeconds Initial delay seconds for startupProbe
  ## @param injector.startupProbe.periodSeconds Period seconds for startupProbe
  ## @param injector.startupProbe.timeoutSeconds Timeout seconds for startupProbe
  ## @param injector.startupProbe.failureThreshold Failure threshold for startupProbe
  ## @param injector.startupProbe.successThreshold Success threshold for startupProbe
  ##
  startupProbe:
    enabled: false
    initialDelaySeconds: 5
    periodSeconds: 10
    timeoutSeconds: 5
    failureThreshold: 5
    successThreshold: 1
  ## @param injector.customLivenessProbe Custom livenessProbe that overrides the default one
  ##
  customLivenessProbe: {}
  ## @param injector.customReadinessProbe Custom readinessProbe that overrides the default one
  ##
  customReadinessProbe: {}
  ## @param injector.customStartupProbe Custom startupProbe that overrides the default one
  ##
  customStartupProbe: {}
  ## Vault Kubernetes Injector resource requests and limits
  ## ref: http://kubernetes.io/docs/user-guide/compute-resources/
  ## @param injector.resources.limits The resources limits for the Vault Kubernetes Injector containers
  ## @param injector.resources.requests The requested resources for the Vault Kubernetes Injector containers
  ##
  resources:
    limits: {}
    requests: {}
  ## Configure Pods Security Context
  ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod
  ## @param injector.podSecurityContext.enabled Enabled Vault Kubernetes Injector pods' Security Context
  ## @param injector.podSecurityContext.fsGroup Set Vault Kubernetes Injector pod's Security Context fsGroup
  ##
  podSecurityContext:
    enabled: true
    fsGroup: 1001
  ## Configure Container Security Context
  ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
  ## @param injector.containerSecurityContext.enabled Enabled containers' Security Context
  ## @param injector.containerSecurityContext.runAsUser Set containers' Security Context runAsUser
  ## @param injector.containerSecurityContext.runAsNonRoot Set container's Security Context runAsNonRoot
  ## @param injector.containerSecurityContext.privileged Set container's Security Context privileged
  ## @param injector.containerSecurityContext.readOnlyRootFilesystem Set container's Security Context readOnlyRootFilesystem
  ## @param injector.containerSecurityContext.allowPrivilegeEscalation Set container's Security Context allowPrivilegeEscalation
  ## @param injector.containerSecurityContext.capabilities.drop List of capabilities to be dropped
  ## @param injector.containerSecurityContext.seccompProfile.type Set container's Security Context seccomp profile
  ##
  containerSecurityContext:
    enabled: true
    runAsUser: 1001
    runAsNonRoot: true
    privileged: false
    readOnlyRootFilesystem: true
    allowPrivilegeEscalation: false
    capabilities:
      drop: ["ALL"]
    seccompProfile:
      type: "RuntimeDefault"

  ## @param injector.command Override default container command (useful when using custom images)
  ##
  command: []
  ## @param injector.args Override default container args (useful when using custom images)
  ##
  args: []
  ## @param injector.hostAliases Vault Kubernetes Injector pods host aliases
  ## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
  ##
  hostAliases: []
  ## @param injector.podLabels Extra labels for Vault Kubernetes Injector pods
  ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
  ##
  podLabels: {}
  ## @param injector.podAnnotations Annotations for Vault Kubernetes Injector pods
  ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
  ##
  podAnnotations: {}
  ## @param injector.podAffinityPreset Pod affinity preset. Ignored if `injector.affinity` is set. Allowed values: `soft` or `hard`
  ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
  ##
  podAffinityPreset: ""
  ## @param injector.podAntiAffinityPreset Pod anti-affinity preset. Ignored if `injector.affinity` is set. Allowed values: `soft` or `hard`
  ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
  ##
  podAntiAffinityPreset: soft
  ## Pod Disruption Budget configuration
  ## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb
  ## @param injector.pdb.create Enable/disable a Pod Disruption Budget creation
  ## @param injector.pdb.minAvailable Minimum number/percentage of pods that should remain scheduled
  ## @param injector.pdb.maxUnavailable Maximum number/percentage of pods that may be made unavailable
  ##
  pdb:
    create: false
    minAvailable: 1
    maxUnavailable: ""
  ## Autoscaling configuration
  ## ref: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/
  ## @param injector.autoscaling.enabled Enable autoscaling for injector
  ## @param injector.autoscaling.minReplicas Minimum number of injector replicas
  ## @param injector.autoscaling.maxReplicas Maximum number of injector replicas
  ## @param injector.autoscaling.targetCPU Target CPU utilization percentage
  ## @param injector.autoscaling.targetMemory Target Memory utilization percentage
  ##
  autoscaling:
    enabled: false
    minReplicas: ""
    maxReplicas: ""
    targetCPU: ""
    targetMemory: ""
  ## Node injector.affinity preset
  ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity
  ##
  nodeAffinityPreset:
    ## @param injector.nodeAffinityPreset.type Node affinity preset type. Ignored if `injector.affinity` is set. Allowed values: `soft` or `hard`
    ##
    type: ""
    ## @param injector.nodeAffinityPreset.key Node label key to match. Ignored if `injector.affinity` is set
    ##
    key: ""
    ## @param injector.nodeAffinityPreset.values Node label values to match. Ignored if `injector.affinity` is set
    ## E.g.
    ## values:
    ##   - e2e-az1
    ##   - e2e-az2
    ##
    values: []
  ## @param injector.affinity Affinity for Vault Kubernetes Injector pods assignment
  ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
  ## NOTE: `injector.podAffinityPreset`, `injector.podAntiAffinityPreset`, and `injector.nodeAffinityPreset` will be ignored when it's set
  ##
  affinity: {}
  ## @param injector.nodeSelector Node labels for Vault Kubernetes Injector pods assignment
  ## ref: https://kubernetes.io/docs/user-guide/node-selection/
  ##
  nodeSelector: {}
  ## @param injector.tolerations Tolerations for Vault Kubernetes Injector pods assignment
  ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
  ##
  tolerations: []
  ## @param injector.updateStrategy.type Vault Kubernetes Injector statefulset strategy type
  ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies
  ##
  updateStrategy:
    ## StrategyType
    ## Can be set to RollingUpdate or OnDelete
    ##
    type: RollingUpdate

  ## @param injector.priorityClassName Vault Kubernetes Injector pods' priorityClassName
  ##
  priorityClassName: ""
  ## @param injector.topologySpreadConstraints Topology Spread Constraints for pod assignment spread across your cluster among failure-domains. Evaluated as a template
  ## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/#spread-constraints-for-pods
  ##
  topologySpreadConstraints: []
  ## @param injector.schedulerName Name of the k8s scheduler (other than default) for Vault Kubernetes Injector pods
  ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
  ##
  schedulerName: ""
  ## @param injector.terminationGracePeriodSeconds Seconds Redmine pod needs to terminate gracefully
  ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods
  ##
  terminationGracePeriodSeconds: ""
  ## @param injector.lifecycleHooks for the Vault Kubernetes Injector container(s) to automate configuration before or after startup
  ##
  lifecycleHooks: {}
  ## @param injector.extraEnvVars Array with extra environment variables to add to Vault Kubernetes Injector nodes
  ## e.g:
  ## extraEnvVars:
  ##   - name: FOO
  ##     value: "bar"
  ##
  extraEnvVars: []
  ## @param injector.extraEnvVarsCM Name of existing ConfigMap containing extra env vars for Vault Kubernetes Injector nodes
  ##
  extraEnvVarsCM: ""
  ## @param injector.extraEnvVarsSecret Name of existing Secret containing extra env vars for Vault Kubernetes Injector nodes
  ##
  extraEnvVarsSecret: ""
  ## @param injector.extraVolumes Optionally specify extra list of additional volumes for the Vault Kubernetes Injector pod(s)
  ##
  extraVolumes: []
  ## @param injector.extraVolumeMounts Optionally specify extra list of additional volumeMounts for the Vault Kubernetes Injector container(s)
  ##
  extraVolumeMounts: []
  ## @param injector.sidecars Add additional sidecar containers to the Vault Kubernetes Injector pod(s)
  ## e.g:
  ## sidecars:
  ##   - name: your-image-name
  ##     image: your-image
  ##     imagePullPolicy: Always
  ##     ports:
  ##       - name: portname
  ##         containerPort: 1234
  ##
  sidecars: []
  ## @param injector.initContainers Add additional init containers to the Vault Kubernetes Injector pod(s)
  ## ref: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
  ## e.g:
  ## initContainers:
  ##  - name: your-image-name
  ##    image: your-image
  ##    imagePullPolicy: Always
  ##    command: ['sh', '-c', 'echo "hello world"']
  ##
  initContainers: []

  ## @section Vault Kubernetes Injector Traffic Exposure Parameters
  ##
  service:
    ## @param injector.service.type Vault Kubernetes Injector service type
    ##
    type: ClusterIP
    ## @param injector.service.ports.https Vault Kubernetes Injector service HTTPS port
    ##
    ports:
      https: 443
    ## Node ports to expose
    ## @param injector.service.nodePorts.https Node port for HTTPS
    ## NOTE: choose port between <30000-32767>
    ##
    nodePorts:
      https: ""
    ## @param injector.service.clusterIP Vault Kubernetes Injector service Cluster IP
    ## e.g.:
    ## clusterIP: None
    ##
    clusterIP: ""
    ## @param injector.service.loadBalancerIP Vault Kubernetes Injector service Load Balancer IP
    ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-loadbalancer
    ##
    loadBalancerIP: ""
    ## @param injector.service.loadBalancerSourceRanges Vault Kubernetes Injector service Load Balancer sources
    ## ref: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
    ## e.g:
    ## loadBalancerSourceRanges:
    ##   - 10.10.10.0/24
    ##
    loadBalancerSourceRanges: []
    ## @param injector.service.externalTrafficPolicy Vault Kubernetes Injector service external traffic policy
    ## ref http://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-web-source-ip
    ##
    externalTrafficPolicy: Cluster
    ## @param injector.service.annotations Additional custom annotations for Vault Kubernetes Injector service
    ##
    annotations: {}
    ## @param injector.service.extraPorts Extra ports to expose in Vault Kubernetes Injector service (normally used with the `sidecars` value)
    ##
    extraPorts: []
    ## @param injector.service.sessionAffinity Control where web requests go, to the same pod or round-robin
    ## Values: WebIP or None
    ## ref: https://kubernetes.io/docs/user-guide/services/
    ##
    sessionAffinity: None
    ## @param injector.service.sessionAffinityConfig Additional settings for the sessionAffinity
    ## sessionAffinityConfig:
    ##   webIP:
    ##     timeoutSeconds: 300
    ##
    sessionAffinityConfig: {}


  ## @section Vault Kubernetes Injector RBAC Parameters
  ##

  ## RBAC configuration
  ##
  rbac:
    ## @param injector.rbac.create Specifies whether RBAC resources should be created
    ##
    create: true
    ## @param injector.rbac.rules Custom RBAC rules to set
    ## e.g:
    ## rules:
    ##   - apiGroups:
    ##       - ""
    ##     resources:
    ##       - pods
    ##     verbs:
    ##       - get
    ##       - list
    ##
    rules: []

  ## ServiceAccount configuration
  ##
  serviceAccount:
    ## @param injector.serviceAccount.create Specifies whether a ServiceAccount should be created
    ##
    create: true
    ## @param injector.serviceAccount.name The name of the ServiceAccount to use.
    ## If not set and create is true, a name is generated using the common.names.fullname template
    ##
    name: ""
    ## @param injector.serviceAccount.annotations Additional Service Account annotations (evaluated as a template)
    ##
    annotations: {}
    ## @param injector.serviceAccount.automountServiceAccountToken Automount service account token for the server service account
    ##
    automountServiceAccountToken: true

## 'volumePermissions' init container parameters
## Changes the owner and group of the persistent volume mount point to runAsUser:fsGroup values
##   based on the podSecurityContext/containerSecurityContext parameters
##
volumePermissions:
  ## @param volumePermissions.enabled Enable init container that changes the owner/group of the PV mount point to `runAsUser:fsGroup`
  ##
  enabled: false
  ## OS Shell + Utility image
  ## ref: https://hub.docker.com/r/bitnami/os-shell/tags/
  ## @param volumePermissions.image.registry [default: REGISTRY_NAME] OS Shell + Utility image registry
  ## @param volumePermissions.image.repository [default: REPOSITORY_NAME/os-shell] OS Shell + Utility image repository
  ## @skip volumePermissions.image.tag OS Shell + Utility image tag (immutable tags are recommended)
  ## @param volumePermissions.image.digest OS Shell + Utility image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag
  ## @param volumePermissions.image.pullPolicy OS Shell + Utility image pull policy
  ## @param volumePermissions.image.pullSecrets OS Shell + Utility image pull secrets
  ##
  image:
    registry: docker.io
    repository: bitnami/os-shell
    tag: 11-debian-11-r92
    digest: ""
    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/
    ## e.g:
    ## pullSecrets:
    ##   - myRegistryKeySecretName
    ##
    pullSecrets: []
  ## Init container's resource requests and limits
  ## ref: https://kubernetes.io/docs/user-guide/compute-resources/
  ## @param volumePermissions.resources.limits The resources limits for the init container
  ## @param volumePermissions.resources.requests The requested resources for the init container
  ##
  resources:
    limits: {}
    requests: {}
  ## Init container Container Security Context
  ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
  ## @param volumePermissions.containerSecurityContext.enabled Enable init container's Security Context
  ## @param volumePermissions.containerSecurityContext.runAsUser Set init container's Security Context runAsUser
  ##
  containerSecurityContext:
    enabled: true
    runAsUser: 0
