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

(cherry-pick to track/0.13) fix: configure proxy env vars storage init container (#257) #268

Merged

Conversation

NohaIhab
Copy link
Contributor

@NohaIhab NohaIhab commented Aug 19, 2024

backports #257 to track/0.13

Testing the upgrade

  1. Deploy the following bundle:
bundle: kubernetes
name: kubeflow
docs: https://discourse.charmhub.io/t/3749
applications:
  istio-ingressgateway:
    charm: istio-gateway
    channel: 1.22/stable
    scale: 1
    trust: true
    _github_repo_name: istio-operators
    _github_repo_branch: main
    options:
      kind: ingress
  istio-pilot:
    charm: istio-pilot
    channel: 1.22/stable
    scale: 1
    trust: true
    _github_repo_name: istio-operators
    _github_repo_branch: main
    options:
      default-gateway: kubeflow-gateway
  knative-operator:
    charm: knative-operator
    channel: 1.12/stable
    scale: 1
    trust: true
    _github_repo_name: knative-operators
    _github_repo_branch: main
  knative-serving:
    charm: knative-serving
    channel: 1.12/stable
    scale: 1
    trust: true
    options:
      namespace: knative-serving
      istio.gateway.namespace: kubeflow
      istio.gateway.name: kubeflow-gateway
    _github_repo_name: knative-operators
    _github_repo_branch: main
  kserve-controller:
    charm: kserve-controller
    channel: 0.13/stable
    scale: 1
    trust: true
    options:
      deployment-mode: serverless
    _github_repo_name: kserve-operators
    _github_repo_branch: main
relations:
  - [istio-pilot:istio-pilot, istio-ingressgateway:istio-pilot]
  - [kserve-controller:ingress-gateway, istio-pilot:gateway-info]
  - [kserve-controller:local-gateway, knative-serving:local-gateway]
  1. Create a namespace to test with
kubectl create namespace testing
  1. Apply the following sklearn-iris isvc example to testing namespace
apiVersion: "serving.kserve.io/v1beta1"
kind: "InferenceService"
metadata:
  name: "sklearn-v2-iris"
spec:
  predictor:
    model:
      modelFormat:
        name: sklearn
      protocolVersion: v2
      runtime: kserve-sklearnserver
      storageUri: "gs://kfserving-examples/models/sklearn/1.0/model"
      resources:
        limits:
          cpu: 1
          memory: 500Mi
        requests:
          cpu: 100m
          memory: 250Mi
  1. Check isvc is ready
kubectl get isvc -n testing
NAME              URL                                                  READY   PREV   LATEST   PREVROLLEDOUTREVISION   LATESTREADYREVISION               AGE
sklearn-v2-iris   http://sklearn-v2-iris.testing.10.64.140.43.nip.io   True           100                              sklearn-v2-iris-predictor-00001   2m29s
  1. refresh kserve-controller charm to the one from this PR
juju refresh kserve-controller --channel=0.13/edge/pr-268

Results

  • charm went to active after refresh
juju status
Model     Controller          Cloud/Region        Version  SLA          Timestamp
kubeflow  microk8s-localhost  microk8s/localhost  3.4.5    unsupported  10:51:09Z

App                   Version  Status  Scale  Charm              Channel            Rev  Address         Exposed  Message
istio-ingressgateway           active      1  istio-gateway      1.22/stable       1127  10.152.183.176  no       
istio-pilot                    active      1  istio-pilot        1.22/stable       1079  10.152.183.49   no       
knative-operator               active      1  knative-operator   1.12/stable        433  10.152.183.224  no       
knative-serving                active      1  knative-serving    1.12/stable        460  10.152.183.141  no       
kserve-controller              active      1  kserve-controller  0.13/edge/pr-268   619  10.152.183.135  no       

Unit                     Workload  Agent  Address       Ports  Message
istio-ingressgateway/0*  active    idle   10.1.199.206         
istio-pilot/0*           active    idle   10.1.199.207         
knative-operator/0*      active    idle   10.1.199.208         
knative-serving/0*       active    idle   10.1.199.225         
kserve-controller/0*     active    idle   10.1.199.227         
  • isvc created before upgrade is unaffected
kubectl get isvc -n testing
NAME              URL                                                  READY   PREV   LATEST   PREVROLLEDOUTREVISION   LATESTREADYREVISION               AGE
sklearn-v2-iris   http://sklearn-v2-iris.testing.10.64.140.43.nip.io   True           100                              sklearn-v2-iris-predictor-00001   5m11s
  • check the new resource ClusterStorageContainer was created
kubectl get ClusterStorageContainer
NAME      AGE
default   11m
  • check the new charm configs for proxy exist
juju config kserve-controller
application: kserve-controller
application-config: 
...
charm: kserve-controller
settings: 
...
  http-proxy: 
    default: ""
    description: The value of HTTP_PROXY environment variable in the storage-initializer
      container.
    source: default
    type: string
    value: ""
  https-proxy: 
    default: ""
    description: The value of HTTPS_PROXY environment variable in the storage-initializer
      container.
    source: default
    type: string
    value: ""
  no-proxy: 
    default: ""
    description: The value of NO_PROXY environment variable in the storage-initializer
      container.
    source: default
    type: string
    value: ""
...

* fix: add configs for proxy envs in storage-initializer container
* add integration test
* fix: config description
* refactor serverless namespace fixture
* refactor common sklearn example
Copy link
Contributor

@mvlassis mvlassis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

charms/kserve-controller/tests/integration/test_charm.py Outdated Show resolved Hide resolved
Co-authored-by: Manos Vlassis <57320708+mvlassis@users.noreply.github.com>
@NohaIhab NohaIhab merged commit 55e48b5 into track/0.13 Aug 21, 2024
7 checks passed
@NohaIhab NohaIhab deleted the cherrypick-fix-configure-proxy-env-vars-storage-init-0.13 branch August 21, 2024 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants