github.com/zppinho/prow@v0.0.0-20240510014325-1738badeb017/test/integration/config/prow/cluster/moonraker_deployment.yaml (about)

     1  apiVersion: apps/v1
     2  # In production, Moonraker should be deployed as a StatefulSet so that its Git
     3  # repos that it clones can be persisted across deployments. But for integration
     4  # tests, this is not necessary because we bring up the entire cluster from
     5  # scratch.
     6  kind: Deployment
     7  metadata:
     8    namespace: default
     9    name: moonraker
    10    labels:
    11      app: moonraker
    12  spec:
    13    selector:
    14      matchLabels:
    15        app: moonraker
    16    replicas: 1
    17    template:
    18      metadata:
    19        labels:
    20          app: moonraker
    21      spec:
    22        # For development and CI, we don't care that much about graceful shutdown,
    23        # so use 5 seconds to override the default of 25.
    24        terminationGracePeriodSeconds: 5
    25        serviceAccountName: moonraker
    26        containers:
    27        - name: moonraker
    28          image: localhost:5001/moonraker
    29          args:
    30          - --config-path=/etc/config/config.yaml
    31          - --job-config-path=/etc/job-config
    32          # Use a static, predictable folder for storing primary clones.
    33          - --cache-dir-base=/etc/moonraker-inrepoconfig-pv
    34          # This cookie file is only here to trigger the creation of a
    35          # Gerrit-flavored Git client factory. So this makes this moonraker deployment
    36          # "tied" to Gerrit.
    37          #
    38          # TODO (listx): Allow moonraker to be deployed with access to multiple
    39          # GitHub/Gerrit credentials (and make it know which one to use based on
    40          # the org/repo name). We can't simply deploy a 2nd moonraker deployment
    41          # configured with GitHub creds to test that codepath because currently
    42          # moonraker will always choose one or the other.
    43          - --cookiefile=/etc/cookies/cookies
    44          ports:
    45          - name: http
    46            containerPort: 8080
    47          - name: metrics
    48            containerPort: 9090
    49          volumeMounts:
    50          - name: cookies
    51            mountPath: /etc/cookies
    52            readOnly: true
    53          - name: config
    54            mountPath: /etc/config
    55            readOnly: true
    56          - name: job-config
    57            mountPath: /etc/job-config
    58            readOnly: true
    59          - name: git-config-system
    60            mountPath: /etc/git-config-system
    61            readOnly: true
    62          livenessProbe:
    63            httpGet:
    64              path: /healthz
    65              port: 8081
    66            initialDelaySeconds: 3
    67            periodSeconds: 3
    68          readinessProbe:
    69            httpGet:
    70              path: /healthz/ready
    71              port: 8081
    72            initialDelaySeconds: 10
    73            periodSeconds: 3
    74            timeoutSeconds: 600
    75          env:
    76          # When cloning from an inrepoconfig repo, don't bother verifying certs.
    77          # This allows us to use "https://..." addresses to fakegitserver.
    78          - name: GIT_SSL_NO_VERIFY
    79            value: "1"
    80          - name: GIT_CONFIG_SYSTEM
    81            value: /etc/git-config-system/config
    82        volumes:
    83        - name: cookies
    84          secret:
    85            defaultMode: 420
    86            secretName: http-cookiefile
    87        - name: config
    88          configMap:
    89            name: config
    90        - name: job-config
    91          configMap:
    92            name: job-config
    93        - name: git-config-system
    94          configMap:
    95            name: git-config-system