Commit b204813a authored by Muhammad Umair Khan's avatar Muhammad Umair Khan
Browse files

integrate containerized Tilt and configure UE map icons

- Add custom containerized 'meep-tilt' Helm chart and daemon exposed at /tilt/
- Resolve clashing root path annotations in 'meep-sandbox-api' Ingress values
- Support dynamic host/user path resolution (gitdir, workdir, homedir) in meepctl
- Integrate 'OPEN TILT' action button in Alt monitor portal
- Implement dropdown selection and metadata persistence for UE (Terminal) map icons
- Gracefully handle/ignore 409 conflicts on active sandboxes in meep-auth-svc
parent d0b0bb86
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -54,10 +54,6 @@ ingress:
  hosts:
    - name: ''
      paths:
        - /
        - /api
        - /alt
        - /alt/api
        - /sandbox-api
  annotations:
    kubernetes.io/ingress.class: nginx

charts/tilt/Chart.yaml

0 → 100644
+5 −0
Original line number Diff line number Diff line
apiVersion: v1
appVersion: "1.0.0"
description: A Helm chart for Tilt
name: tilt
version: 1.0.0
+71 −0
Original line number Diff line number Diff line
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ .Release.Name }}
  labels:
    app: {{ .Release.Name }}
spec:
  replicas: {{ .Values.replicaCount }}
  selector:
    matchLabels:
      app: {{ .Release.Name }}
  template:
    metadata:
      labels:
        app: {{ .Release.Name }}
    spec:
      containers:
        - name: tilt
          image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
          imagePullPolicy: {{ .Values.image.pullPolicy }}
          env:
            - name: GITDIR
              value: {{ .Values.gitdir | quote }}
            - name: WORKDIR
              value: {{ .Values.workdir | quote }}
          ports:
            - containerPort: 10350
              name: web
          securityContext:
            privileged: true
          volumeMounts:
            - name: docker-socket
              mountPath: /var/run/docker.sock
            - name: kube-config
              mountPath: /root/.kube/config
              subPath: config
            - name: meepctl-yaml
              mountPath: /root/.meepctl.yaml
              subPath: .meepctl.yaml
            - name: gitdir
              mountPath: {{ .Values.gitdir }}
            - name: workdir
              mountPath: {{ .Values.workdir }}
            - name: meepctl-bin
              mountPath: /usr/local/bin/meepctl
              subPath: meepctl
      volumes:
        - name: docker-socket
          hostPath:
            path: /var/run/docker.sock
            type: Socket
        - name: kube-config
          hostPath:
            path: {{ .Values.homedir }}/.kube
            type: Directory
        - name: meepctl-yaml
          hostPath:
            path: {{ .Values.homedir }}
            type: Directory
        - name: gitdir
          hostPath:
            path: {{ .Values.gitdir }}
            type: Directory
        - name: workdir
          hostPath:
            path: {{ .Values.workdir }}
            type: Directory
        - name: meepctl-bin
          hostPath:
            path: {{ .Values.homedir }}/gocode/bin
            type: Directory
+40 −0
Original line number Diff line number Diff line
{{- if .Values.ingress.enabled -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: {{ .Release.Name }}
  labels:
    app: {{ .Release.Name }}
  annotations:
    {{- range $key, $value := .Values.ingress.annotations }}
    {{ $key }}: {{ $value | quote }}
    {{- end }}
    nginx.ingress.kubernetes.io/configuration-snippet: |
      rewrite ^/tilt$ $scheme://$http_host/tilt/ permanent;
      proxy_set_header Accept-Encoding "";
      sub_filter_once off;
      sub_filter_types text/html text/javascript application/javascript;
      sub_filter 'src="/' 'src="/tilt/';
      sub_filter 'href="/' 'href="/tilt/';
      sub_filter '"/ws/view"' '"/tilt/ws/view"';
      sub_filter '"/api/' '"/tilt/api/';
      sub_filter '"api/' '"tilt/api/';
spec:
  rules:
    {{- range .Values.ingress.hosts }}
    - http:
        paths:
          {{- range $path := .paths }}
          - path: "{{ $path }}(/|$)(.*)"
            pathType: ImplementationSpecific
            backend:
              service:
                name: {{ $.Release.Name }}
                port:
                  number: {{ $.Values.service.port }}
          {{- end }}
      {{- if .name }}
      host: {{ .name }}
      {{- end }}
    {{- end }}
{{- end }}
+15 −0
Original line number Diff line number Diff line
apiVersion: v1
kind: Service
metadata:
  name: {{ .Release.Name }}
  labels:
    app: {{ .Release.Name }}
spec:
  type: {{ .Values.service.type }}
  ports:
    - port: {{ .Values.service.port }}
      targetPort: 10350
      protocol: TCP
      name: web
  selector:
    app: {{ .Release.Name }}
Loading