cluster

Infrastructure files for Nordgedanken and Midnightthoughts.
git clone git://archive.git.mtrnord.blog/MTRNord/cluster.git
Log | Files | Refs | README

ingress.yaml (2411B)


      1 apiVersion: gateway.networking.k8s.io/v1
      2 kind: HTTPRoute
      3 metadata:
      4   name: gerrit-ingress
      5   namespace: gerrit
      6 spec:
      7   parentRefs:
      8     - name: envoy-gateway
      9       namespace: envoy-gateway
     10   hostnames:
     11     - gerrit.midnightthoughts.space
     12   rules:
     13     - backendRefs:
     14         - name: gerrit-replica-service
     15           port: 80
     16       matches:
     17         - path:
     18             value: /.*/git-upload-pack
     19             type: RegularExpression
     20       timeouts:
     21         request: 240s
     22         backendRequest: 0s
     23     - backendRefs:
     24         - name: gerrit-service
     25           port: 80
     26       matches:
     27         - path:
     28             value: /
     29             type: PathPrefix
     30       timeouts:
     31         request: 240s
     32         backendRequest: 0s
     33 ---
     34 apiVersion: gateway.envoyproxy.io/v1alpha1
     35 kind: BackendTrafficPolicy
     36 metadata:
     37   name: gerrit-ingress-cookie-policy
     38   namespace: gerrit
     39 spec:
     40   targetRefs:
     41     - group: gateway.networking.k8s.io
     42       kind: HTTPRoute
     43       name: gerrit-ingress
     44   loadBalancer:
     45     type: ConsistentHash
     46     consistentHash:
     47       type: Cookie
     48       cookie:
     49         name: Gerrit_Session
     50         ttl: 3600s
     51         attributes:
     52           SameSite: Strict
     53 ---
     54 apiVersion: gateway.networking.k8s.io/v1
     55 kind: HTTPRoute
     56 metadata:
     57   name: gerrit-403
     58   namespace: gerrit
     59 spec:
     60   parentRefs:
     61     - name: envoy-gateway
     62       namespace: envoy-gateway
     63   hostnames:
     64     - gerrit.midnightthoughts.space
     65   rules:
     66     - backendRefs:
     67         - name: gerrit-replica-service
     68           port: 80
     69       matches:
     70         - path:
     71             value: /(a)?/plugins/high-availability/.*
     72             type: RegularExpression
     73       timeouts:
     74         request: 240s
     75         backendRequest: 0s
     76 ---
     77 apiVersion: gateway.envoyproxy.io/v1alpha1
     78 kind: SecurityPolicy
     79 metadata:
     80   name: gerrit-403
     81   namespace: gerrit
     82 spec:
     83   targetRefs:
     84     - group: gateway.networking.k8s.io
     85       kind: HTTPRoute
     86       name: gerrit-403
     87   authorization:
     88     defaultAction: Deny
     89     rules:
     90       - action: Allow
     91         principal:
     92           clientCIDRs:
     93             - 127.0.0.1/32
     94 ---
     95 apiVersion: gateway.networking.k8s.io/v1alpha2
     96 kind: TCPRoute
     97 metadata:
     98   name: gerrit-ssh
     99   namespace: gerrit
    100   annotations:
    101     external-dns.alpha.kubernetes.io/hostname: ldap.midnightthoughts.space
    102 spec:
    103   parentRefs:
    104     - name: envoy-gateway
    105       namespace: envoy-gateway
    106       sectionName: gerrit-ssh
    107   rules:
    108     - backendRefs:
    109         - name: gerrit-service
    110           port: 29418