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

Mounts of main container apply to all sidecars #440

Open
snowdrop-bot opened this issue Oct 25, 2021 · 0 comments
Open

Mounts of main container apply to all sidecars #440

snowdrop-bot opened this issue Oct 25, 2021 · 0 comments

Comments

@snowdrop-bot
Copy link
Collaborator

Describe the bug

I have quarkus 2.3.1.Final, openshift extension and config application.properties:

quarkus.native.container-build=true
quarkus.container-image.build=true
quarkus.container-image.push=false
quarkus.container-image.builder=docker

quarkus.container-image.group=test-group
quarkus.container-image.name=test-name
quarkus.container-image.tag=latest

quarkus.kubernetes.deployment-target=openshift
quarkus.openshift.mounts.main-volume1.path=/main-container/mount1
quarkus.openshift.mounts.main-volume2.path=/main-container/mount2

quarkus.openshift.sidecars.sidecar1.image=sidecar1-image
quarkus.openshift.sidecars.sidecar1.mounts.sidecar1-volume1.path=/sidecar1/mount1
quarkus.openshift.sidecars.sidecar1.mounts.sidecar1-volume2.path=/sidecar1/mount2

quarkus.openshift.sidecars.sidecar2.image=sidecar2-image
quarkus.openshift.sidecars.sidecar2.mounts.sidecar2-volume1.path=/sidecar2/mount1
quarkus.openshift.sidecars.sidecar2.mounts.sidecar2-volume2.path=/sidecar2/mount2

After mvnw -Pnative package generated openshift.yml contains mounts of main container in the all sidecars.

Expected behavior

        - image: sidecar1-image
          imagePullPolicy: IfNotPresent
          name: sidecar1
          volumeMounts:
            - mountPath: /sidecar1/mount1
              name: sidecar1-volume1
              readOnly: false
            - mountPath: /sidecar1/mount2
              name: sidecar1-volume2
              readOnly: false
        - image: sidecar2-image
          imagePullPolicy: IfNotPresent
          name: sidecar2
          volumeMounts:
            - mountPath: /sidecar2/mount1
              name: sidecar2-volume1
              readOnly: false
            - mountPath: /sidecar2/mount2
              name: sidecar2-volume2
              readOnly: false

Actual behavior

        - image: sidecar1-image
          imagePullPolicy: IfNotPresent
          name: sidecar1
          volumeMounts:
            - mountPath: /sidecar1/mount1
              name: sidecar1-volume1
              readOnly: false
            - mountPath: /sidecar1/mount2
              name: sidecar1-volume2
              readOnly: false
            - mountPath: /main-container/mount1
              name: main-volume1
              readOnly: false
            - mountPath: /main-container/mount2
              name: main-volume2
              readOnly: false
        - image: sidecar2-image
          imagePullPolicy: IfNotPresent
          name: sidecar2
          volumeMounts:
            - mountPath: /sidecar2/mount1
              name: sidecar2-volume1
              readOnly: false
            - mountPath: /sidecar2/mount2
              name: sidecar2-volume2
              readOnly: false
            - mountPath: /main-container/mount1
              name: main-volume1
              readOnly: false
            - mountPath: /main-container/mount2
              name: main-volume2
              readOnly: false

How to Reproduce?

Just add any mounts by quarkus.openshift.mounts."mounts".path and add config for sidecar by quarkus.openshift.sidecars."sidecar".image.

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Quarkus version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response


quarkusio#20987


$upstream:20987$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants