From 5dcc34f08a4004e30785b0e780a008db0a2de7fb Mon Sep 17 00:00:00 2001 From: shalberd Date: Wed, 31 Aug 2022 21:48:25 +0200 Subject: [PATCH 01/10] overlay and readme changes --- jupyterhub/README.md | 26 +++++++++++++++++++ jupyterhub/jupyterhub/base/kustomization.yaml | 9 ++++++- jupyterhub/jupyterhub/base/params.env | 1 + .../overlays/jupyterhub-configmap.yaml | 0 .../jupyterhub/overlays/kustomization.yaml | 0 .../overlays/trusted-cabundle-configmap.yaml | 0 6 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 jupyterhub/jupyterhub/overlays/jupyterhub-configmap.yaml create mode 100644 jupyterhub/jupyterhub/overlays/kustomization.yaml create mode 100644 jupyterhub/jupyterhub/overlays/trusted-cabundle-configmap.yaml diff --git a/jupyterhub/README.md b/jupyterhub/README.md index 837deea0a..a9ed9d5e4 100644 --- a/jupyterhub/README.md +++ b/jupyterhub/README.md @@ -21,6 +21,12 @@ JupyterHub component comes with 2 parameters exposed vie KFDef. HTTP endpoint exposed by your S3 object storage solution which will be made available to JH users in `S3_ENDPOINT_URL` env variable. +#### trusted_ca_bundle_path + +Full path to a non-publicly trusted ca-bundle file. Used to fill `TRUSTED_CA_BUNDLE_PATH` env variable containing the full path incl. filename to one or more trusted CAs in [Privacy-Enhanced Mail (PEM) file](https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail) format. For use in airgapped environments where SSL server authenticity can only be validated using certificates based on private public key infrastructure (PKI) with root and optionally intermediate certificate authorities (CAs) that are not publicly trusted. Specifically used for example by Elyra for downloading package catalog files from an airgapped e.g. Artifactory or Nexus with private PKI and establishing the SSL chain of trust. See e.g. on-premise Openshift installs with additionalTrustBundle setting that can be injected into configmaps at a namespace for usage on containers. +https://docs.openshift.com/container-platform/4.8/networking/configuring-a-custom-pki.html +This requires `trusted-ca-bundle-path` **overlay** to be enabled as well to work. + #### storage_class Name of the storage class to be used for PVCs created by JupyterHub component. This requires `storage-class` **overlay** to be enabled as well to work. @@ -49,6 +55,22 @@ A Secret containing configuration values like JupyterHub DB password or COOKIE_S path: jupyterhub/jupyterhub name: jupyterhub ``` +#### trusted_ca_bundle_path in conjunction with S3 storage for Elyra Pipelines metadata and HTTP-location-based built-in catalog connectors (URL catalog, Apache Airflow package connector, Apache Airflow provider package connector). With this overlay, url download is made possible with optional verify parameter pointing to private PKI CA bundle file in env parameter TRUSTED_CA_BUNDLE_PATH) + +```yaml + - kustomizeConfig: + overlays: + - trusted-ca-bundle-path + parameters: + - name: trusted_ca_bundle_path + value: "/opt/app-root/etc/jupyter/custom/cacerts/trustedcas.pem" + - name: s3_endpoint_url + value: "http://ceph-nano-0" + repoRef: + name: manifests + path: jupyterhub/jupyterhub + name: jupyterhub +``` ### Overlays @@ -62,6 +84,10 @@ Contains build manifests for JupyterHub images. Customizes JupyterHub to use a specific `StorageClass` for PVCs, see `storage_class` parameter. +#### trusted-ca-bundle-path + +Customizes JupyterHub to use a specific ENV variable in TRUSTED_CA_BUNDLE_PATH in spawned notebook images. See `trusted_ca_bundle_path` parameter. The ENV variable is used in configmap jupyter-singleuser-profiles, if parameter is defined. + ## Notebook Images Contains manifests for Jupyter notebook images compatible with JupyterHub on OpenShift. diff --git a/jupyterhub/jupyterhub/base/kustomization.yaml b/jupyterhub/jupyterhub/base/kustomization.yaml index 82830a39c..8bb61e2bf 100644 --- a/jupyterhub/jupyterhub/base/kustomization.yaml +++ b/jupyterhub/jupyterhub/base/kustomization.yaml @@ -37,7 +37,7 @@ commonLabels: configMapGenerator: - name: parameters - envs: + envs: - params.env generatorOptions: disableNameSuffixHash: true @@ -63,6 +63,13 @@ vars: apiVersion: v1 fieldref: fieldpath: data.s3_endpoint_url +- name: trusted_ca_bundle_path + objref: + kind: ConfigMap + name: parameters + apiVersion: v1 + fieldref: + fieldpath: data.trusted_ca_bundle_path - name: jupyterhub_groups_config objref: kind: ConfigMap diff --git a/jupyterhub/jupyterhub/base/params.env b/jupyterhub/jupyterhub/base/params.env index 5c96867a5..d33a14d06 100644 --- a/jupyterhub/jupyterhub/base/params.env +++ b/jupyterhub/jupyterhub/base/params.env @@ -1,5 +1,6 @@ storage_class= s3_endpoint_url= +trusted_ca_bundle_path= jupyterhub_groups_config=jupyterhub-default-groups-config jupyterhub_secret=jupyterhub notebook_destination= diff --git a/jupyterhub/jupyterhub/overlays/jupyterhub-configmap.yaml b/jupyterhub/jupyterhub/overlays/jupyterhub-configmap.yaml new file mode 100644 index 000000000..e69de29bb diff --git a/jupyterhub/jupyterhub/overlays/kustomization.yaml b/jupyterhub/jupyterhub/overlays/kustomization.yaml new file mode 100644 index 000000000..e69de29bb diff --git a/jupyterhub/jupyterhub/overlays/trusted-cabundle-configmap.yaml b/jupyterhub/jupyterhub/overlays/trusted-cabundle-configmap.yaml new file mode 100644 index 000000000..e69de29bb From 4da67f83d41bcda7cc6cb58d2807b17f4514c19c Mon Sep 17 00:00:00 2001 From: shalberd Date: Wed, 31 Aug 2022 21:57:03 +0200 Subject: [PATCH 02/10] jupyterhub singleuser configmap add env TRUSTED_CA_BUNDLE_PATH --- .../base/jupyterhub-singleuser-profiles-configmap.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jupyterhub/jupyterhub/base/jupyterhub-singleuser-profiles-configmap.yaml b/jupyterhub/jupyterhub/base/jupyterhub-singleuser-profiles-configmap.yaml index 121846e7a..c207f4559 100644 --- a/jupyterhub/jupyterhub/base/jupyterhub-singleuser-profiles-configmap.yaml +++ b/jupyterhub/jupyterhub/base/jupyterhub-singleuser-profiles-configmap.yaml @@ -9,6 +9,8 @@ data: env: - name: S3_ENDPOINT_URL value: $(s3_endpoint_url) + - name: TRUSTED_CA_BUNDLE_PATH + value: $(trusted_ca_bundle_path) resources: requests: memory: 1Gi From 5c925a4647f4b562659b06b07451c3ce72a504be Mon Sep 17 00:00:00 2001 From: shalberd Date: Wed, 31 Aug 2022 22:10:58 +0200 Subject: [PATCH 03/10] added files in overlay --- .../build/jupyterhub-buildconfig.yaml | 26 ++++++++ .../jupyterhub/build/jupyterhub-dc.yaml | 7 +++ .../build/jupyterhub-dh-buildconfig.yaml | 24 ++++++++ .../build/jupyterhub-imagestream.yaml | 8 +++ .../build/jupyterhub-img-imagestream.yaml | 8 +++ .../jupyterhub/build/kustomization.yaml | 22 +++++++ .../deploymentconfig.yaml | 57 ++++++++++++++++++ .../jupyterhub-idle-culler/kustomization.yaml | 10 ++++ .../storage-class/jupyterhub-configmap.yaml | 3 + .../storage-class/jupyterhub-db-pvc.yaml | 4 ++ .../storage-class/jupyterhub-dc.yaml | 8 +++ .../storage-class/kustomization.yaml | 23 ++++++++ .../jupyterhub-configmap.yaml | 59 +++++++++++++++++++ .../trusted-ca-bundle-path/kustomization.yaml | 11 ++++ .../trusted-cabundle-configmap.yaml | 6 ++ 15 files changed, 276 insertions(+) create mode 100644 jupyterhub/jupyterhub/build/jupyterhub-buildconfig.yaml create mode 100644 jupyterhub/jupyterhub/build/jupyterhub-dc.yaml create mode 100644 jupyterhub/jupyterhub/build/jupyterhub-dh-buildconfig.yaml create mode 100644 jupyterhub/jupyterhub/build/jupyterhub-imagestream.yaml create mode 100644 jupyterhub/jupyterhub/build/jupyterhub-img-imagestream.yaml create mode 100644 jupyterhub/jupyterhub/build/kustomization.yaml create mode 100644 jupyterhub/jupyterhub/jupyterhub-idle-culler/deploymentconfig.yaml create mode 100644 jupyterhub/jupyterhub/jupyterhub-idle-culler/kustomization.yaml create mode 100644 jupyterhub/jupyterhub/storage-class/jupyterhub-configmap.yaml create mode 100644 jupyterhub/jupyterhub/storage-class/jupyterhub-db-pvc.yaml create mode 100644 jupyterhub/jupyterhub/storage-class/jupyterhub-dc.yaml create mode 100644 jupyterhub/jupyterhub/storage-class/kustomization.yaml create mode 100644 jupyterhub/jupyterhub/trusted-ca-bundle-path/jupyterhub-configmap.yaml create mode 100644 jupyterhub/jupyterhub/trusted-ca-bundle-path/kustomization.yaml create mode 100644 jupyterhub/jupyterhub/trusted-ca-bundle-path/trusted-cabundle-configmap.yaml diff --git a/jupyterhub/jupyterhub/build/jupyterhub-buildconfig.yaml b/jupyterhub/jupyterhub/build/jupyterhub-buildconfig.yaml new file mode 100644 index 000000000..53ee05062 --- /dev/null +++ b/jupyterhub/jupyterhub/build/jupyterhub-buildconfig.yaml @@ -0,0 +1,26 @@ +apiVersion: build.openshift.io/v1 +kind: BuildConfig +metadata: + labels: + app: jupyterhub + build: jupyterhub + name: jupyterhub +spec: + output: + to: + kind: ImageStreamTag + name: jupyterhub:latest + source: + git: + ref: v3.5.3 + uri: https://github.com/opendatahub-io/jupyterhub-quickstart.git + type: Git + strategy: + sourceStrategy: + forcePull: true + from: + kind: DockerImage + name: registry.access.redhat.com/ubi7/python-36 + type: Source + triggers: + - type: ConfigChange diff --git a/jupyterhub/jupyterhub/build/jupyterhub-dc.yaml b/jupyterhub/jupyterhub/build/jupyterhub-dc.yaml new file mode 100644 index 000000000..02ad379fd --- /dev/null +++ b/jupyterhub/jupyterhub/build/jupyterhub-dc.yaml @@ -0,0 +1,7 @@ +- op: replace + path: /spec/template/spec/containers/0/image + value: jupyterhub-img:latest + +- op: replace + path: /spec/template/spec/initContainers/0/image + value: jupyterhub-img:latest diff --git a/jupyterhub/jupyterhub/build/jupyterhub-dh-buildconfig.yaml b/jupyterhub/jupyterhub/build/jupyterhub-dh-buildconfig.yaml new file mode 100644 index 000000000..709be52bf --- /dev/null +++ b/jupyterhub/jupyterhub/build/jupyterhub-dh-buildconfig.yaml @@ -0,0 +1,24 @@ +apiVersion: build.openshift.io/v1 +kind: BuildConfig +metadata: + labels: + app: jupyterhub + name: jupyterhub-img +spec: + output: + to: + kind: ImageStreamTag + name: jupyterhub-img:latest + source: + git: + uri: https://github.com/opendatahub-io/jupyterhub-odh + type: Git + strategy: + sourceStrategy: + from: + kind: ImageStreamTag + name: jupyterhub:latest + type: Source + triggers: + - type: ConfigChange + - type: ImageChange diff --git a/jupyterhub/jupyterhub/build/jupyterhub-imagestream.yaml b/jupyterhub/jupyterhub/build/jupyterhub-imagestream.yaml new file mode 100644 index 000000000..c2a79b5eb --- /dev/null +++ b/jupyterhub/jupyterhub/build/jupyterhub-imagestream.yaml @@ -0,0 +1,8 @@ +apiVersion: image.openshift.io/v1 +kind: ImageStream +metadata: + labels: {} + name: jupyterhub +spec: + lookupPolicy: + local: true diff --git a/jupyterhub/jupyterhub/build/jupyterhub-img-imagestream.yaml b/jupyterhub/jupyterhub/build/jupyterhub-img-imagestream.yaml new file mode 100644 index 000000000..9e3079c3f --- /dev/null +++ b/jupyterhub/jupyterhub/build/jupyterhub-img-imagestream.yaml @@ -0,0 +1,8 @@ +apiVersion: image.openshift.io/v1 +kind: ImageStream +metadata: + labels: {} + name: jupyterhub-img +spec: + lookupPolicy: + local: true diff --git a/jupyterhub/jupyterhub/build/kustomization.yaml b/jupyterhub/jupyterhub/build/kustomization.yaml new file mode 100644 index 000000000..ca41d883e --- /dev/null +++ b/jupyterhub/jupyterhub/build/kustomization.yaml @@ -0,0 +1,22 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +bases: +- ../../base +resources: +- jupyterhub-imagestream.yaml +- jupyterhub-img-imagestream.yaml +- jupyterhub-buildconfig.yaml +- jupyterhub-dh-buildconfig.yaml + +commonLabels: + opendatahub.io/component: "true" + component.opendatahub.io/name: jupyterhub + app.kubernetes.io/part-of: jupyterhub + +patchesJson6902: + - path: jupyterhub-dc.yaml + target: + group: apps.openshift.io + version: v1 + kind: DeploymentConfig + name: jupyterhub diff --git a/jupyterhub/jupyterhub/jupyterhub-idle-culler/deploymentconfig.yaml b/jupyterhub/jupyterhub/jupyterhub-idle-culler/deploymentconfig.yaml new file mode 100644 index 000000000..bce3439e6 --- /dev/null +++ b/jupyterhub/jupyterhub/jupyterhub-idle-culler/deploymentconfig.yaml @@ -0,0 +1,57 @@ +apiVersion: apps.openshift.io/v1 +kind: DeploymentConfig +metadata: + name: jupyterhub-idle-culler +spec: + selector: + app: jupyterhub-idle-culler + replicas: 1 + template: + metadata: + labels: + app: jupyterhub-idle-culler + spec: + initContainers: + - name: check-for-jh + image: 'quay.io/odh-jupyterhub/jupyterhub-img:v0.3.3' + command: + - /bin/sh + - '-c' + - 'while ! curl jupyterhub:8081/hub/api; do sleep 5; done' + resources: + limits: + cpu: 150m + memory: 50Mi + requests: + cpu: 150m + memory: 20Mi + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + imagePullPolicy: IfNotPresent + containers: + - name: jupyterhub-idle-culler + image: quay.io/odh-jupyterhub/jupyterhub-img:v0.3.5 + env: + - name: JUPYTERHUB_API_TOKEN + valueFrom: + secretKeyRef: + name: jupyterhub-idle-culler + key: token + - name: CULLER_TIMEOUT + valueFrom: + configMapKeyRef: + name: jupyterhub-cfg + key: culler_timeout + resources: + limits: + cpu: 150m + memory: 50Mi + requests: + cpu: 150m + memory: 50Mi + command: + - jupyterhub-idle-culler + - --timeout=$(CULLER_TIMEOUT) # in seconds + - --url=jupyterhub:8081/hub/api + triggers: + - type: ConfigChange diff --git a/jupyterhub/jupyterhub/jupyterhub-idle-culler/kustomization.yaml b/jupyterhub/jupyterhub/jupyterhub-idle-culler/kustomization.yaml new file mode 100644 index 000000000..2bc7848fe --- /dev/null +++ b/jupyterhub/jupyterhub/jupyterhub-idle-culler/kustomization.yaml @@ -0,0 +1,10 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +commonLabels: + app.kubernetes.io/part-of: jupyterhub + +bases: + - ../../base +resources: + - ./deploymentconfig.yaml diff --git a/jupyterhub/jupyterhub/storage-class/jupyterhub-configmap.yaml b/jupyterhub/jupyterhub/storage-class/jupyterhub-configmap.yaml new file mode 100644 index 000000000..b079ce06a --- /dev/null +++ b/jupyterhub/jupyterhub/storage-class/jupyterhub-configmap.yaml @@ -0,0 +1,3 @@ +- op: add + path: /data/storage_class + value: "$(storage_class)" diff --git a/jupyterhub/jupyterhub/storage-class/jupyterhub-db-pvc.yaml b/jupyterhub/jupyterhub/storage-class/jupyterhub-db-pvc.yaml new file mode 100644 index 000000000..e39809134 --- /dev/null +++ b/jupyterhub/jupyterhub/storage-class/jupyterhub-db-pvc.yaml @@ -0,0 +1,4 @@ +- op: add + path: /metadata/annotations + value: + volume.beta.kubernetes.io/storage-class: "$(storage_class)" diff --git a/jupyterhub/jupyterhub/storage-class/jupyterhub-dc.yaml b/jupyterhub/jupyterhub/storage-class/jupyterhub-dc.yaml new file mode 100644 index 000000000..cc7482e94 --- /dev/null +++ b/jupyterhub/jupyterhub/storage-class/jupyterhub-dc.yaml @@ -0,0 +1,8 @@ +- op: add + path: /spec/template/spec/containers/0/env/- + value: + name: JUPYTERHUB_STORAGE_CLASS + valueFrom: + configMapKeyRef: + name: jupyterhub-cfg + key: storage_class diff --git a/jupyterhub/jupyterhub/storage-class/kustomization.yaml b/jupyterhub/jupyterhub/storage-class/kustomization.yaml new file mode 100644 index 000000000..68a9f53e7 --- /dev/null +++ b/jupyterhub/jupyterhub/storage-class/kustomization.yaml @@ -0,0 +1,23 @@ + +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +bases: +- ../../base +#resources: +patchesJson6902: +- target: + kind: PersistentVolumeClaim + version: v1 + name: jupyterhub-db + path: jupyterhub-db-pvc.yaml +- target: + kind: ConfigMap + version: v1 + name: jupyterhub-cfg + path: jupyterhub-configmap.yaml +- target: + group: apps.openshift.io + kind: DeploymentConfig + version: v1 + name: jupyterhub + path: jupyterhub-dc.yaml diff --git a/jupyterhub/jupyterhub/trusted-ca-bundle-path/jupyterhub-configmap.yaml b/jupyterhub/jupyterhub/trusted-ca-bundle-path/jupyterhub-configmap.yaml new file mode 100644 index 000000000..e271c564e --- /dev/null +++ b/jupyterhub/jupyterhub/trusted-ca-bundle-path/jupyterhub-configmap.yaml @@ -0,0 +1,59 @@ +- op: replace + path: /data/jupyterhub_config.py + value: |- + if "TRUSTED_CA_BUNDLE_PATH" in os.environ: + TRUSTED_CA_BUNDLE_PATH = os.environ.get("TRUSTED_CA_BUNDLE_PATH") + basepath, filename = os.path.split({TRUSTED_CA_BUNDLE_PATH}) + spawner = c.OpenShiftSpawner + + def custom_apply_pod_profile(spawner, pod): + """ + Example function for overriding JupyterHub server functionality to modify the user notebook Pod spec + + Should only be called via a function referenced by spawner.modify_pod_hook + See https://jupyterhub-kubespawner.readthedocs.io/en/latest/spawner.html + """ + # Apply profile from singleuser-profiles. REQUIRED since we want to extend the current pod spec + # configs supported by the JH server + apply_pod_profile(spawner, pod) + + print("custom apply pod profile ...") + # make pod volume definition from optional CA configmap trusted-cabundle. + trustedCAVolume = client.V1Volume( + name="trusted-cas-volume", + config_map=client.V1ConfigMapVolumeSource( + name="trusted-cabundle", + optional=True, + items=[client.V1KeyToPath(key="ca-bundle.crt", path="trustedcas.pem")], + ) + ) + + print("existing container volume mounts ") + print (str(pod.spec.containers[0].volume_mounts)[1:-1]) + newVolumesList = [trustedCAVolume] + + if pod.spec.volumes is None: + print("pod def has no volumes yet") + pod.spec.volumes = newVolumesList + else: + print("extending pod def volumes with configmap volume") + pod.spec.volumes.extend(newVolumesList) + + print("extending container volume mounts for ca cert configmap") + newVolumeMount = client.V1VolumeMount(mount_path=basepath, name="trusted-cas-volume", read_only=True) + newVolumeMountList = [newVolumeMount] + + # Inject extraVolumeMount + if pod.spec.containers[0].volume_mounts is None: + print("notebook container def has no volumes mounted yet") + pod.spec.containers[0].volume_mounts = newVolumeMountList + else: + print("extending existing container def volume mounts section with configmap volume mount reference") + pod.spec.containers[0].volume_mounts.extend(newVolumeMountList) + + print("new container volume mounts ") + print (str(pod.spec.containers[0].volume_mounts)[1:-1]) + + return pod + + spawner.modify_pod_hook = custom_apply_pod_profile diff --git a/jupyterhub/jupyterhub/trusted-ca-bundle-path/kustomization.yaml b/jupyterhub/jupyterhub/trusted-ca-bundle-path/kustomization.yaml new file mode 100644 index 000000000..887d78064 --- /dev/null +++ b/jupyterhub/jupyterhub/trusted-ca-bundle-path/kustomization.yaml @@ -0,0 +1,11 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +commonLabels: + app.kubernetes.io/part-of: jupyterhub + +bases: + - ../../base +resources: + - ./trusted-cabundle-configmap.yaml + - ./jupyterhub-configmap.yaml diff --git a/jupyterhub/jupyterhub/trusted-ca-bundle-path/trusted-cabundle-configmap.yaml b/jupyterhub/jupyterhub/trusted-ca-bundle-path/trusted-cabundle-configmap.yaml new file mode 100644 index 000000000..9db5c7578 --- /dev/null +++ b/jupyterhub/jupyterhub/trusted-ca-bundle-path/trusted-cabundle-configmap.yaml @@ -0,0 +1,6 @@ +kind: ConfigMap +apiVersion: v1 +metadata: + name: trusted-cabundle + labels: + config.openshift.io/inject-trusted-cabundle: 'true' From 56a4e9917e31c97f9328bd32ca4f1d96cb4a929a Mon Sep 17 00:00:00 2001 From: shalberd Date: Wed, 31 Aug 2022 22:15:12 +0200 Subject: [PATCH 04/10] delete build directory from wrong subfolder --- .../build/jupyterhub-buildconfig.yaml | 26 ------------------- .../jupyterhub/build/jupyterhub-dc.yaml | 7 ----- .../build/jupyterhub-dh-buildconfig.yaml | 24 ----------------- .../build/jupyterhub-imagestream.yaml | 8 ------ .../build/jupyterhub-img-imagestream.yaml | 8 ------ .../jupyterhub/build/kustomization.yaml | 22 ---------------- 6 files changed, 95 deletions(-) delete mode 100644 jupyterhub/jupyterhub/build/jupyterhub-buildconfig.yaml delete mode 100644 jupyterhub/jupyterhub/build/jupyterhub-dc.yaml delete mode 100644 jupyterhub/jupyterhub/build/jupyterhub-dh-buildconfig.yaml delete mode 100644 jupyterhub/jupyterhub/build/jupyterhub-imagestream.yaml delete mode 100644 jupyterhub/jupyterhub/build/jupyterhub-img-imagestream.yaml delete mode 100644 jupyterhub/jupyterhub/build/kustomization.yaml diff --git a/jupyterhub/jupyterhub/build/jupyterhub-buildconfig.yaml b/jupyterhub/jupyterhub/build/jupyterhub-buildconfig.yaml deleted file mode 100644 index 53ee05062..000000000 --- a/jupyterhub/jupyterhub/build/jupyterhub-buildconfig.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: build.openshift.io/v1 -kind: BuildConfig -metadata: - labels: - app: jupyterhub - build: jupyterhub - name: jupyterhub -spec: - output: - to: - kind: ImageStreamTag - name: jupyterhub:latest - source: - git: - ref: v3.5.3 - uri: https://github.com/opendatahub-io/jupyterhub-quickstart.git - type: Git - strategy: - sourceStrategy: - forcePull: true - from: - kind: DockerImage - name: registry.access.redhat.com/ubi7/python-36 - type: Source - triggers: - - type: ConfigChange diff --git a/jupyterhub/jupyterhub/build/jupyterhub-dc.yaml b/jupyterhub/jupyterhub/build/jupyterhub-dc.yaml deleted file mode 100644 index 02ad379fd..000000000 --- a/jupyterhub/jupyterhub/build/jupyterhub-dc.yaml +++ /dev/null @@ -1,7 +0,0 @@ -- op: replace - path: /spec/template/spec/containers/0/image - value: jupyterhub-img:latest - -- op: replace - path: /spec/template/spec/initContainers/0/image - value: jupyterhub-img:latest diff --git a/jupyterhub/jupyterhub/build/jupyterhub-dh-buildconfig.yaml b/jupyterhub/jupyterhub/build/jupyterhub-dh-buildconfig.yaml deleted file mode 100644 index 709be52bf..000000000 --- a/jupyterhub/jupyterhub/build/jupyterhub-dh-buildconfig.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: build.openshift.io/v1 -kind: BuildConfig -metadata: - labels: - app: jupyterhub - name: jupyterhub-img -spec: - output: - to: - kind: ImageStreamTag - name: jupyterhub-img:latest - source: - git: - uri: https://github.com/opendatahub-io/jupyterhub-odh - type: Git - strategy: - sourceStrategy: - from: - kind: ImageStreamTag - name: jupyterhub:latest - type: Source - triggers: - - type: ConfigChange - - type: ImageChange diff --git a/jupyterhub/jupyterhub/build/jupyterhub-imagestream.yaml b/jupyterhub/jupyterhub/build/jupyterhub-imagestream.yaml deleted file mode 100644 index c2a79b5eb..000000000 --- a/jupyterhub/jupyterhub/build/jupyterhub-imagestream.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: image.openshift.io/v1 -kind: ImageStream -metadata: - labels: {} - name: jupyterhub -spec: - lookupPolicy: - local: true diff --git a/jupyterhub/jupyterhub/build/jupyterhub-img-imagestream.yaml b/jupyterhub/jupyterhub/build/jupyterhub-img-imagestream.yaml deleted file mode 100644 index 9e3079c3f..000000000 --- a/jupyterhub/jupyterhub/build/jupyterhub-img-imagestream.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: image.openshift.io/v1 -kind: ImageStream -metadata: - labels: {} - name: jupyterhub-img -spec: - lookupPolicy: - local: true diff --git a/jupyterhub/jupyterhub/build/kustomization.yaml b/jupyterhub/jupyterhub/build/kustomization.yaml deleted file mode 100644 index ca41d883e..000000000 --- a/jupyterhub/jupyterhub/build/kustomization.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -bases: -- ../../base -resources: -- jupyterhub-imagestream.yaml -- jupyterhub-img-imagestream.yaml -- jupyterhub-buildconfig.yaml -- jupyterhub-dh-buildconfig.yaml - -commonLabels: - opendatahub.io/component: "true" - component.opendatahub.io/name: jupyterhub - app.kubernetes.io/part-of: jupyterhub - -patchesJson6902: - - path: jupyterhub-dc.yaml - target: - group: apps.openshift.io - version: v1 - kind: DeploymentConfig - name: jupyterhub From 7705b774cd9b95160c60ec5821f7006367497107 Mon Sep 17 00:00:00 2001 From: shalberd Date: Wed, 31 Aug 2022 22:23:18 +0200 Subject: [PATCH 05/10] removed mess in folder structure --- .../deploymentconfig.yaml | 57 ------------------- .../jupyterhub-idle-culler/kustomization.yaml | 10 ---- .../overlays/jupyterhub-configmap.yaml | 0 .../jupyterhub/overlays/kustomization.yaml | 0 .../jupyterhub-configmap.yaml | 0 .../trusted-ca-bundle-path/kustomization.yaml | 0 .../trusted-cabundle-configmap.yaml | 0 .../overlays/trusted-cabundle-configmap.yaml | 0 .../storage-class/jupyterhub-configmap.yaml | 3 - .../storage-class/jupyterhub-db-pvc.yaml | 4 -- .../storage-class/jupyterhub-dc.yaml | 8 --- .../storage-class/kustomization.yaml | 23 -------- 12 files changed, 105 deletions(-) delete mode 100644 jupyterhub/jupyterhub/jupyterhub-idle-culler/deploymentconfig.yaml delete mode 100644 jupyterhub/jupyterhub/jupyterhub-idle-culler/kustomization.yaml delete mode 100644 jupyterhub/jupyterhub/overlays/jupyterhub-configmap.yaml delete mode 100644 jupyterhub/jupyterhub/overlays/kustomization.yaml rename jupyterhub/jupyterhub/{ => overlays}/trusted-ca-bundle-path/jupyterhub-configmap.yaml (100%) rename jupyterhub/jupyterhub/{ => overlays}/trusted-ca-bundle-path/kustomization.yaml (100%) rename jupyterhub/jupyterhub/{ => overlays}/trusted-ca-bundle-path/trusted-cabundle-configmap.yaml (100%) delete mode 100644 jupyterhub/jupyterhub/overlays/trusted-cabundle-configmap.yaml delete mode 100644 jupyterhub/jupyterhub/storage-class/jupyterhub-configmap.yaml delete mode 100644 jupyterhub/jupyterhub/storage-class/jupyterhub-db-pvc.yaml delete mode 100644 jupyterhub/jupyterhub/storage-class/jupyterhub-dc.yaml delete mode 100644 jupyterhub/jupyterhub/storage-class/kustomization.yaml diff --git a/jupyterhub/jupyterhub/jupyterhub-idle-culler/deploymentconfig.yaml b/jupyterhub/jupyterhub/jupyterhub-idle-culler/deploymentconfig.yaml deleted file mode 100644 index bce3439e6..000000000 --- a/jupyterhub/jupyterhub/jupyterhub-idle-culler/deploymentconfig.yaml +++ /dev/null @@ -1,57 +0,0 @@ -apiVersion: apps.openshift.io/v1 -kind: DeploymentConfig -metadata: - name: jupyterhub-idle-culler -spec: - selector: - app: jupyterhub-idle-culler - replicas: 1 - template: - metadata: - labels: - app: jupyterhub-idle-culler - spec: - initContainers: - - name: check-for-jh - image: 'quay.io/odh-jupyterhub/jupyterhub-img:v0.3.3' - command: - - /bin/sh - - '-c' - - 'while ! curl jupyterhub:8081/hub/api; do sleep 5; done' - resources: - limits: - cpu: 150m - memory: 50Mi - requests: - cpu: 150m - memory: 20Mi - terminationMessagePath: /dev/termination-log - terminationMessagePolicy: File - imagePullPolicy: IfNotPresent - containers: - - name: jupyterhub-idle-culler - image: quay.io/odh-jupyterhub/jupyterhub-img:v0.3.5 - env: - - name: JUPYTERHUB_API_TOKEN - valueFrom: - secretKeyRef: - name: jupyterhub-idle-culler - key: token - - name: CULLER_TIMEOUT - valueFrom: - configMapKeyRef: - name: jupyterhub-cfg - key: culler_timeout - resources: - limits: - cpu: 150m - memory: 50Mi - requests: - cpu: 150m - memory: 50Mi - command: - - jupyterhub-idle-culler - - --timeout=$(CULLER_TIMEOUT) # in seconds - - --url=jupyterhub:8081/hub/api - triggers: - - type: ConfigChange diff --git a/jupyterhub/jupyterhub/jupyterhub-idle-culler/kustomization.yaml b/jupyterhub/jupyterhub/jupyterhub-idle-culler/kustomization.yaml deleted file mode 100644 index 2bc7848fe..000000000 --- a/jupyterhub/jupyterhub/jupyterhub-idle-culler/kustomization.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -commonLabels: - app.kubernetes.io/part-of: jupyterhub - -bases: - - ../../base -resources: - - ./deploymentconfig.yaml diff --git a/jupyterhub/jupyterhub/overlays/jupyterhub-configmap.yaml b/jupyterhub/jupyterhub/overlays/jupyterhub-configmap.yaml deleted file mode 100644 index e69de29bb..000000000 diff --git a/jupyterhub/jupyterhub/overlays/kustomization.yaml b/jupyterhub/jupyterhub/overlays/kustomization.yaml deleted file mode 100644 index e69de29bb..000000000 diff --git a/jupyterhub/jupyterhub/trusted-ca-bundle-path/jupyterhub-configmap.yaml b/jupyterhub/jupyterhub/overlays/trusted-ca-bundle-path/jupyterhub-configmap.yaml similarity index 100% rename from jupyterhub/jupyterhub/trusted-ca-bundle-path/jupyterhub-configmap.yaml rename to jupyterhub/jupyterhub/overlays/trusted-ca-bundle-path/jupyterhub-configmap.yaml diff --git a/jupyterhub/jupyterhub/trusted-ca-bundle-path/kustomization.yaml b/jupyterhub/jupyterhub/overlays/trusted-ca-bundle-path/kustomization.yaml similarity index 100% rename from jupyterhub/jupyterhub/trusted-ca-bundle-path/kustomization.yaml rename to jupyterhub/jupyterhub/overlays/trusted-ca-bundle-path/kustomization.yaml diff --git a/jupyterhub/jupyterhub/trusted-ca-bundle-path/trusted-cabundle-configmap.yaml b/jupyterhub/jupyterhub/overlays/trusted-ca-bundle-path/trusted-cabundle-configmap.yaml similarity index 100% rename from jupyterhub/jupyterhub/trusted-ca-bundle-path/trusted-cabundle-configmap.yaml rename to jupyterhub/jupyterhub/overlays/trusted-ca-bundle-path/trusted-cabundle-configmap.yaml diff --git a/jupyterhub/jupyterhub/overlays/trusted-cabundle-configmap.yaml b/jupyterhub/jupyterhub/overlays/trusted-cabundle-configmap.yaml deleted file mode 100644 index e69de29bb..000000000 diff --git a/jupyterhub/jupyterhub/storage-class/jupyterhub-configmap.yaml b/jupyterhub/jupyterhub/storage-class/jupyterhub-configmap.yaml deleted file mode 100644 index b079ce06a..000000000 --- a/jupyterhub/jupyterhub/storage-class/jupyterhub-configmap.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- op: add - path: /data/storage_class - value: "$(storage_class)" diff --git a/jupyterhub/jupyterhub/storage-class/jupyterhub-db-pvc.yaml b/jupyterhub/jupyterhub/storage-class/jupyterhub-db-pvc.yaml deleted file mode 100644 index e39809134..000000000 --- a/jupyterhub/jupyterhub/storage-class/jupyterhub-db-pvc.yaml +++ /dev/null @@ -1,4 +0,0 @@ -- op: add - path: /metadata/annotations - value: - volume.beta.kubernetes.io/storage-class: "$(storage_class)" diff --git a/jupyterhub/jupyterhub/storage-class/jupyterhub-dc.yaml b/jupyterhub/jupyterhub/storage-class/jupyterhub-dc.yaml deleted file mode 100644 index cc7482e94..000000000 --- a/jupyterhub/jupyterhub/storage-class/jupyterhub-dc.yaml +++ /dev/null @@ -1,8 +0,0 @@ -- op: add - path: /spec/template/spec/containers/0/env/- - value: - name: JUPYTERHUB_STORAGE_CLASS - valueFrom: - configMapKeyRef: - name: jupyterhub-cfg - key: storage_class diff --git a/jupyterhub/jupyterhub/storage-class/kustomization.yaml b/jupyterhub/jupyterhub/storage-class/kustomization.yaml deleted file mode 100644 index 68a9f53e7..000000000 --- a/jupyterhub/jupyterhub/storage-class/kustomization.yaml +++ /dev/null @@ -1,23 +0,0 @@ - -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -bases: -- ../../base -#resources: -patchesJson6902: -- target: - kind: PersistentVolumeClaim - version: v1 - name: jupyterhub-db - path: jupyterhub-db-pvc.yaml -- target: - kind: ConfigMap - version: v1 - name: jupyterhub-cfg - path: jupyterhub-configmap.yaml -- target: - group: apps.openshift.io - kind: DeploymentConfig - version: v1 - name: jupyterhub - path: jupyterhub-dc.yaml From 45933f42b523bff1a510be01388a7c431a9bb2ca Mon Sep 17 00:00:00 2001 From: shalberd Date: Thu, 1 Sep 2022 09:45:17 +0200 Subject: [PATCH 06/10] moved new env add from base singleuser configmap to overlay. added correct json merge section for jupyterhub singleuser and jupyterhub-cfg configmap --- .../jupyterhub-singleuser-profiles-configmap.yaml | 2 -- .../jupyterhub-singleuser-profiles-configmap.yaml | 5 +++++ .../trusted-ca-bundle-path/kustomization.yaml | 14 ++++++++++++-- 3 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 jupyterhub/jupyterhub/overlays/trusted-ca-bundle-path/jupyterhub-singleuser-profiles-configmap.yaml diff --git a/jupyterhub/jupyterhub/base/jupyterhub-singleuser-profiles-configmap.yaml b/jupyterhub/jupyterhub/base/jupyterhub-singleuser-profiles-configmap.yaml index c207f4559..121846e7a 100644 --- a/jupyterhub/jupyterhub/base/jupyterhub-singleuser-profiles-configmap.yaml +++ b/jupyterhub/jupyterhub/base/jupyterhub-singleuser-profiles-configmap.yaml @@ -9,8 +9,6 @@ data: env: - name: S3_ENDPOINT_URL value: $(s3_endpoint_url) - - name: TRUSTED_CA_BUNDLE_PATH - value: $(trusted_ca_bundle_path) resources: requests: memory: 1Gi diff --git a/jupyterhub/jupyterhub/overlays/trusted-ca-bundle-path/jupyterhub-singleuser-profiles-configmap.yaml b/jupyterhub/jupyterhub/overlays/trusted-ca-bundle-path/jupyterhub-singleuser-profiles-configmap.yaml new file mode 100644 index 000000000..63ccb702d --- /dev/null +++ b/jupyterhub/jupyterhub/overlays/trusted-ca-bundle-path/jupyterhub-singleuser-profiles-configmap.yaml @@ -0,0 +1,5 @@ +- op: add + path: /data/jupyterhub-singleuser-profiles.yaml/profiles[0]/env/- + value: + name: TRUSTED_CA_BUNDLE_PATH + value: $(trusted_ca_bundle_path) diff --git a/jupyterhub/jupyterhub/overlays/trusted-ca-bundle-path/kustomization.yaml b/jupyterhub/jupyterhub/overlays/trusted-ca-bundle-path/kustomization.yaml index 887d78064..6f0629895 100644 --- a/jupyterhub/jupyterhub/overlays/trusted-ca-bundle-path/kustomization.yaml +++ b/jupyterhub/jupyterhub/overlays/trusted-ca-bundle-path/kustomization.yaml @@ -7,5 +7,15 @@ commonLabels: bases: - ../../base resources: - - ./trusted-cabundle-configmap.yaml - - ./jupyterhub-configmap.yaml + - trusted-cabundle-configmap.yaml +patchesJson6902: + - path: jupyterhub-configmap.yaml + target: + version: v1 + kind: ConfigMap + name: jupyterhub-cfg + - path: jupyterhub-singleuser-profiles-configmap.yaml + target: + version: v1 + kind: ConfigMap + name: jupyter-singleuser-profiles From 6dbf93e7610a64840f430dd14f1f0fedfcd0b992 Mon Sep 17 00:00:00 2001 From: Sven Thoms Date: Wed, 14 Sep 2022 09:30:02 +0200 Subject: [PATCH 07/10] changed additonal env entry in jupyterhub-singleuser-profiles configmap to entirety due to inability to do JsonPatches6902 or strategic merge with scalar text value in configmap --- ...yterhub-singleuser-profiles-configmap.yaml | 83 +++++++++++++++++-- .../trusted-ca-bundle-path/kustomization.yaml | 12 +-- 2 files changed, 79 insertions(+), 16 deletions(-) diff --git a/jupyterhub/jupyterhub/overlays/trusted-ca-bundle-path/jupyterhub-singleuser-profiles-configmap.yaml b/jupyterhub/jupyterhub/overlays/trusted-ca-bundle-path/jupyterhub-singleuser-profiles-configmap.yaml index 63ccb702d..c78ce50ad 100644 --- a/jupyterhub/jupyterhub/overlays/trusted-ca-bundle-path/jupyterhub-singleuser-profiles-configmap.yaml +++ b/jupyterhub/jupyterhub/overlays/trusted-ca-bundle-path/jupyterhub-singleuser-profiles-configmap.yaml @@ -1,5 +1,78 @@ -- op: add - path: /data/jupyterhub-singleuser-profiles.yaml/profiles[0]/env/- - value: - name: TRUSTED_CA_BUNDLE_PATH - value: $(trusted_ca_bundle_path) +apiVersion: v1 +kind: ConfigMap +metadata: + name: jupyter-singleuser-profiles +data: + jupyterhub-singleuser-profiles.yaml: | + profiles: + - name: globals + env: + - name: S3_ENDPOINT_URL + value: $(s3_endpoint_url) + - name: TRUSTED_CA_BUNDLE_PATH + value: $(trusted_ca_bundle_path) + resources: + requests: + memory: 1Gi + cpu: 500m + limits: + memory: 2Gi + cpu: 1 + + - name: Spark Notebook + images: + - 's2i-spark-minimal-notebook:3.6' + - 's2i-spark-minimal-notebook:py36-spark2.4.5-hadoop2.7.3' + env: + - name: PYSPARK_SUBMIT_ARGS + value: '--conf spark.cores.max=2 --conf +spark.executor.instances=2 --conf spark.executor.memory=1G --conf +spark.executor.cores=1 --conf spark.driver.memory=2G --packages +com.amazonaws:aws-java-sdk:1.7.4,org.apache.hadoop:hadoop-aws:2.7.3,io.xskipper:xskipper-core_2.11:1.1.1 +pyspark-shell' + - name: PYSPARK_DRIVER_PYTHON + value: 'jupyter' + - name: PYSPARK_DRIVER_PYTHON_OPTS + value: 'notebook' + - name: SPARK_HOME + value: '/opt/app-root/lib/python3.6/site-packages/pyspark/' + - name: PYTHONPATH + value: +'$PYTHONPATH:/opt/app-root/lib/python3.6/site-packages/:/opt/app-root/lib/python3.6/site-packages/pyspark/python/:/opt/app-root/lib/python3.6/site-packages/pyspark/python/lib/py4j-0.8.2.1-src.zip' + services: + spark: + resources: + - name: spark-cluster-template + path: notebookPodServiceTemplate + - name: spark-cluster-template + path: sparkClusterTemplate + configuration: + worker_nodes: '2' + master_nodes: '1' + master_memory_limit: '2Gi' + master_cpu_limit: '1' + master_memory_request: '2Gi' + master_cpu_request: '1' + worker_memory_limit: '2Gi' + worker_cpu_limit: '1' + worker_memory_request: '2Gi' + worker_cpu_request: '1' + spark_image: +'quay.io/radanalyticsio/openshift-spark-py36:2.4.5-2' + return: + SPARK_CLUSTER: 'metadata.name' + gpuTypes: + - type: gpu_one + node_tolerations: + - key: provider + operator: Equal + value: gpu-node + effect: NoSchedule + # This is the default NoSchedule toleration that is recognized by +the NVIDIA gpu operator + - type: nvidia_gpu + node_tolerations: + - key: "nvidia.com/gpu" + operator: Exists + effect: NoSchedule + diff --git a/jupyterhub/jupyterhub/overlays/trusted-ca-bundle-path/kustomization.yaml b/jupyterhub/jupyterhub/overlays/trusted-ca-bundle-path/kustomization.yaml index 6f0629895..a7c56e878 100644 --- a/jupyterhub/jupyterhub/overlays/trusted-ca-bundle-path/kustomization.yaml +++ b/jupyterhub/jupyterhub/overlays/trusted-ca-bundle-path/kustomization.yaml @@ -8,14 +8,4 @@ bases: - ../../base resources: - trusted-cabundle-configmap.yaml -patchesJson6902: - - path: jupyterhub-configmap.yaml - target: - version: v1 - kind: ConfigMap - name: jupyterhub-cfg - - path: jupyterhub-singleuser-profiles-configmap.yaml - target: - version: v1 - kind: ConfigMap - name: jupyter-singleuser-profiles + -jupyterhub-singleuser-profiles-configmap.yaml From 280813f2e632fbac4137ac233f315dcde66c3f37 Mon Sep 17 00:00:00 2001 From: Sven Thoms Date: Wed, 14 Sep 2022 09:43:19 +0200 Subject: [PATCH 08/10] typo in overlay kustomization.yaml --- .../overlays/trusted-ca-bundle-path/kustomization.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jupyterhub/jupyterhub/overlays/trusted-ca-bundle-path/kustomization.yaml b/jupyterhub/jupyterhub/overlays/trusted-ca-bundle-path/kustomization.yaml index a7c56e878..e41b5c977 100644 --- a/jupyterhub/jupyterhub/overlays/trusted-ca-bundle-path/kustomization.yaml +++ b/jupyterhub/jupyterhub/overlays/trusted-ca-bundle-path/kustomization.yaml @@ -8,4 +8,4 @@ bases: - ../../base resources: - trusted-cabundle-configmap.yaml - -jupyterhub-singleuser-profiles-configmap.yaml + - jupyterhub-singleuser-profiles-configmap.yaml From 95176cb10ed27c22b338535352285fa2b24a31d7 Mon Sep 17 00:00:00 2001 From: Sven Thoms Date: Wed, 14 Sep 2022 10:39:56 +0200 Subject: [PATCH 09/10] added jupyterhub singleuser profiles configmap via strategic merge --- .../jupyterhub-singleuser-profiles-configmap.yaml | 15 ++++----------- .../trusted-ca-bundle-path/kustomization.yaml | 3 +++ 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/jupyterhub/jupyterhub/overlays/trusted-ca-bundle-path/jupyterhub-singleuser-profiles-configmap.yaml b/jupyterhub/jupyterhub/overlays/trusted-ca-bundle-path/jupyterhub-singleuser-profiles-configmap.yaml index c78ce50ad..b9a4b75bf 100644 --- a/jupyterhub/jupyterhub/overlays/trusted-ca-bundle-path/jupyterhub-singleuser-profiles-configmap.yaml +++ b/jupyterhub/jupyterhub/overlays/trusted-ca-bundle-path/jupyterhub-singleuser-profiles-configmap.yaml @@ -25,11 +25,7 @@ data: - 's2i-spark-minimal-notebook:py36-spark2.4.5-hadoop2.7.3' env: - name: PYSPARK_SUBMIT_ARGS - value: '--conf spark.cores.max=2 --conf -spark.executor.instances=2 --conf spark.executor.memory=1G --conf -spark.executor.cores=1 --conf spark.driver.memory=2G --packages -com.amazonaws:aws-java-sdk:1.7.4,org.apache.hadoop:hadoop-aws:2.7.3,io.xskipper:xskipper-core_2.11:1.1.1 -pyspark-shell' + value: '--conf spark.cores.max=2 --conf spark.executor.instances=2 --conf spark.executor.memory=1G --conf spark.executor.cores=1 --conf spark.driver.memory=2G --packages com.amazonaws:aws-java-sdk:1.7.4 org.apache.hadoop:hadoop-aws:2.7.3 io.xskipper:xskipper-core_2.11:1.1.1 pyspark-shell' - name: PYSPARK_DRIVER_PYTHON value: 'jupyter' - name: PYSPARK_DRIVER_PYTHON_OPTS @@ -37,8 +33,7 @@ pyspark-shell' - name: SPARK_HOME value: '/opt/app-root/lib/python3.6/site-packages/pyspark/' - name: PYTHONPATH - value: -'$PYTHONPATH:/opt/app-root/lib/python3.6/site-packages/:/opt/app-root/lib/python3.6/site-packages/pyspark/python/:/opt/app-root/lib/python3.6/site-packages/pyspark/python/lib/py4j-0.8.2.1-src.zip' + value: '$PYTHONPATH:/opt/app-root/lib/python3.6/site-packages/:/opt/app-root/lib/python3.6/site-packages/pyspark/python/:/opt/app-root/lib/python3.6/site-packages/pyspark/python/lib/py4j-0.8.2.1-src.zip' services: spark: resources: @@ -57,8 +52,7 @@ pyspark-shell' worker_cpu_limit: '1' worker_memory_request: '2Gi' worker_cpu_request: '1' - spark_image: -'quay.io/radanalyticsio/openshift-spark-py36:2.4.5-2' + spark_image: 'quay.io/radanalyticsio/openshift-spark-py36:2.4.5-2' return: SPARK_CLUSTER: 'metadata.name' gpuTypes: @@ -68,8 +62,7 @@ pyspark-shell' operator: Equal value: gpu-node effect: NoSchedule - # This is the default NoSchedule toleration that is recognized by -the NVIDIA gpu operator + # This is the default NoSchedule toleration that is recognized by the NVIDIA gpu operator - type: nvidia_gpu node_tolerations: - key: "nvidia.com/gpu" diff --git a/jupyterhub/jupyterhub/overlays/trusted-ca-bundle-path/kustomization.yaml b/jupyterhub/jupyterhub/overlays/trusted-ca-bundle-path/kustomization.yaml index e41b5c977..55f068f53 100644 --- a/jupyterhub/jupyterhub/overlays/trusted-ca-bundle-path/kustomization.yaml +++ b/jupyterhub/jupyterhub/overlays/trusted-ca-bundle-path/kustomization.yaml @@ -6,6 +6,9 @@ commonLabels: bases: - ../../base + resources: - trusted-cabundle-configmap.yaml + +patchesStrategicMerge: - jupyterhub-singleuser-profiles-configmap.yaml From 04fcb10786a0a3ab3eda2df7b0673b9ff8b2a68d Mon Sep 17 00:00:00 2001 From: Sven Thoms Date: Wed, 14 Sep 2022 10:50:50 +0200 Subject: [PATCH 10/10] added patchesJson6902 for jupyterhub-configmap --- .../overlays/trusted-ca-bundle-path/kustomization.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/jupyterhub/jupyterhub/overlays/trusted-ca-bundle-path/kustomization.yaml b/jupyterhub/jupyterhub/overlays/trusted-ca-bundle-path/kustomization.yaml index 55f068f53..8407daa26 100644 --- a/jupyterhub/jupyterhub/overlays/trusted-ca-bundle-path/kustomization.yaml +++ b/jupyterhub/jupyterhub/overlays/trusted-ca-bundle-path/kustomization.yaml @@ -10,5 +10,12 @@ bases: resources: - trusted-cabundle-configmap.yaml +patchesJson6902: + - path: jupyterhub-configmap.yaml + target: + version: v1 + kind: ConfigMap + name: jupyterhub-cfg + patchesStrategicMerge: - jupyterhub-singleuser-profiles-configmap.yaml