Skip to content

SUP-3228: Allow extraVolumeMounts for default params #534

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

Merged
merged 7 commits into from
Mar 10, 2025

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
@petetomasik petetomasik force-pushed the SUP-3228-default-extra-volume-mounts branch from a58c630 to bcc6a9c Compare March 10, 2025 14:33
Copy link
Contributor

@nsuma8989 nsuma8989 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me

@petetomasik petetomasik merged commit 630ad3a into main Mar 10, 2025
1 check passed
@petetomasik petetomasik deleted the SUP-3228-default-extra-volume-mounts branch March 10, 2025 18:10
@bpoland bpoland mentioned this pull request Mar 17, 2025
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
2 participants