Uploaded image for project: 'Red Hat OpenShift Data Science'
  1. Red Hat OpenShift Data Science
  2. RHODS-13930

support proxy when downloading devFlags manifests in ODH v2 operator

XMLWordPrintable

    • Icon: Feature Feature
    • Resolution: Not a Bug
    • Icon: Undefined Undefined
    • None
    • None
    • None
    • False
    • None
    • False
    • Hide

      Deploy.DownloadManifests golang http Context should honor proxy settings / env vars as it did in v1 of the operator for KfDef manifests.url ...

      opendatahub-operator/pkg/deploy/deploy.go at main - opendatahub-io/opendatahub-operator

       

      Show
      Deploy.DownloadManifests golang http Context should honor proxy settings / env vars as it did in v1 of the operator for KfDef manifests.url ... opendatahub-operator/pkg/deploy/deploy.go at main - opendatahub-io/opendatahub-operator  
    • Testable
    • No
    • No
    • Pending
    • None

      I am writing from an ODH 2.22.0 perspective, so feel free to move this issue.

      When downloading devFlags manifests as defined in devFlags of each DataScienceCluster compoent, e.g.

       

       

      kind: DataScienceCluster
      apiVersion: datasciencecluster.opendatahub.io/v1
      metadata:
        name: default-dsc
      spec:
        components:
          dashboard:
            devFlags:
              manifests:
                - contextDir: manifests
                  sourcePath: odh
                  uri: 'https://gitlab.mycompany.com/api/v4/projects/9999/repository/files/odh-dashboard-2.29.2-odh-v2.22.0.tar.gz'
            managementState: Managed
          workbenches:
            devFlags:
              manifests:
                - contextDir: components/odh-notebook-controller/config
                  uri: 'https://gitlab.mycompany.com/api/v4/projects/9999/repository/files/kubeflow-1.9.0-5-odh-v2.22.0.tar.gz'
                  sourcePath: 'base'
                - contextDir: components/notebook-controller/config
                  sourcePath: 'overlays/openshift'
                  uri: 'https://gitlab.mycompany.com/api/v4/projects/9999/repository/files/kubeflow-1.9.0-5-odh-v2.22.0.tar.gz'
                - contextDir: notebooks
                  sourcePath: 'manifests/overlays/additional'
                  uri: 'https://gitlab.mycompany.com/api/v4/projects/9999/repository/files/notebooks-1.27.0-dev-odh-v2.22.0.tar.gz'
            managementState: Managed

      the opendatahub-controller-manager logs do not show any kind of download action at all.

       

      The download url and so on, including access tokens, worked with odh operator v1 KfDef manifests.uri.

      operator-controller-manager pod takes its proxy envs from central cluster config, so that is ok:

             - name: HTTP_PROXY
                value: 'http://myproxy.mycompany.com:9999'
              - name: HTTPS_PROXY
                value: 'http://myproxy.mycompany.com:9999'
              - name: NO_PROXY
                value: '.cluster.local,.ocp4dev.mycompany.com,.svc,.mycompany,com,.internal.mycompany.com,10.0.0.0/16,10.128.0.0/14,10.90.0.0/16,10.94.0.0/16,127.0.0.1,xxxx.30.0.0/16,api-int.ocp4dev.mycompany.com,localhost,ocp4dev.mycompany.com,registry.mycompany.com'
              - name: OPERATOR_CONDITION_NAME
                value: opendatahub-operator.v2.22.0

      Seems like, in contrast to operator v1, Context does not honor proxy, thus not even leading to manifests download or to line "error downloading manifests" in operator log.

      https://github.com/opendatahub-io/opendatahub-operator/blob/main/pkg/deploy/deploy.go#L63

      It is only when I add gitlab.mycompany.com to NO_PROXY that download of component devFlags manifests is even attempted, e.g. leading to operator log:

       

      "error":"error downloading manifests: Get \"https://gitlab.mycompany.com/api/v4/projects/9999/repository/files/odh-dashboard-2.29.2-odh-v2.22.0.tar.gz": dial tcp xxx.xxx.xx.xx:443: i/o timeout"

      This is understandable, direct access to this gitlab is not allowed from a network context ... traffic needs to pass through the proxy.

       

       

       

       

              Unassigned Unassigned
              sven.thoms@inventx.ch Sven Thoms
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: