Skip to content

A desktop coding agent with free access to frontier models.

TypeScript
3.7 KB
Raw Blame
{{- include "omnirush-ee.customCa.validate" . }}
apiVersion: v1
kind: Service
metadata:
  name: {{ include "omnirush-ee.denWebServiceName" . }}
  labels:
    {{- include "omnirush-ee.componentLabels" (dict "root" . "component" "den-web") | nindent 4 }}
  {{- with .Values.denWeb.service.annotations }}
  annotations:
    {{- toYaml . | nindent 4 }}
  {{- end }}
spec:
  type: {{ .Values.denWeb.service.type }}
  {{- with .Values.denWeb.service.loadBalancerClass }}
  loadBalancerClass: {{ . | quote }}
  {{- end }}
  {{- with .Values.denWeb.service.loadBalancerSourceRanges }}
  loadBalancerSourceRanges:
    {{- toYaml . | nindent 4 }}
  {{- end }}
  ports:
    - name: http
      port: {{ .Values.denWeb.service.port }}
      targetPort: http
  selector:
    {{- include "omnirush-ee.componentSelectorLabels" (dict "root" . "component" "den-web") | nindent 4 }}
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "omnirush-ee.fullname" . }}-den-web
  labels:
    {{- include "omnirush-ee.componentLabels" (dict "root" . "component" "den-web") | nindent 4 }}
spec:
  replicas: {{ .Values.denWeb.replicaCount }}
  selector:
    matchLabels:
      {{- include "omnirush-ee.componentSelectorLabels" (dict "root" . "component" "den-web") | nindent 6 }}
  template:
    metadata:
      labels:
        {{- include "omnirush-ee.componentSelectorLabels" (dict "root" . "component" "den-web") | nindent 8 }}
        {{- with .Values.denWeb.podLabels }}
        {{- toYaml . | nindent 8 }}
        {{- end }}
      annotations:
        checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
        checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
        {{- with .Values.denWeb.podAnnotations }}
        {{- toYaml . | nindent 8 }}
        {{- end }}
    spec:
      {{- with .Values.imagePullSecrets }}
      imagePullSecrets:
        {{- toYaml . | nindent 8 }}
      {{- end }}
      {{- if .Values.customCa.enabled }}
      volumes:
        {{- include "omnirush-ee.customCa.volume" . | nindent 8 }}
      {{- end }}
      containers:
        - name: den-web
          image: "{{ .Values.denWeb.image.repository }}:{{ default .Values.image.tag .Values.denWeb.image.tag }}"
          imagePullPolicy: {{ .Values.image.pullPolicy }}
          ports:
            - name: http
              containerPort: {{ .Values.denWeb.containerPort }}
          {{- if .Values.customCa.enabled }}
          volumeMounts:
            {{- include "omnirush-ee.customCa.volumeMount" . | nindent 12 }}
          {{- end }}
          envFrom:
            - configMapRef:
                name: {{ include "omnirush-ee.configName" . }}
            - secretRef:
                name: {{ include "omnirush-ee.secretName" . }}
          env:
            - name: PORT
              value: {{ .Values.denWeb.containerPort | quote }}
            {{- if .Values.customCa.enabled }}
            {{- include "omnirush-ee.customCa.env" . | nindent 12 }}
            {{- end }}
            {{- include "omnirush-ee.observabilityEnv" (dict "root" . "serviceName" .Values.observability.serviceNames.denWeb) | nindent 12 }}
            {{- range $key, $value := .Values.denWeb.env }}
            - name: {{ $key }}
              value: {{ $value | quote }}
            {{- end }}
          livenessProbe:
            httpGet:
              path: /api/health
              port: http
            {{- toYaml .Values.denWeb.probes.liveness | nindent 12 }}
          readinessProbe:
            httpGet:
              path: /api/ready
              port: http
            {{- toYaml .Values.denWeb.probes.readiness | nindent 12 }}
          {{- with .Values.denWeb.resources }}
          resources:
            {{- toYaml . | nindent 12 }}
          {{- end }}