Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SUP-3228: Allow extraVolumeMounts for default params #534

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

petetomasik
Copy link
Contributor

@petetomasik petetomasik commented Mar 5, 2025

Allows for extraVolumeMounts to be configured for all checkout/command/sidecar containers.
Example:

config:
  default-checkout-params:
    gitCredentialsSecret:
      secretName: my-git-credentials
    extraVolumeMounts:
      - name: checkout-extra-dir
        mountPath: /extra-checkout
  default-command-params:
    extraVolumeMounts:
      - name: command-extra-dir
        mountPath: /extra-command
  default-sidecar-params:
    extraVolumeMounts:
      - name: sidecar-extra-dir
        mountPath: /extra-sidecar
  pod-spec-patch:
    containers:
      - name: checkout
        image: "buildkite/agent:latest"
    volumes:
      - name: checkout-extra-dir
        hostPath:
          path: /my/extra/dir/checkout
          type: DirectoryOrCreate
      - name: command-extra-dir
        hostPath:
          path: /my/extra/dir/command
          type: DirectoryOrCreate
      - name: sidecar-extra-dir
        hostPath:
          path: /my/extra/dir/sidecar
          type: DirectoryOrCreate

The extraVolumeMounts field of the kubernetes plugin is still available for use, which applies to all containers. The addition of extraVolumeMounts under default-checkout-params, default-command-params and default-sidecar-params allows for a more scoped approach to Volumes.

Fixes #327

@petetomasik petetomasik marked this pull request as ready for review March 7, 2025 22:52
@petetomasik petetomasik requested a review from a team as a code owner March 7, 2025 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow extraVolumeMounts with podSpecPatch
1 participant