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 create a SeldonDeployment having volumes of type projected and configMap. #1072

Closed
sumeetgajjar opened this issue Nov 7, 2019 · 4 comments

Comments

@sumeetgajjar
Copy link

sumeetgajjar commented Nov 7, 2019

Seldon version: v0.4.1

If SeldonDeployment is created with volumes of type projected and configMap it fails stating the following message

kubectl failed exit status 1: Error from server (InternalError): Internal error occurred: Internal error occurred: Unable to access invalid index: 2

In order to reproduce the error use the following yaml

apiVersion: machinelearning.seldon.io/v1alpha2
kind: SeldonDeployment
metadata:
  labels:
    app: bug-demo
  name: bug-demo
spec:
  name: bug-demo
  predictors:
  - componentSpecs:
    - spec:
        volumes:
          - downwardAPI:
              defaultMode: 420
              items:
                - fieldRef:
                    apiVersion: v1
                    fieldPath: metadata.annotations
                  path: annotations
            name: podinfo
          - configMap:
              name: site-config
            name: site-config-volume
          - projected:
              sources:
                - configMap:
                    name: site-config
                    items:
                      - key: SITE_CONFIG
                        path: site_config
            name: site-config-projected-volume
        containers:
        - image: bug-demo-image
          imagePullPolicy: IfNotPresent # IfNotPresent or Always
          name: classifier
          resources:
            limits:
              cpu: 4
              memory: 4Gi
            requests:
              cpu: 4
              memory: 4Gi
    graph:
      children: []
      endpoint:
        type: REST
      name: classifier
      type: MODEL
    name: main
    replicas: 1
@sumeetgajjar sumeetgajjar changed the title Cannot add volumes of type projected and configMap to a SeldonDeployment simultaneously Cannot create a SeldonDeployment having volumes of type projected and configMap. Nov 7, 2019
@ukclivecox
Copy link
Contributor

Can you try with the latest 0.5.1-SNAPSHOT from master?

@sumeetgajjar
Copy link
Author

I tried the same with 0.5.1-SNAPSHOT, it fails.
But this time it fails giving the following error message.

validation failure list: type in spec.predictors.componentSpecs.spec.volumes.downwardAPI is required type in spec.predictors.componentSpecs.spec.volumes.projected.sources.configMap is required

@ukclivecox
Copy link
Contributor

That is strange. You would need to reinstall Seldon or at least the CRD for this to work. Did you do that or just update the image of the manager?

@sumeetgajjar
Copy link
Author

Turns out, the CRD was not updated.
After updating the CRD, everything works!!!

Thank you for the suggestion. 😄

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

No branches or pull requests

2 participants