|
| 1 | +--- |
| 2 | +# Source: nginx-gateway-fabric/templates/deployment.yaml |
| 3 | +apiVersion: apps/v1 |
| 4 | +kind: Deployment |
| 5 | +metadata: |
| 6 | + name: nginx-gateway |
| 7 | + namespace: nginx-gateway |
| 8 | + labels: |
| 9 | + app.kubernetes.io/name: nginx-gateway |
| 10 | + app.kubernetes.io/instance: nginx-gateway |
| 11 | + app.kubernetes.io/version: "1.5.0" |
| 12 | +spec: |
| 13 | + replicas: 1 |
| 14 | + selector: |
| 15 | + matchLabels: |
| 16 | + app.kubernetes.io/name: nginx-gateway |
| 17 | + app.kubernetes.io/instance: nginx-gateway |
| 18 | + template: |
| 19 | + metadata: |
| 20 | + labels: |
| 21 | + app.kubernetes.io/name: nginx-gateway |
| 22 | + app.kubernetes.io/instance: nginx-gateway |
| 23 | + spec: |
| 24 | + initContainers: |
| 25 | + - name: copy-nginx-config |
| 26 | + image: ghcr.io/nginxinc/nginx-gateway-fabric:1.5.0 |
| 27 | + imagePullPolicy: IfNotPresent |
| 28 | + command: |
| 29 | + - /usr/bin/gateway |
| 30 | + - copy |
| 31 | + - --source |
| 32 | + - /includes/main.conf |
| 33 | + - --destination |
| 34 | + - /etc/nginx/main-includes/main.conf |
| 35 | + securityContext: |
| 36 | + seccompProfile: |
| 37 | + type: RuntimeDefault |
| 38 | + capabilities: |
| 39 | + add: |
| 40 | + - KILL # Set because the binary has CAP_KILL for the main controller process. Not used by init. |
| 41 | + drop: |
| 42 | + - ALL |
| 43 | + readOnlyRootFilesystem: true |
| 44 | + runAsUser: 102 |
| 45 | + runAsGroup: 1001 |
| 46 | + volumeMounts: |
| 47 | + - name: nginx-includes-configmap |
| 48 | + mountPath: /includes |
| 49 | + - name: nginx-main-includes |
| 50 | + mountPath: /etc/nginx/main-includes |
| 51 | + containers: |
| 52 | + - args: |
| 53 | + - static-mode |
| 54 | + - --gateway-ctlr-name=gateway.nginx.org/nginx-gateway-controller |
| 55 | + - --gatewayclass=nginx |
| 56 | + - --config=nginx-gateway-config |
| 57 | + - --service=nginx-gateway |
| 58 | + - --metrics-disable |
| 59 | + - --health-port=8081 |
| 60 | + - --leader-election-lock-name=nginx-gateway-leader-election |
| 61 | + - --product-telemetry-disable |
| 62 | + env: |
| 63 | + - name: POD_IP |
| 64 | + valueFrom: |
| 65 | + fieldRef: |
| 66 | + fieldPath: status.podIP |
| 67 | + - name: POD_NAMESPACE |
| 68 | + valueFrom: |
| 69 | + fieldRef: |
| 70 | + fieldPath: metadata.namespace |
| 71 | + - name: POD_NAME |
| 72 | + valueFrom: |
| 73 | + fieldRef: |
| 74 | + fieldPath: metadata.name |
| 75 | + image: ghcr.io/nginxinc/nginx-gateway-fabric:1.5.0 |
| 76 | + imagePullPolicy: IfNotPresent |
| 77 | + name: nginx-gateway |
| 78 | + ports: |
| 79 | + - name: health |
| 80 | + containerPort: 8081 |
| 81 | + readinessProbe: |
| 82 | + httpGet: |
| 83 | + path: /readyz |
| 84 | + port: health |
| 85 | + initialDelaySeconds: 3 |
| 86 | + periodSeconds: 1 |
| 87 | + securityContext: |
| 88 | + seccompProfile: |
| 89 | + type: RuntimeDefault |
| 90 | + allowPrivilegeEscalation: false |
| 91 | + capabilities: |
| 92 | + add: |
| 93 | + - KILL |
| 94 | + drop: |
| 95 | + - ALL |
| 96 | + readOnlyRootFilesystem: true |
| 97 | + runAsUser: 102 |
| 98 | + runAsGroup: 1001 |
| 99 | + volumeMounts: |
| 100 | + - name: nginx-conf |
| 101 | + mountPath: /etc/nginx/conf.d |
| 102 | + - name: nginx-stream-conf |
| 103 | + mountPath: /etc/nginx/stream-conf.d |
| 104 | + - name: nginx-main-includes |
| 105 | + mountPath: /etc/nginx/main-includes |
| 106 | + - name: nginx-secrets |
| 107 | + mountPath: /etc/nginx/secrets |
| 108 | + - name: nginx-run |
| 109 | + mountPath: /var/run/nginx |
| 110 | + - name: nginx-includes |
| 111 | + mountPath: /etc/nginx/includes |
| 112 | + - image: ghcr.io/nginxinc/nginx-gateway-fabric/nginx:1.5.0 |
| 113 | + imagePullPolicy: IfNotPresent |
| 114 | + name: nginx |
| 115 | + ports: |
| 116 | + - containerPort: 80 |
| 117 | + name: http |
| 118 | + - containerPort: 443 |
| 119 | + name: https |
| 120 | + securityContext: |
| 121 | + seccompProfile: |
| 122 | + type: RuntimeDefault |
| 123 | + capabilities: |
| 124 | + add: |
| 125 | + - NET_BIND_SERVICE |
| 126 | + drop: |
| 127 | + - ALL |
| 128 | + readOnlyRootFilesystem: true |
| 129 | + runAsUser: 101 |
| 130 | + runAsGroup: 1001 |
| 131 | + volumeMounts: |
| 132 | + - name: nginx-conf |
| 133 | + mountPath: /etc/nginx/conf.d |
| 134 | + - name: nginx-stream-conf |
| 135 | + mountPath: /etc/nginx/stream-conf.d |
| 136 | + - name: nginx-main-includes |
| 137 | + mountPath: /etc/nginx/main-includes |
| 138 | + - name: nginx-secrets |
| 139 | + mountPath: /etc/nginx/secrets |
| 140 | + - name: nginx-run |
| 141 | + mountPath: /var/run/nginx |
| 142 | + - name: nginx-cache |
| 143 | + mountPath: /var/cache/nginx |
| 144 | + - name: nginx-includes |
| 145 | + mountPath: /etc/nginx/includes |
| 146 | + terminationGracePeriodSeconds: 30 |
| 147 | + serviceAccountName: nginx-gateway |
| 148 | + shareProcessNamespace: true |
| 149 | + securityContext: |
| 150 | + fsGroup: 1001 |
| 151 | + runAsNonRoot: true |
| 152 | + volumes: |
| 153 | + - name: nginx-conf |
| 154 | + emptyDir: {} |
| 155 | + - name: nginx-stream-conf |
| 156 | + emptyDir: {} |
| 157 | + - name: nginx-main-includes |
| 158 | + emptyDir: {} |
| 159 | + - name: nginx-secrets |
| 160 | + emptyDir: {} |
| 161 | + - name: nginx-run |
| 162 | + emptyDir: {} |
| 163 | + - name: nginx-cache |
| 164 | + emptyDir: {} |
| 165 | + - name: nginx-includes |
| 166 | + emptyDir: {} |
| 167 | + - name: nginx-includes-configmap |
| 168 | + configMap: |
| 169 | + name: nginx-includes |
0 commit comments