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.11) fix: configure proxy env vars storage init container (#257) #267

Merged

Conversation

NohaIhab
Copy link
Contributor

@NohaIhab NohaIhab commented Aug 19, 2024

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.17/stable
    scale: 1
    trust: true
    _github_repo_name: istio-operators
    _github_repo_branch: track/1.17
    options:
      kind: ingress
  istio-pilot:
    charm: istio-pilot
    channel: 1.17/stable
    scale: 1
    trust: true
    _github_repo_name: istio-operators
    _github_repo_branch: track/1.17
    options:
      default-gateway: kubeflow-gateway
  knative-eventing:
    charm: knative-eventing
    channel: 1.10/stable
    scale: 1
    trust: true
    options:
      namespace: knative-eventing
    _github_repo_name: knative-operators
    _github_repo_branch: track/1.10
  knative-operator:
    charm: knative-operator
    channel: 1.10/stable
    scale: 1
    trust: true
    _github_repo_name: knative-operators
    _github_repo_branch: track/1.10
  knative-serving:
    charm: knative-serving
    channel: 1.10/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: track/1.10
  kserve-controller:
    charm: kserve-controller
    channel: 0.11/stable
    scale: 1
    trust: true
    _github_repo_name: kserve-operators
    _github_repo_branch: track/0.11
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   29s
  1. refresh kserve-controller charm to the one from this PR
juju refresh kserve-controller --channel=0.11/edge/pr-267

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  15:10:45Z

App                   Version  Status  Scale  Charm              Channel            Rev  Address         Exposed  Message
istio-ingressgateway           active      1  istio-gateway      1.17/stable       1107  10.152.183.248  no       
istio-pilot                    active      1  istio-pilot        1.17/stable       1059  10.152.183.209  no       
knative-eventing               active      1  knative-eventing   1.10/stable        353  10.152.183.210  no       
knative-operator               active      1  knative-operator   1.10/stable        328  10.152.183.53   no       
knative-serving                active      1  knative-serving    1.10/stable        409  10.152.183.166  no       
kserve-controller              active      1  kserve-controller  0.11/edge/pr-267   618  10.152.183.34   no       

Unit                     Workload  Agent  Address       Ports  Message
istio-ingressgateway/0*  active    idle   10.1.199.226         
istio-pilot/0*           active    idle   10.1.199.231         
knative-eventing/0*      active    idle   10.1.199.228         
knative-operator/0*      active    idle   10.1.199.213         
knative-serving/0*       active    idle   10.1.199.222         
kserve-controller/0*     active    idle   10.1.199.240         
  • 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   3m11s
  • check the new resource ClusterStorageContainer was created
kubectl get ClusterStorageContainer
NAME      AGE
default   96s
  • 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
@NohaIhab NohaIhab requested a review from a team as a code owner August 19, 2024 11:08
@NohaIhab NohaIhab changed the title (cherry-pick) fix: configure proxy env vars storage init container (#257) (cherry-pick to track/0.11) fix: configure proxy env vars storage init container (#257) Aug 19, 2024
@NohaIhab NohaIhab merged commit 353aa90 into track/0.11 Aug 20, 2024
7 checks passed
@NohaIhab NohaIhab deleted the cherrypick-fix-configure-proxy-env-vars-storage-init-0.11 branch August 20, 2024 10:15
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