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

feat: Add support for config_map volumes #82

Merged
merged 1 commit into from
Jan 12, 2022

Conversation

joekhoobyar
Copy link
Contributor

Support config_map volumes

Add support for kubernetes config maps as volumes.

This is a great help in letting our runners include less copy-pasted code or data.

kind: pipeline
type: kubernetes
name: default

clone:
  disable: true

steps:
- name: write
  pull: if-not-exists
  image: alpine
  volumes:
  - name: shared
    path: /shared
  commands:
  - pwd
  - echo "hello" > /shared/greetings.txt

- name: read
  pull: if-not-exists
  image: alpine
  volumes:
  - name: shared
    path: /shared
  commands:
  - pwd
  - ls /shared
  - cat /shared/greetings.txt

volumes:
- name: shared
  config_map:
    name: received-data-claim
    default_mode: 420
    optional: false

@marko-gacesa
Copy link
Contributor

@joekhoobyar thank you very much for this! Can you please create a PR in the doc repo (https://github.com/drone/docs) so we have the new feature documented? Thanks!

@marko-gacesa marko-gacesa merged commit f4b779f into drone-runners:master Jan 12, 2022
@joekhoobyar
Copy link
Contributor Author

@joekhoobyar thank you very much for this! Can you please create a PR in the doc repo (https://github.com/drone/docs) so we have the new feature documented? Thanks!

Sure, @marko-gacesa , I'd be happy to.

i was also thinking of submitting another PR or two. Secrets mounting, and projected volume mounting. These would also help a lot.

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.

2 participants