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

[Bug]Invalid metadata label generated from deployment file #772

Closed
lennon310 opened this issue Aug 9, 2019 · 0 comments · Fixed by SeldonIO/seldon-operator#47
Closed

Comments

@lennon310
Copy link
Contributor

We recently upgrade seldon-core to 0.3.2-SNAPSHOT and I'm seeing deployment failure since then.

The yaml file (It works before):

apiVersion: machinelearning.seldon.io/v1alpha2
kind: SeldonDeployment
metadata:
  labels:
    app: seldon
  name: xgboost
  namespace: seldon-core
spec:
  name: xgboost
  predictors:
  - componentSpecs:
    - spec:
        containers:
          - name: feature-transformer
            image: sem-docker.maven.dev.tripadvisor.com/feature_transformer:0.1
            env:
            - name: TRACING
              value: "1"
            - name: JAEGER_CONFIG_PATH
              value: /etc/tracing/config/tracing.yml
            - name: OMP_NUM_THREADS
              value: "6"
            resources:
              limits:
                cpu: 8
                memory: 4Gi
              requests:
                cpu: 1
                memory: 256Mi
            volumeMounts:
            - mountPath: /etc/tracing/config
              name: tracing-config

          - name: model
            env:
              - name: OMP_NUM_THREADS
                value: "6"
            envFrom:
              - secretRef:
                  name: s3-secret
            resources:
              limits:
                cpu: 8
                memory: 4Gi
              requests:
                cpu: 1
                memory: 256Mi
            volumeMounts:
            - mountPath: /etc/tracing/config
              name: tracing-config
        volumes:
        - name: tracing-config
          configMap:
            name: tracing-config
            items:
            - key: tracing.yml
              path: tracing.yml


    svcOrchSpec:
      env:
        - name: SELDON_LOG_LEVEL
          value: DEBUG
        - name: TRACING
          value: "1"
        - name: JAEGER_SERVICE_NAME
          value: xgboost
        - name: JAEGER_AGENT_HOST
          value: jaeger-agent.seldon-core.svc
        - name: JAEGER_AGENT_PORT
          value: "6831"
        - name: JAEGER_SAMPLER_TYPE
          value: const
        - name: JAEGER_SAMPLER_PARAM
          value: "1"
        - name: JAEGER_PROPAGATION
          value: "B3"
        - name: JAEGER_TAGS
          value: "deployment=xgboost"
      resources:
        limits:
          cpu: 4
          memory: 4Gi
        requests:
          cpu: 500m
          memory: 512Mi

    graph:
      children:
        - children: []
          implementation: XGBOOST_SERVER
          name: model
          modelUri: s3://model-image
          type: MODEL
      endpoint:
        type: REST
      name: feature-transformer
      type: TRANSFORMER
    name: transformer
    replicas: 1

and the error Stacktrace:

{"level":"error","ts":1565330078.7320366,"logger":"kubebuilder.controller","msg":"Reconciler error","controller":"seldondeployment-controller","request":"seldon-core/xgboost","error":"Deployment.apps \"xgboost-transformer-f1b02bb\" is invalid: [metadata.labels: Invalid value: \"xgboost-transformer-model-\": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue',  or 'my_value',  or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?'), spec.selector.matchLabels: Invalid value: \"xgboost-transformer-model-\": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue',  or 'my_value',  or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?'), spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{\"seldon-deployment-id\":\"xgboost-xgboost\", \"seldon-app\":\"xgboost-xgboost-transformer\", \"seldon-app-feature-transformer\":\"seldon-a92a7f27af7a8e7e336f86b4bf7713be\", \"seldon-app-model\":\"xgboost-transformer-model-\"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: invalid label selector]","stacktrace":"github.com/seldonio/seldon-operator/vendor/github.com/go-logr/zapr.(*zapLogger).Error\n\t/go/src/github.com/seldonio/seldon-operator/vendor/github.com/go-logr/zapr/zapr.go:128\ngithub.com/seldonio/seldon-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/src/github.com/seldonio/seldon-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:217\ngithub.com/seldonio/seldon-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func1\n\t/go/src/github.com/seldonio/seldon-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:158\ngithub.com/seldonio/seldon-operator/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1\n\t/go/src/github.com/seldonio/seldon-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:133\ngithub.com/seldonio/seldon-operator/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil\n\t/go/src/github.com/seldonio/seldon-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:134\ngithub.com/seldonio/seldon-operator/vendor/k8s.io/apimachinery/pkg/util/wait.Until\n\t/go/src/github.com/seldonio/seldon-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88"}

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 a pull request may close this issue.

1 participant