Integrating front and workspace service
This commit is contained in:
		
							
								
								
									
										20
									
								
								opencloud/templates/oc-front/config.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								opencloud/templates/oc-front/config.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,20 @@
 | 
			
		||||
{{- if index .Values.ocFront.enabled }}
 | 
			
		||||
apiVersion: v1
 | 
			
		||||
kind: ConfigMap
 | 
			
		||||
metadata:
 | 
			
		||||
  name: front-config
 | 
			
		||||
data:
 | 
			
		||||
  config.json: |
 | 
			
		||||
    {
 | 
			
		||||
      "WORKSPACE_HOST": "{{ .Values.scheme }}://{{ .Values.host }}/workspace/oc",
 | 
			
		||||
      "WORKFLOW_HOST": "{{ .Values.scheme }}://{{ .Values.host }}/workflow/oc",
 | 
			
		||||
      "ITEM_HOST": "{{ .Values.scheme }}://{{ .Values.host }}/item/oc",
 | 
			
		||||
      "SCHEDULER_HOST": "{{ .Values.scheme }}://{{ .Values.host }}/scheduler/oc",
 | 
			
		||||
      "LOGS_HOST": "{{ .Values.scheme }}://{{ .Values.host }}/logs",
 | 
			
		||||
      "PEER_HOST": "{{ .Values.scheme }}://{{ .Values.host }}/peers/oc",
 | 
			
		||||
      "DATACENTER_HOST": "{{ .Values.scheme }}://{{ .Values.host }}/datacenter/oc",
 | 
			
		||||
      "COLLABORATIVE_AREA_HOST": "{{ .Values.scheme }}://{{ .Values.host }}/collaborative/oc",
 | 
			
		||||
      "HOST": "{{ .Values.scheme }}://{{ .Values.host }}/oc",
 | 
			
		||||
      "AUTH_HOST": "{{ .Values.scheme }}://{{ .Values.host }}/auth/oc"
 | 
			
		||||
    }
 | 
			
		||||
{{- end }}
 | 
			
		||||
							
								
								
									
										40
									
								
								opencloud/templates/oc-front/deployment.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								opencloud/templates/oc-front/deployment.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,40 @@
 | 
			
		||||
{{- if index .Values.ocFront.enabled }}
 | 
			
		||||
apiVersion: apps/v1
 | 
			
		||||
kind: Deployment
 | 
			
		||||
metadata:
 | 
			
		||||
  labels:
 | 
			
		||||
    app: oc-front
 | 
			
		||||
  name: {{ .Release.Name }}-oc-front
 | 
			
		||||
spec:
 | 
			
		||||
  replicas: 1
 | 
			
		||||
  selector:
 | 
			
		||||
    matchLabels:
 | 
			
		||||
      app: oc-front
 | 
			
		||||
  template:
 | 
			
		||||
    metadata:
 | 
			
		||||
      labels:
 | 
			
		||||
        app: oc-front
 | 
			
		||||
    spec:
 | 
			
		||||
      volumes:
 | 
			
		||||
          - name: config-volume
 | 
			
		||||
            configMap:
 | 
			
		||||
              name: front-config
 | 
			
		||||
      containers:
 | 
			
		||||
      - image: "{{ .Values.ocFront.image }}"
 | 
			
		||||
        name: oc-front
 | 
			
		||||
        ports:
 | 
			
		||||
          - name: http
 | 
			
		||||
            containerPort: 80
 | 
			
		||||
            protocol: TCP
 | 
			
		||||
        resources:
 | 
			
		||||
          limits:
 | 
			
		||||
            cpu: "{{ .Values.ocFront.resources.limits.cpu }}"
 | 
			
		||||
            memory: "{{ .Values.ocFront.resources.limits.memory }}"
 | 
			
		||||
          requests:
 | 
			
		||||
            cpu: "{{ .Values.ocFront.resources.requests.cpu }}"
 | 
			
		||||
            memory: "{{ .Values.ocFront.resources.requests.memory }}"
 | 
			
		||||
        volumeMounts:
 | 
			
		||||
        - name: config-volume
 | 
			
		||||
          mountPath: /usr/share/nginx/html/assets/assets/config/front.json
 | 
			
		||||
          subPath: config.json            
 | 
			
		||||
{{- end }}
 | 
			
		||||
							
								
								
									
										17
									
								
								opencloud/templates/oc-front/ingress.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								opencloud/templates/oc-front/ingress.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,17 @@
 | 
			
		||||
{{- if index .Values.ocFront.enabled }}
 | 
			
		||||
apiVersion: traefik.io/v1alpha1
 | 
			
		||||
kind: IngressRoute
 | 
			
		||||
metadata:
 | 
			
		||||
  name: oc-front-ingress
 | 
			
		||||
spec:
 | 
			
		||||
  entryPoints:
 | 
			
		||||
    - web
 | 
			
		||||
  routes:                           
 | 
			
		||||
    - kind: Rule
 | 
			
		||||
      match:   Host(`{{ .Values.host }}`) && PathPrefix(`/`)
 | 
			
		||||
      priority: 10                    
 | 
			
		||||
      services:
 | 
			
		||||
      - kind: Service
 | 
			
		||||
        name: oc-front-svc
 | 
			
		||||
        port: 8080
 | 
			
		||||
{{- end }}
 | 
			
		||||
							
								
								
									
										17
									
								
								opencloud/templates/oc-front/service.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								opencloud/templates/oc-front/service.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,17 @@
 | 
			
		||||
{{- if index .Values.ocFront.enabled }}
 | 
			
		||||
apiVersion: v1
 | 
			
		||||
kind: Service
 | 
			
		||||
metadata:
 | 
			
		||||
  name: oc-front-svc
 | 
			
		||||
  labels:
 | 
			
		||||
    app: oc-front-svc
 | 
			
		||||
spec:
 | 
			
		||||
  ports:
 | 
			
		||||
  - name: http
 | 
			
		||||
    port: 8080
 | 
			
		||||
    protocol: TCP
 | 
			
		||||
    targetPort: 80
 | 
			
		||||
  selector:
 | 
			
		||||
    app: oc-front
 | 
			
		||||
  type: ClusterIP
 | 
			
		||||
{{- end }}
 | 
			
		||||
		Reference in New Issue
	
	Block a user