# # Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. # Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. # # =========================================================================== # == Add below entries to your tnsnames.ora to access this database server == # ====================== from external host ================================= ORCLCDB=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=)(PORT=)) (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=))) ORCLPDB1=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=)(PORT=)) (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=))) # #ip-address : IP address of any of the Kubernetes nodes #port : Service Port that is mapped to the port 1521 of the container. # Application details ==================== IP and port can be found using the following: {{- if .Values.loadBalService }} export LOAD_BALANCER_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].port}" services {{ template "fullname" . }}) export LOAD_BALANCER_XDB_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[1].port}" services {{ template "fullname" . }}) export LOAD_BALANCER_IP=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.status.loadBalancer.ingress[0].ip}" services {{ template "fullname" . }}) echo listener at $LOAD_BALANCER_IP:$LOAD_BALANCER_PORT echo XDB at $LOAD_BALANCER_IP:$LOAD_BALANCER_XDB_PORT {{- else}} export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "fullname" . }}) export NODE_XDB_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[1].nodePort}" services {{ template "fullname" . }}) export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") echo listener at $NODE_IP:$NODE_PORT echo XDB at $NODE_IP:$NODE_XDB_PORT {{- end }} Oracle Databases SID, PDB name can be figured out by : ORACLE_SID=$(kubectl get -o jsonpath="{.spec.template.spec.containers[?(.name == 'oracle-db')].env[?(.name == 'ORACLE_SID')].value }" deploy {{ template "fullname" . }}) ORACLE_PDB=$(kubectl get -o jsonpath="{.spec.template.spec.containers[?(.name == 'oracle-db')].env[?(.name == 'ORACLE_PDB')].value }" deploy {{ template "fullname" . }})