From 0f69367990e9d66d2665d057488f574eead69728 Mon Sep 17 00:00:00 2001 From: David <9059044+Tansito@users.noreply.github.com> Date: Fri, 20 Jan 2023 18:28:41 +0100 Subject: [PATCH] Helm: provide a way to expose services through ingress-controller (#126) * Added ingress-nginx-controller * Added condition for nginx-controller * Updated terraform helm values * Documentation updated --- .../helm/quantumserverless/Chart.lock | 7 +- .../helm/quantumserverless/Chart.yaml | 4 + .../helm/quantumserverless/README.md | 7 +- .../helm/quantumserverless/values.yaml | 19 ++++ infrastructure/terraform/aws/values.yaml | 92 +++++++++++-------- infrastructure/terraform/ibm/values.yaml | 92 +++++++++++-------- 6 files changed, 143 insertions(+), 78 deletions(-) diff --git a/infrastructure/helm/quantumserverless/Chart.lock b/infrastructure/helm/quantumserverless/Chart.lock index ab37b2a02..3b8c1f301 100644 --- a/infrastructure/helm/quantumserverless/Chart.lock +++ b/infrastructure/helm/quantumserverless/Chart.lock @@ -2,6 +2,9 @@ dependencies: - name: jupyter repository: "" version: 0.1.0 +- name: nginx-ingress-controller + repository: https://charts.bitnami.com/bitnami + version: 9.3.26 - name: kuberay-operator repository: https://ray-project.github.io/kuberay-helm version: 0.4.0 @@ -14,5 +17,5 @@ dependencies: - name: redis repository: https://charts.bitnami.com/bitnami version: 17.4.3 -digest: sha256:1f1f3a40ece0093c3f1fa0fa6fe4e1cb43b8268ac2411701dc3bf0e95a0f0e02 -generated: "2023-01-18T14:35:23.24738369Z" +digest: sha256:6a12f46e80b855dbbd40f5c70a3fea9626f7fce6d7485ad70e078b7983239d8f +generated: "2023-01-20T14:57:45.991889+01:00" diff --git a/infrastructure/helm/quantumserverless/Chart.yaml b/infrastructure/helm/quantumserverless/Chart.yaml index ff34c8c35..4093a7d4c 100644 --- a/infrastructure/helm/quantumserverless/Chart.yaml +++ b/infrastructure/helm/quantumserverless/Chart.yaml @@ -11,6 +11,10 @@ dependencies: - name: jupyter condition: jupyterEnable version: 0.1.0 + - name: nginx-ingress-controller + condition: nginxIngressControllerEnable + version: 9.3.26 + repository: https://charts.bitnami.com/bitnami - name: kuberay-operator condition: kuberayOperatorEnable version: 0.4.0 diff --git a/infrastructure/helm/quantumserverless/README.md b/infrastructure/helm/quantumserverless/README.md index 2820b6bec..9c7674048 100644 --- a/infrastructure/helm/quantumserverless/README.md +++ b/infrastructure/helm/quantumserverless/README.md @@ -23,9 +23,12 @@ The Quantum Serverless Chart has several internal and external dependencies. If ## Helm chart values -**Redis** +**Redis & Nginx Ingress controller** -For our Redis dependency we are using the configuration created by Bitnami. To simplify the configuration we offered you with a straigh-forward initial parameters setup. But if you are interested in more complex configurations you have access to all the parameters that Bitnami added in the chart specified in their [README](https://artifacthub.io/packages/helm/bitnami/redis). +For our Redis and Nginx Ingress controller dependencies we are using the configuration created by Bitnami. To simplify the configuration we offered you with a straigh-forward initial parameters setup. +But if you are interested in more complex configurations you have access to all the parameters that Bitnami added in the chart specified in their READMEs: +* [Redis README](https://artifacthub.io/packages/helm/bitnami/redis). +* [Nginx Ingress controller's README](https://artifacthub.io/packages/helm/bitnami/nginx-ingress-controller) **Jupyter notebook** diff --git a/infrastructure/helm/quantumserverless/values.yaml b/infrastructure/helm/quantumserverless/values.yaml index 2d359562a..3fda6e003 100644 --- a/infrastructure/helm/quantumserverless/values.yaml +++ b/infrastructure/helm/quantumserverless/values.yaml @@ -2,6 +2,13 @@ # Quantum Serverless configs # =================== +# =================== +# Ingress Nginx controller configs +# =================== + +# Ingress Nginx controller is disabled by default to not affect cloud providers' controller configuration +nginxIngressControllerEnable: false + # =================== # Redis configs # =================== @@ -44,8 +51,20 @@ jupyter: service: port: 80 + # If you enable it remember to enable nginx ingress controller if you need a controller for ingress ingress: enabled: false + className: "nginx" + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + loadBalancer: + hostname: localhost + hosts: + - host: localhost + paths: + - path: / + pathType: Prefix # =================== diff --git a/infrastructure/terraform/aws/values.yaml b/infrastructure/terraform/aws/values.yaml index 51359f64d..289dbc4b7 100644 --- a/infrastructure/terraform/aws/values.yaml +++ b/infrastructure/terraform/aws/values.yaml @@ -2,6 +2,32 @@ # Quantum Serverless configs # =================== +# =================== +# Ingress Nginx controller configs +# =================== + +# Ingress Nginx controller is disabled by default to not affect cloud providers' controller configuration +nginxIngressControllerEnable: false + +# =================== +# Redis configs +# =================== + +redisEnable: true +redis: + architecture: "standalone" + + global: + redis: + password: "" + + auth: + enabled: false + + master: + service: + ports: + redis: 7000 # =================== # Jupyter configs @@ -25,8 +51,20 @@ jupyter: service: port: 80 + # If you enable it remember to enable nginx ingress controller if you need a controller for ingress ingress: enabled: false + className: "nginx" + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + loadBalancer: + hostname: localhost + hosts: + - host: localhost + paths: + - path: / + pathType: Prefix # =================== @@ -44,7 +82,7 @@ manager: imagePullSecrets: [] container: - port: 80 + port: 5000 service: port: 5000 @@ -54,63 +92,44 @@ manager: # =================== -# Ray configs +# Ray Cluster # =================== -# RAY CLUSTER - rayClusterEnable: true - ray-cluster: + nameOverride: "kuberay" + fullnameOverride: "" + image: repository: "" tag: "latest" pullPolicy: IfNotPresent - imagePullSecrets: [] - # - name: an-existing-secret - - nameOverride: "kuberay" - fullnameOverride: "" - head: - initArgs: + rayStartParams: dashboard-host: '0.0.0.0' - port: '6379' worker: # If you want to disable the default workergroup # uncomment the line below # disabled: true replicas: 1 - ports: - - containerPort: 80 - protocol: TCP - resources: - limits: - cpu: 1 - requests: - cpu: 200m - - headServiceSuffix: "ray-operator.svc" + type: worker service: - type: LoadBalancer - port: 8080 - -# KUBERAY OPERATOR + type: ClusterIP -rayOperatorEnable: true -operator: - image: - repository: kuberay/operator - tag: nightly - pullPolicy: IfNotPresent +# =================== +# Kuberay Operator +# =================== +kuberayOperatorEnable: true +kuberay-operator: nameOverride: "kuberay-operator" fullnameOverride: "kuberay-operator" + rbacEnable: true ## Install Default RBAC roles and bindings rbac: create: true @@ -127,9 +146,6 @@ operator: type: ClusterIP port: 8080 - ingress: - enabled: false - livenessProbe: initialDelaySeconds: 10 periodSeconds: 5 @@ -141,4 +157,6 @@ operator: failureThreshold: 5 createCustomResource: true - rbacEnable: true + + batchScheduler: + enabled: false diff --git a/infrastructure/terraform/ibm/values.yaml b/infrastructure/terraform/ibm/values.yaml index 51359f64d..289dbc4b7 100644 --- a/infrastructure/terraform/ibm/values.yaml +++ b/infrastructure/terraform/ibm/values.yaml @@ -2,6 +2,32 @@ # Quantum Serverless configs # =================== +# =================== +# Ingress Nginx controller configs +# =================== + +# Ingress Nginx controller is disabled by default to not affect cloud providers' controller configuration +nginxIngressControllerEnable: false + +# =================== +# Redis configs +# =================== + +redisEnable: true +redis: + architecture: "standalone" + + global: + redis: + password: "" + + auth: + enabled: false + + master: + service: + ports: + redis: 7000 # =================== # Jupyter configs @@ -25,8 +51,20 @@ jupyter: service: port: 80 + # If you enable it remember to enable nginx ingress controller if you need a controller for ingress ingress: enabled: false + className: "nginx" + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + loadBalancer: + hostname: localhost + hosts: + - host: localhost + paths: + - path: / + pathType: Prefix # =================== @@ -44,7 +82,7 @@ manager: imagePullSecrets: [] container: - port: 80 + port: 5000 service: port: 5000 @@ -54,63 +92,44 @@ manager: # =================== -# Ray configs +# Ray Cluster # =================== -# RAY CLUSTER - rayClusterEnable: true - ray-cluster: + nameOverride: "kuberay" + fullnameOverride: "" + image: repository: "" tag: "latest" pullPolicy: IfNotPresent - imagePullSecrets: [] - # - name: an-existing-secret - - nameOverride: "kuberay" - fullnameOverride: "" - head: - initArgs: + rayStartParams: dashboard-host: '0.0.0.0' - port: '6379' worker: # If you want to disable the default workergroup # uncomment the line below # disabled: true replicas: 1 - ports: - - containerPort: 80 - protocol: TCP - resources: - limits: - cpu: 1 - requests: - cpu: 200m - - headServiceSuffix: "ray-operator.svc" + type: worker service: - type: LoadBalancer - port: 8080 - -# KUBERAY OPERATOR + type: ClusterIP -rayOperatorEnable: true -operator: - image: - repository: kuberay/operator - tag: nightly - pullPolicy: IfNotPresent +# =================== +# Kuberay Operator +# =================== +kuberayOperatorEnable: true +kuberay-operator: nameOverride: "kuberay-operator" fullnameOverride: "kuberay-operator" + rbacEnable: true ## Install Default RBAC roles and bindings rbac: create: true @@ -127,9 +146,6 @@ operator: type: ClusterIP port: 8080 - ingress: - enabled: false - livenessProbe: initialDelaySeconds: 10 periodSeconds: 5 @@ -141,4 +157,6 @@ operator: failureThreshold: 5 createCustomResource: true - rbacEnable: true + + batchScheduler: + enabled: false