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

(hotfix): extra volumes #72

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

shokohsc
Copy link
Contributor

@shokohsc shokohsc commented May 5, 2021

Typo in templates stopped this 'feature' to be used.

@shokohsc shokohsc force-pushed the hotfix-extra-volumes branch 3 times, most recently from 541817b to 78e0520 Compare May 5, 2021 22:40
@itzg
Copy link
Owner

itzg commented May 6, 2021

I'm not sure how the existing structure was a problem. I just tested with:

minecraftServer:
  eula: "TRUE"
extraVolumes:
  - volumeMounts:
      - name: worlds
        mountPath: /worlds
        readOnly: true
    volumes:
      - name: worlds
        emptyDir: {}

and it rendered the latter part of container and volumes section as I'd expect:

        volumeMounts:
        - name: datadir
          mountPath: /data
        - mountPath: /worlds
          name: worlds
          readOnly: true
      volumes:
      - name: datadir
        emptyDir: {}
      - emptyDir: {}
        name: worlds

@shokohsc
Copy link
Contributor Author

shokohsc commented May 7, 2021

Hello, that is... surprising. I tried those options without success with a slight difference though:

I did not specified a volumeMount for the main (minecraft) container.
Only an external volume that is used explicitly for an initContainer and I did have a syntax error about the key volumeMounts but about the main container, not the initContainer.

May I ask you to confirm that use case on your side and tell me if it fails too ?

extraVolumes:
  volumes:
    - name: test
      emptyDir: {}
initContainers:
  - name: test
    image: busybox
    command:
      - touch
    args:
      - /test/hello
    volumeMounts:
      - name: test
        mountPath: /test

the initContainers key is not necessary.

even specifying extraVolumes.volumeMounts: [] did fail.
I'm suspecting my template key range instead of if to trigger the error I'm encountering

@itzg
Copy link
Owner

itzg commented May 7, 2021

extraVolumes is a list, so you seem to be missing a "dash" in your structure:

Your snippet

extraVolumes:
  volumes:
    - name: test
      emptyDir: {}

should be

extraVolumes:
  - volumes:
      - name: test
        emptyDir: {}

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