Skip to content

Missing Support for Configurable imagePullSecrets and securityContext in Helm Chart #275

@simkope

Description

@simkope

Preflight Checklist

  • I have searched the issue tracker for an issue that matches the one I want to file, without success.
  • I agree to follow the Code of Conduct.

Problem Description

We are deploying Vault in an air-gapped environment using the vault-helm-chart and have identified two areas that require enhancements to support this setup:


1. Configurable imagePullSecrets

To facilitate pulling images from private registries, it's essential to have the ability to specify imagePullSecrets in the Helm chart.

Missing in:

  • secret-cleanup.yaml
  • statefulset.yaml

Proposed addition in templates:

imagePullSecrets:
  {{- toYaml .Values.imagePullSecrets | nindent 8 }}

And in values.yaml:

imagePullSecrets: []

This approach aligns with practices observed in other Helm charts, such as the HashiCorp Vault Helm Chart, which supports configurable imagePullSecrets.


2. Configurable securityContext

In environments where the following policy is applied:

pod-security.kubernetes.io/enforce: restricted

…it becomes necessary to configure the securityContext for all containers to comply with security standards.

This enhancement is similar to the request made in bank-vaults/bank-vaults#1442, which emphasizes the need for configurable securityContext settings to run Vault instances as non-root users.

Request: Allow configuration of securityContext for all containers (Vault, vault-unsealer, etc.) via values.yaml.

Proposed Solution

  • Introduce an imagePullSecrets parameter in the values.yaml file and reference it in the relevant templates (secret-cleanup.yaml and statefulset.yaml).
  • Add configurable securityContext parameters in the values.yaml file for all containers, enabling users to define security settings that comply with their cluster's security policies.

Alternatives Considered

No response

Additional Information

Implementing these enhancements will improve the flexibility and security compliance of the vault-helm-chart, particularly for users operating in air-gapped environments or clusters with strict security policies.

Thanks for your work on this chart — happy to contribute a PR if this sounds good!

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/enhancementCategorizes issue or PR as related to an improvement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions