Skip to content

Commit f4fab3d

Browse files
authored
Add configurable ingress domain with automatic nip.io fallback (#50)
1 parent fe83346 commit f4fab3d

File tree

8 files changed

+112
-4
lines changed

8 files changed

+112
-4
lines changed

GETTING_STARTED_HELM_DEPLOY.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,15 @@ helm install lens oci-ai-incubations/lens -n lens --create-namespace \
100100
--set grafana.adminPassword="access password for grafana portal. User name is admin by default"\
101101
--set monitoring.grafanaAdminPassword="password" \
102102
--set backend.tenancyId="your-oci-tenancy-id" \
103-
--set backend.regionName="your-oke-region-name"
103+
--set backend.regionName="your-oke-region-name"
104104
```
105105

106+
**Optional: Custom Domain Configuration**
107+
108+
By default, the deployment uses `nip.io` for ingress (no DNS setup required). To use your own domain, add `--set ingress.domain="your-domain"` to the helm command above.
109+
110+
For detailed instructions on custom domain setup and required DNS records, see [Custom Domain Configuration](INGRESS_AND_TLS_SETUP.md#custom-domain-configuration).
111+
106112
### OPTION 2: Install control plane with your existing grafana & prometheus to existing OKE cluster
107113

108114
If you already have Prometheus Postgateway and Grafana running, login to existing OKE cluster where you would like to install this:
@@ -123,10 +129,15 @@ helm install lens oci-ai-incubations/lens -n lens --create-namespace \
123129
--set backend.superuser.username="username for API & control plane e.g. admin" \
124130
--set backend.superuser.email="your email" \
125131
--set backend.superuser.password="access password for API & control plane" \
126-
--set grafana.adminPassword="access password for grafana portal. User name is admin by default" \
127-
132+
--set grafana.adminPassword="access password for grafana portal. User name is admin by default"
128133
```
129134

135+
**Optional: Custom Domain Configuration**
136+
137+
By default, the deployment uses `nip.io` for ingress (no DNS setup required). To use your own domain, add `--set ingress.domain="your-domain"` to the helm command above.
138+
139+
For detailed instructions on custom domain setup and required DNS records, see [Custom Domain Configuration](INGRESS_AND_TLS_SETUP.md#custom-domain-configuration).
140+
130141
## Verify for successful install
131142

132143
Once the installation is complete you should see the following pods in the "lens" namespace. If you don't please uninstall and reinstall or check the helm install events/logs.

GETTING_STARTED_RM_DEPLOY.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ The deployment automatically installs **ingress-nginx** and **cert-manager** for
5959
- Configure parameters:
6060
- **Create IAM Policy:** Enable if you wish to create the workload identity IAM policy for the backend service account.
6161
- **IAM Policy Name:** Default is `corrino-lens-backend-workload-policy`
62+
- **Ingress Domain:** (Optional) Custom domain for ingress. Leave empty to use `nip.io` wildcard DNS service (recommended for quick start, no DNS setup required). If you provide a custom domain, you must manually create DNS records. See [Custom Domain Configuration](INGRESS_AND_TLS_SETUP.md#custom-domain-configuration) for details.
6263
- **Superuser Username:** Username for the OCI GPU Scanner Portal (default: `admin`)
6364
- **Superuser Password:** Password for the OCI GPU Scanner Portal (default: `supersecret`) — **Recommended to change for production**
6465
- **Superuser Email:** Email address for the superuser account (default: `admin@oracle.com`)
@@ -75,7 +76,9 @@ Access the OKE cluster using the credentials created for the new OKE cluster.
7576
After connecting with OKE cluster run the below command
7677
```kubectl get ingress -n lens```
7778

78-
Copy the HOSTS details for all the applications deployed by lens. e.g. lens.129.80.43.138.nip.io
79+
Copy the HOSTS details for all the applications deployed by lens. e.g. lens.129.80.43.138.nip.io
80+
81+
**Note:** If you configured a custom domain during deployment, you need to manually create DNS records. See [Custom Domain Configuration](INGRESS_AND_TLS_SETUP.md#custom-domain-configuration) for detailed instructions.
7982

8083

8184

INGRESS_AND_TLS_SETUP.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,75 @@ kubectl get crd | grep cert-manager || echo "No cert-manager CRDs"
9797

9898
---
9999

100+
## Custom Domain Configuration
101+
102+
By default, OCI GPU Scanner uses `nip.io` for ingress, which is a wildcard DNS service that requires no manual DNS configuration. All URLs will be in the format `<service>.<LOADBALANCER_IP>.nip.io` (e.g., `lens.129.80.43.138.nip.io`).
103+
104+
### Using nip.io (Default - Recommended for Quick Start)
105+
106+
**No DNS configuration required!** The deployment automatically uses `nip.io`, which provides wildcard DNS resolution based on the LoadBalancer IP address.
107+
108+
**Helm installation:** No additional parameters needed - this is the default behavior.
109+
110+
**Resource Manager:** Leave the "Ingress Domain" field empty.
111+
112+
### Using a Custom Domain
113+
114+
If you prefer to use your own domain instead of `nip.io`, you can configure a custom domain during installation. However, you **must manually create DNS A records** in your DNS provider.
115+
116+
If you prefer to use `.oci-incubations.com` as your domain, contact amar.gowda@oracle.com or gabrielle.lyu@oracle.com for adding DNS A records after deployment.
117+
118+
#### Step 1: Configure Custom Domain During Installation
119+
120+
**For Helm installations:**
121+
```bash
122+
helm install lens oci-ai-incubations/lens -n lens --create-namespace \
123+
--set ingress.domain="your-domain" \
124+
[... other parameters ...]
125+
```
126+
127+
**For Resource Manager deployments:**
128+
Enter your domain in the "Ingress Domain" field (e.g., `oci-incubations.com`).
129+
130+
#### Step 2: Get the LoadBalancer IP
131+
132+
After deployment completes, retrieve the ingress LoadBalancer IP:
133+
134+
```bash
135+
kubectl get svc lens-ingress-nginx-controller -n lens
136+
```
137+
138+
Look for the `EXTERNAL-IP` value (e.g., `137.131.36.226`).
139+
140+
#### Step 3: Create DNS A Records
141+
142+
In your DNS provider, create the following DNS A records pointing to the LoadBalancer IP:
143+
144+
| DNS Record | Points To |
145+
|------------|-----------|
146+
| `*.<LOADBALANCER_IP>.<YOUR_DOMAIN>` | `<LOADBALANCER_IP>` |
147+
148+
149+
**Example:** For LoadBalancer IP `137.131.36.226` and domain `oci-incubations.com`:
150+
- `*.137.131.36.226.oci-incubations.com``137.131.36.226`
151+
152+
#### Step 4: Verify DNS Resolution
153+
154+
After creating the DNS records (allow 5-15 minutes for DNS propagation):
155+
156+
```bash
157+
# Test DNS resolution
158+
nslookup lens.137.131.36.226.oci-incubations.com
159+
nslookup api.137.131.36.226.oci-incubations.com
160+
161+
# Test HTTPS access
162+
curl -I https://lens.137.131.36.226.oci-incubations.com
163+
```
164+
165+
**Note:** TLS certificates from Let's Encrypt may take 2-5 minutes to be issued after DNS records are properly configured.
166+
167+
---
168+
100169
## Post-Install Check
101170

102171
After helm installation, verify all components are running:

oci_lens_terraform/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ module "app" {
131131
superuser_password = var.superuser_password
132132
superuser_email = var.superuser_email
133133
grafana_admin_password = var.grafana_admin_password
134+
ingress_domain = var.ingress_domain
134135

135136
# wait for cluster (if new cluster was created)
136137
depends_on = [time_sleep.after_cluster]

oci_lens_terraform/modules/app/main.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ resource "helm_release" "app" {
6565
value = var.grafana_admin_password
6666
}
6767

68+
set {
69+
name = "ingress.domain"
70+
value = var.ingress_domain != "" ? var.ingress_domain : "nip.io"
71+
}
72+
6873
depends_on = [
6974
kubernetes_namespace.ns,
7075
]

oci_lens_terraform/modules/app/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,10 @@ variable "grafana_admin_password" {
5959
description = "Password for the admin of Grafana"
6060
type = string
6161
sensitive = true
62+
}
63+
64+
variable "ingress_domain" {
65+
description = "Domain for ingress. Empty string defaults to nip.io."
66+
type = string
67+
default = ""
6268
}

oci_lens_terraform/schema.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ variableGroups:
2121
visible: true
2222
variables:
2323
- namespace
24+
- ingress_domain
2425
- create_iam_policy
2526
- policy_name
2627

@@ -62,6 +63,12 @@ variables:
6263
description: "Namespace for all Lens resources."
6364
default: "lens"
6465

66+
ingress_domain:
67+
type: string
68+
title: "Ingress Domain"
69+
description: "Custom domain for ingress. Leave empty to use nip.io (wildcard DNS service)."
70+
default: ""
71+
6572
create_iam_policy:
6673
type: boolean
6774
title: "Create IAM Policy"

oci_lens_terraform/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,10 @@ variable "grafana_admin_password" {
5656
type = string
5757
sensitive = true
5858
default = "admin123"
59+
}
60+
61+
variable "ingress_domain" {
62+
description = "Domain for ingress. Leave empty to use nip.io (wildcard DNS service)."
63+
type = string
64+
default = ""
5965
}

0 commit comments

Comments
 (0)