seldon-core icon indicating copy to clipboard operation
seldon-core copied to clipboard

Updating PredictorSpec annotations doesn't update Deployment annotations

Open hyunysmile opened this issue 3 years ago • 3 comments

Describe the bug

Annotations of predictor Deployment is copied from PredictorSpec Annotations https://github.com/SeldonIO/seldon-core/blob/d90766da8bfc418c0c339a145cb100e7d8376c58/operator/controllers/seldondeployment_controller.go#L910 But when there is a change on PredictorSpec Annotations, Deployment annotations don't get updated.

To reproduce

  1. Create SeldonDeployment with test-annotation: test in predictors annotations
apiVersion: machinelearning.seldon.io/v1
kind: SeldonDeployment
metadata:
  labels:
    app: seldon
  name: seldon-model
spec:
  name: test-deployment
  predictors:
  - componentSpecs:
    - spec:
        containers:
        - image: seldonio/mock_classifier:1.0
          name: classifier
    annotations:
      seldon.io/svc-name: mysvcname
      test-annotation: test
    graph:
      children: []
      endpoint:
        type: REST
      name: classifier
      type: MODEL
    name: example
    replicas: 1
  1. Check value of the annotation kubectl get deploy seldon-model-example-0-classifier -o jsonpath='{.metadata.annotations.test-annotation}'

  2. Update SeldonDeployment predictors annotations to test-annotation: changed

apiVersion: machinelearning.seldon.io/v1
kind: SeldonDeployment
metadata:
  labels:
    app: seldon
  name: seldon-model
spec:
  name: test-deployment
  predictors:
  - componentSpecs:
    - spec:
        containers:
        - image: seldonio/mock_classifier:1.0
          name: classifier
    annotations:
      seldon.io/svc-name: mysvcname
      test-annotation: changed
    graph:
      children: []
      endpoint:
        type: REST
      name: classifier
      type: MODEL
    name: example
    replicas: 1
  1. Check if the value of the annotation is updated kubectl get deploy seldon-model-example-0-classifier -o jsonpath='{.metadata.annotations.test-annotation}'

  2. Delete deployment and see if recreation of deployment will have proper value. kubectl delete deploy seldon-model-example-0-classifier kubectl get deploy seldon-model-example-0-classifier -o jsonpath='{.metadata.annotations.test-annotation}'

Expected behaviour

Without recreating deployment, I would like to see updated annotations.

Environment

  • Cloud Provider: [e.g. GKE, AWS, Bare Metal, Kind, Minikube] GKE

  • Kubernetes Cluster Version [Output of kubectl version]

Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.9", GitCommit:"b631974d68ac5045e076c86a5c66fba6f128dc72", GitTreeState:"clean", BuildDate:"2022-01-19T17:51:12Z", GoVersion:"go1.16.12", Compiler:"gc", Platform:"darwin/arm64"}
Server Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.11-gke.1100", GitCommit:"20da4c21b3a6b1a56ff6ad5ecb7dee013aaf1b83", GitTreeState:"clean", BuildDate:"2022-04-01T09:40:07Z", GoVersion:"go1.16.15b7", Compiler:"gc", Platform:"linux/amd64"}
  • Deployed Seldon System Images: [Output of kubectl get --namespace seldon-system deploy seldon-controller-manager -o yaml | grep seldonio]
kubectl get --namespace seldon-system deploy seldon-controller-manager -o yaml  | grep seldonio
          value: docker.io/seldonio/seldon-core-executor:1.13.1
        image: docker.io/seldonio/seldon-core-operator:1.13.1

Model Details

  • Images of your model: [Output of: kubectl get seldondeployment -n <yourmodelnamespace> <seldondepname> -o yaml | grep image: where <yourmodelnamespace>]
apiVersion: machinelearning.seldon.io/v1
kind: SeldonDeployment
metadata:
  creationTimestamp: "2022-06-17T09:37:01Z"
  generation: 2
  labels:
    app: seldon
  name: seldon-model
  namespace: review-metal-3613-yibrbd
  resourceVersion: "944309512"
  uid: dacff887-f330-4af0-aee7-76589d49ff92
spec:
  name: test-deployment
  predictors:
  - annotations:
      seldon.io/svc-name: mysvcname
      test-annotation: changed
    componentSpecs:
    - spec:
        containers:
        - image: seldonio/mock_classifier:1.0
          name: classifier
    graph:
      children: []
      endpoint:
        type: REST
      name: classifier
      type: MODEL
    name: example
    replicas: 1

Thank you!

hyunysmile avatar Jun 17 '22 09:06 hyunysmile

This issue is stale because it has been open 10 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Jul 28 '22 02:07 github-actions[bot]

Any update?

hyunysmile avatar Jul 28 '22 07:07 hyunysmile

Not yet - will move to backlog for further evaluation

ukclivecox avatar Jul 28 '22 07:07 ukclivecox