feat: add helm charts and integrate with OOP platform

This PR adds on top of the existing implementation on the following:

  • Authentication: Login page with mock auth 
  • API Catalogue: Revised filters, some fixes in the API detail pages
  • My Applications: View deployed application instances and available app profiles, create/delete app profiles, create/delete app instances
  • Backend API routes: proxying requests to OEG for apps, app instances, APIs, edge-cloud zones, and Swagger specs
  • Dockerfile creation
  • Helm chart for deploying under the OOP umbrella
  • Updated Readme

Merge request reports

Loading

UI/.gitkeep

deleted100644 → 0
+0 −0

Empty file deleted.

+16 −0
Changes for deployment/templates/NOTES.txt: 16 added lines, 0 removed lines.
Original line number Diff line number Diff line
Portal frontend has been deployed.

1. Get the application URL by running these commands:
{{- if contains "NodePort" .Values.service.type }}
  export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "portal.fullname" . }})
  export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
  echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
  NOTE: It may take a few minutes for the LoadBalancer IP to be available.
  kubectl get --namespace {{ .Release.Namespace }} svc {{ include "portal.fullname" . }} -w
{{- else if contains "ClusterIP" .Values.service.type }}
  kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ include "portal.fullname" . }} {{ .Values.service.port }}:{{ .Values.service.port }}
  echo "Visit http://127.0.0.1:{{ .Values.service.port }}"
{{- end }}

OEG_SERVICE_URL is set to: {{ .Values.config.oegServiceUrl }}
+38 −0
Changes for deployment/templates/_helpers.tpl: 38 added lines, 0 removed lines.
Original line number Diff line number Diff line
{{- define "portal.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{- define "portal.fullname" -}}
{{- if .Values.fullnameOverride }}
  {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
  {{- $name := default .Chart.Name .Values.nameOverride }}
  {{- if contains $name .Release.Name }}
    {{- .Release.Name | trunc 63 | trimSuffix "-" }}
  {{- else }}
    {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
  {{- end }}
{{- end }}
{{- end }}

{{- define "portal.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{- define "portal.labels" -}}
helm.sh/chart: {{ include "portal.chart" . }}
{{ include "portal.selectorLabels" . }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
{{- end }}

{{- define "portal.selectorLabels" -}}
app.kubernetes.io/name: {{ include "portal.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{- define "portal.configMapName" -}}
{{- include "portal.fullname" . }}-config
{{- end }}
+10 −0
Changes for deployment/templates/configmap.yaml: 10 added lines, 0 removed lines.
Original line number Diff line number Diff line
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "portal.configMapName" . }}
  namespace: {{ .Release.Namespace }}
  labels:
    {{- include "portal.labels" . | nindent 4 }}
    app.kubernetes.io/component: portal
data:
  OEG_SERVICE_URL: {{ .Values.config.oegServiceUrl | quote }}
+58 −0
Changes for deployment/templates/deployment.yaml: 58 added lines, 0 removed lines.
Original line number Diff line number Diff line
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "portal.fullname" . }}
  namespace: {{ .Release.Namespace }}
  labels:
    {{- include "portal.labels" . | nindent 4 }}
    app.kubernetes.io/component: portal
spec:
  replicas: {{ .Values.replicaCount }}
  selector:
    matchLabels:
      {{- include "portal.selectorLabels" . | nindent 6 }}
      app.kubernetes.io/component: portal
  template:
    metadata:
      labels:
        {{- include "portal.selectorLabels" . | nindent 8 }}
        app.kubernetes.io/component: portal
        {{- with .Values.podLabels }}
        {{- toYaml . | nindent 8 }}
        {{- end }}
    spec:
      containers:
        - name: portal
          image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
          imagePullPolicy: {{ .Values.image.pullPolicy }}
          ports:
            - name: http
              containerPort: {{ .Values.service.targetPort }}
              protocol: TCP
          env:
            - name: OEG_SERVICE_URL
              valueFrom:
                configMapKeyRef:
                  name: {{ include "portal.configMapName" . }}
                  key: OEG_SERVICE_URL
            {{- with .Values.extraEnv }}
            {{- toYaml . | nindent 12 }}
            {{- end }}
          livenessProbe:
            httpGet:
              path: /
              port: http
            initialDelaySeconds: 30
            periodSeconds: 10
          readinessProbe:
            httpGet:
              path: /
              port: http
            initialDelaySeconds: 5
            periodSeconds: 5
          resources:
            {{- toYaml .Values.resources | nindent 12 }}
      {{- with .Values.imagePullSecrets }}
      imagePullSecrets:
        {{- toYaml . | nindent 8 }}
      {{- end }}
Loading
Loading