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

Cannot add multiple traits, such as init-containers or sidecars #829

Open
huaxk opened this issue May 29, 2023 · 1 comment
Open

Cannot add multiple traits, such as init-containers or sidecars #829

huaxk opened this issue May 29, 2023 · 1 comment
Labels
feature help wanted Extra attention is needed

Comments

@huaxk
Copy link

huaxk commented May 29, 2023

I successfully added multiple traits of init-container in yaml:

apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
  name: busybox
spec:
  components:
    - name: busybox
      type: webservice
      properties:
        image: busybox
        cmd: ["sleep", "86400"]
      traits:
        - type: init-container
          properties:
            name: init-busybox
            image: busybox
            cmd: ["sh", "-c"]
            args:
              - |
                echo hello > /data/hello.text
            mountName: "init-data"
            initMountPath: /data
            appMountPath: /data-initialized
        - type: init-container
          properties:
            name: init-busybox-2
            image: busybox
            cmd: ["sh", "-c"]
            args:
              - |
                echo hello > /data/hello2.text
            mountName: "init-data-2"
            initMountPath: /data
            appMountPath: **/data-initialized-2**

but adding multiple init-containers in velaux failed, get error prompt: "trait is already exist". I think adding multiple traits of init-containers or sidecars to a component is a normal requirement, why not support it.

@huaxk huaxk added the kind/bug Something isn't working label May 29, 2023
@wonderflow wonderflow added the help wanted Extra attention is needed label Jun 29, 2023
@wonderflow
Copy link
Contributor

Yes, it's just not supported in velaux, you can send a PR for this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants