github.com/freiheit-com/kuberpult@v1.24.2-0.20240328135542-315d5630abe6/charts/kuberpult/templates/ingress.yaml (about)

     1  # This file is part of kuberpult.
     2  
     3  # Kuberpult is free software: you can redistribute it and/or modify
     4  # it under the terms of the Expat(MIT) License as published by
     5  # the Free Software Foundation.
     6  
     7  # Kuberpult is distributed in the hope that it will be useful,
     8  # but WITHOUT ANY WARRANTY; without even the implied warranty of
     9  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    10  # MIT License for more details.
    11  
    12  # You should have received a copy of the MIT License
    13  # along with kuberpult. If not, see <https://directory.fsf.org/wiki/License:Expat>.
    14  
    15  # Copyright 2023 freiheit.com
    16  # This file is part of kuberpult.
    17  
    18  # Kuberpult is free software: you can redistribute it and/or modify
    19  # it under the terms of the Expat(MIT) License as published by
    20  # the Free Software Foundation.
    21  
    22  # Kuberpult is distributed in the hope that it will be useful,
    23  # but WITHOUT ANY WARRANTY; without even the implied warranty of
    24  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    25  # MIT License for more details.
    26  
    27  # You should have received a copy of the MIT License
    28  # along with kuberpult. If not, see <https://directory.fsf.org/wiki/License:Expat>.
    29  
    30  # Copyright 2023 freiheit.com
    31  # This file is part of kuberpult.
    32  
    33  # Kuberpult is free software: you can redistribute it and/or modify
    34  #it under the terms of the GNU General Public License as published by
    35  #the Free Software Foundation, either version 3 of the License, or
    36  #(at your option) any later version.
    37  
    38  # Kuberpult is distributed in the hope that it will be useful,
    39  # but WITHOUT ANY WARRANTY; without even the implied warranty of
    40  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    41  #GNU General Public License for more details.
    42  
    43  #You should have received a copy of the GNU General Public License
    44  #along with kuberpult.  If not, see <http://www.gnu.org/licenses/>.
    45  
    46  #Copyright 2022 freiheit.com
    47  
    48  {{- if .Values.ingress.exposeReleaseEndpoint }}
    49  {{ fail "Values.ingress.exposeReleaseEndpoint cannot be used anymore. Use the frontend service to call the /release endpoint"}}
    50  {{ end -}}
    51  
    52  {{- if .Values.ingress.create }}
    53  apiVersion: networking.k8s.io/v1
    54  kind: Ingress
    55  metadata:
    56    annotations:
    57      cert-manager.io/acme-challenge-type: dns01
    58      cert-manager.io/cluster-issuer: letsencrypt
    59  {{- range $key, $value := .Values.ingress.annotations }}
    60      {{ $key | quote}}: {{ $value | quote}}
    61  {{- end }}
    62    name: kuberpult
    63  spec:
    64  {{- if .Values.ingress.ingressClassName }}
    65    ingressClassName: {{ .Values.ingress.ingressClassName | quote }}
    66  {{- end }}
    67    rules:
    68    - host: {{ required ".ingress.domainName is required" .Values.ingress.domainName | quote }}
    69      http:
    70        paths:
    71        - pathType: ImplementationSpecific
    72          backend:
    73            service:
    74              name: kuberpult-frontend-service
    75              port:
    76                name: http
    77    tls:
    78    - hosts:
    79      - {{ default .Values.ingress.domainName .Values.ingress.tls.host | quote}}
    80      secretName: {{.Values.ingress.tls.secretName | quote}}
    81  ---
    82  {{- if .Values.ingress.iap.enabled }}
    83  apiVersion: cloud.google.com/v1beta1
    84  kind: BackendConfig
    85  metadata:
    86    name: kuberpult
    87  spec:
    88    healthCheck:
    89      requestPath: /healthz
    90      type: HTTP
    91    iap:
    92      enabled: true
    93      oauthclientCredentials:
    94        secretName: {{ required ".ingress.iap.secretName is required" .Values.ingress.iap.secretName }}
    95  {{- end }}
    96  {{- end }}