|
| 1 | +kind: Deployment |
| 2 | +apiVersion: apps/v1 |
| 3 | +metadata: |
| 4 | + name: rhdh |
| 5 | + namespace: ${SANDBOX_UI_NS} |
| 6 | + labels: |
| 7 | + app.kubernetes.io/instance: rhdh |
| 8 | +spec: |
| 9 | + replicas: 1 |
| 10 | + selector: |
| 11 | + matchLabels: |
| 12 | + app.kubernetes.io/instance: rhdh |
| 13 | + template: |
| 14 | + metadata: |
| 15 | + labels: |
| 16 | + app.kubernetes.io/instance: rhdh |
| 17 | + spec: |
| 18 | + restartPolicy: Always |
| 19 | + initContainers: |
| 20 | + - name: install-dynamic-plugins |
| 21 | + command: |
| 22 | + - ./install-dynamic-plugins.sh |
| 23 | + - /dynamic-plugins-root |
| 24 | + env: |
| 25 | + - name: NPM_CONFIG_USERCONFIG |
| 26 | + value: /opt/app-root/src/.npmrc.dynamic-plugins |
| 27 | + resources: |
| 28 | + limits: |
| 29 | + cpu: "1" |
| 30 | + ephemeral-storage: 5Gi |
| 31 | + memory: 2560Mi |
| 32 | + requests: |
| 33 | + cpu: 250m |
| 34 | + memory: 256Mi |
| 35 | + terminationMessagePath: /dev/termination-log |
| 36 | + securityContext: |
| 37 | + capabilities: |
| 38 | + drop: |
| 39 | + - ALL |
| 40 | + runAsNonRoot: true |
| 41 | + allowPrivilegeEscalation: false |
| 42 | + seccompProfile: |
| 43 | + type: RuntimeDefault |
| 44 | + imagePullPolicy: Always |
| 45 | + volumeMounts: |
| 46 | + - name: dynamic-plugins-root |
| 47 | + mountPath: /dynamic-plugins-root |
| 48 | + - name: dynamic-plugins |
| 49 | + readOnly: true |
| 50 | + mountPath: /opt/app-root/src/dynamic-plugins.yaml |
| 51 | + subPath: dynamic-plugins.yaml |
| 52 | + - name: dynamic-plugins-npmrc |
| 53 | + readOnly: true |
| 54 | + mountPath: /opt/app-root/src/.npmrc.dynamic-plugins |
| 55 | + subPath: .npmrc |
| 56 | + - name: dynamic-plugins-registry-auth |
| 57 | + readOnly: true |
| 58 | + mountPath: /opt/app-root/src/.config/containers |
| 59 | + - name: npmcacache |
| 60 | + mountPath: /opt/app-root/src/.npm/_cacache |
| 61 | + terminationMessagePolicy: File |
| 62 | + image: "registry.redhat.io/rhdh/rhdh-hub-rhel9@sha256:79618b38d6f02457954b227d538e238fdebbb72a220af5bd6be3cfab3ad0f262" |
| 63 | + workingDir: /opt/app-root/src |
| 64 | + serviceAccountName: rhdh |
| 65 | + schedulerName: default-scheduler |
| 66 | + terminationGracePeriodSeconds: 30 |
| 67 | + securityContext: {} |
| 68 | + containers: |
| 69 | + - name: backstage-backend |
| 70 | + args: |
| 71 | + - "--config" |
| 72 | + - dynamic-plugins-root/app-config.dynamic-plugins.yaml |
| 73 | + - "--config" |
| 74 | + - /opt/app-root/src/app-config-from-configmap.yaml |
| 75 | + env: |
| 76 | + - name: APP_CONFIG_backend_listen_port |
| 77 | + value: "7007" |
| 78 | + ports: |
| 79 | + - name: backend |
| 80 | + containerPort: 7007 |
| 81 | + protocol: TCP |
| 82 | + imagePullPolicy: Always |
| 83 | + image: "registry.redhat.io/rhdh/rhdh-hub-rhel9:1.5" |
| 84 | + resources: |
| 85 | + limits: |
| 86 | + cpu: "1" |
| 87 | + ephemeral-storage: 5Gi |
| 88 | + memory: 2560Mi |
| 89 | + requests: |
| 90 | + cpu: 250m |
| 91 | + memory: 1Gi |
| 92 | + readinessProbe: |
| 93 | + httpGet: |
| 94 | + path: /.backstage/health/v1/readiness |
| 95 | + port: backend |
| 96 | + scheme: HTTP |
| 97 | + timeoutSeconds: 4 |
| 98 | + periodSeconds: 10 |
| 99 | + successThreshold: 2 |
| 100 | + failureThreshold: 3 |
| 101 | + terminationMessagePath: /dev/termination-log |
| 102 | + livenessProbe: |
| 103 | + httpGet: |
| 104 | + path: /.backstage/health/v1/liveness |
| 105 | + port: backend |
| 106 | + scheme: HTTP |
| 107 | + timeoutSeconds: 4 |
| 108 | + periodSeconds: 10 |
| 109 | + successThreshold: 1 |
| 110 | + failureThreshold: 3 |
| 111 | + securityContext: |
| 112 | + capabilities: |
| 113 | + drop: |
| 114 | + - ALL |
| 115 | + runAsNonRoot: true |
| 116 | + allowPrivilegeEscalation: false |
| 117 | + seccompProfile: |
| 118 | + type: RuntimeDefault |
| 119 | + startupProbe: |
| 120 | + httpGet: |
| 121 | + path: /.backstage/health/v1/liveness |
| 122 | + port: backend |
| 123 | + scheme: HTTP |
| 124 | + initialDelaySeconds: 30 |
| 125 | + timeoutSeconds: 4 |
| 126 | + periodSeconds: 20 |
| 127 | + successThreshold: 1 |
| 128 | + failureThreshold: 3 |
| 129 | + volumeMounts: |
| 130 | + - name: backstage-app-config |
| 131 | + mountPath: /opt/app-root/src/app-config-from-configmap.yaml |
| 132 | + subPath: app-config.yaml |
| 133 | + - name: dynamic-plugins-root |
| 134 | + mountPath: /opt/app-root/src/dynamic-plugins-root |
| 135 | + terminationMessagePolicy: File |
| 136 | + serviceAccount: rhdh |
| 137 | + volumes: |
| 138 | + - name: dynamic-plugins-root |
| 139 | + emptyDir: {} |
| 140 | + - name: dynamic-plugins |
| 141 | + configMap: |
| 142 | + name: rhdh-dynamic-plugins |
| 143 | + defaultMode: 420 |
| 144 | + optional: true |
| 145 | + - name: dynamic-plugins-npmrc |
| 146 | + secret: |
| 147 | + secretName: rhdh-dynamic-plugins-npmrc |
| 148 | + defaultMode: 420 |
| 149 | + optional: true |
| 150 | + - name: dynamic-plugins-registry-auth |
| 151 | + secret: |
| 152 | + secretName: rhdh-dynamic-plugins-registry-auth |
| 153 | + defaultMode: 416 |
| 154 | + optional: true |
| 155 | + - name: npmcacache |
| 156 | + emptyDir: {} |
| 157 | + - name: backstage-app-config |
| 158 | + configMap: |
| 159 | + name: rhdh-app-config |
| 160 | + defaultMode: 420 |
| 161 | + dnsPolicy: ClusterFirst |
| 162 | + strategy: |
| 163 | + type: RollingUpdate |
| 164 | + rollingUpdate: |
| 165 | + maxUnavailable: 25% |
| 166 | + maxSurge: 25% |
| 167 | + revisionHistoryLimit: 10 |
| 168 | + progressDeadlineSeconds: 600 |
0 commit comments