---
# System prepended metadata

title: Untitled

---

apiVersion: apps/v1
kind: Deployment
metadata:
  name: comm-app
  labels:
    app: comm-app
spec:
  replicas: 1
  selector:
    matchLabels:
      app: comm-app
  template:
    metadata:
      labels:
        app: comm-app
    spec:
      containers:
        - name: comm-app
          image: us.icr.io/phee-ns/comm-app
          ports:
            - containerPort: 80
          volumeMounts:
            - name: comm-app
              mountPath: "/app/src/scripts/configuration.properties"
              subPath: "configuration.properties"
      volumes:
        - name: comm-app
          configMap:
            name: comm-app

---

kind: Service
apiVersion: v1
metadata:
  name: comm-app
spec:
  selector:
    app: comm-app
  ports:
    - protocol: TCP
      port: 80

---
apiVersion: v1
data:
  configuration.properties: |
    oauth.enabled false
    oauth.basicAuth true
    oauth.basicAuthToken Y2xpZW50Og==
    serverUrl https://in.ibank.financial
kind: ConfigMap
metadata:
  name: comm-app
  
---


apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: comm-app
  annotations:
    kubernetes.io/ingress.class: nginx
spec:
  rules:
    - host: "us.ibank.financial"
      http:
        paths:
          - backend:
              serviceName: comm-app
              servicePort: 80

----------------------------------
configuration.properties loc=app/scripts/cpnfiguration.properties

if (mainLink.hostname != "") {
                baseApiUrl = "https://" + mainLink.hostname + (mainLink.port ? ':' + mainLink.port : '');
            }

            if (QueryParameters["baseApiUrl"]) {
                baseApiUrl = QueryParameters["baseApiUrl"];
            }
            var queryLink = getLocation(baseApiUrl);
            host = "https://" + queryLink.hostname + (queryLink.port ? ':' + queryLink.port : '');
            portNumber = queryLink.port;

            $httpProvider.defaults.headers.common['Fineract-Platform-TenantId'] = 'default';
            ResourceFactoryProvider.setTenantIdenetifier('default');
            if (QueryParameters["tenantIdentifier"]) {
                $httpProvider.defaults.headers.common['Fineract-Platform-TenantId'] = QueryParameters["tenantIdentifier"];
                ResourceFactoryProvider.setTenantIdenetifier(QueryParameters["tenantIdentifier"]);
            }