123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267 |
- apiVersion: v1
- kind: Namespace
- metadata:
- name: nginx-gateway
- ---
- # Source: nginx-gateway-fabric/templates/rbac.yaml
- apiVersion: v1
- kind: ServiceAccount
- metadata:
- name: nginx-gateway
- namespace: nginx-gateway
- labels:
- app.kubernetes.io/name: nginx-gateway
- app.kubernetes.io/instance: nginx-gateway
- app.kubernetes.io/version: "1.1.0"
- annotations:
- {}
- ---
- # Source: nginx-gateway-fabric/templates/rbac.yaml
- apiVersion: rbac.authorization.k8s.io/v1
- kind: ClusterRole
- metadata:
- name: nginx-gateway
- labels:
- app.kubernetes.io/name: nginx-gateway
- app.kubernetes.io/instance: nginx-gateway
- app.kubernetes.io/version: "1.1.0"
- rules:
- - apiGroups:
- - ""
- resources:
- - namespaces
- - services
- - secrets
- verbs:
- - list
- - watch
- - apiGroups:
- - ""
- resources:
- - events
- verbs:
- - create
- - patch
- - apiGroups:
- - discovery.k8s.io
- resources:
- - endpointslices
- verbs:
- - list
- - watch
- - apiGroups:
- - gateway.networking.k8s.io
- resources:
- - gatewayclasses
- - gateways
- - httproutes
- - referencegrants
- verbs:
- - list
- - watch
- - apiGroups:
- - gateway.networking.k8s.io
- resources:
- - httproutes/status
- - gateways/status
- - gatewayclasses/status
- verbs:
- - update
- - apiGroups:
- - gateway.nginx.org
- resources:
- - nginxgateways
- verbs:
- - get
- - list
- - watch
- - apiGroups:
- - gateway.nginx.org
- resources:
- - nginxgateways/status
- verbs:
- - update
- - apiGroups:
- - coordination.k8s.io
- resources:
- - leases
- verbs:
- - create
- - get
- - update
- - apiGroups:
- - apiextensions.k8s.io
- resources:
- - customresourcedefinitions
- verbs:
- - list
- - watch
- ---
- # Source: nginx-gateway-fabric/templates/rbac.yaml
- apiVersion: rbac.authorization.k8s.io/v1
- kind: ClusterRoleBinding
- metadata:
- name: nginx-gateway
- labels:
- app.kubernetes.io/name: nginx-gateway
- app.kubernetes.io/instance: nginx-gateway
- app.kubernetes.io/version: "1.1.0"
- roleRef:
- apiGroup: rbac.authorization.k8s.io
- kind: ClusterRole
- name: nginx-gateway
- subjects:
- - kind: ServiceAccount
- name: nginx-gateway
- namespace: nginx-gateway
- ---
- # Source: nginx-gateway-fabric/templates/deployment.yaml
- apiVersion: apps/v1
- kind: Deployment
- metadata:
- name: nginx-gateway
- namespace: nginx-gateway
- labels:
- app.kubernetes.io/name: nginx-gateway
- app.kubernetes.io/instance: nginx-gateway
- app.kubernetes.io/version: "1.1.0"
- spec:
- replicas: 1
- selector:
- matchLabels:
- app.kubernetes.io/name: nginx-gateway
- app.kubernetes.io/instance: nginx-gateway
- template:
- metadata:
- labels:
- app.kubernetes.io/name: nginx-gateway
- app.kubernetes.io/instance: nginx-gateway
- annotations:
- prometheus.io/scrape: "true"
- prometheus.io/port: "9113"
- spec:
- containers:
- - args:
- - static-mode
- - --gateway-ctlr-name=gateway.nginx.org/nginx-gateway-controller
- - --gatewayclass=nginx
- - --config=nginx-gateway-config
- - --service=nginx-gateway
- - --metrics-port=9113
- - --health-port=8081
- - --leader-election-lock-name=nginx-gateway-leader-election
- env:
- - name: POD_IP
- valueFrom:
- fieldRef:
- fieldPath: status.podIP
- - name: POD_NAMESPACE
- valueFrom:
- fieldRef:
- fieldPath: metadata.namespace
- - name: POD_NAME
- valueFrom:
- fieldRef:
- fieldPath: metadata.name
- image: ghcr.io/nginxinc/nginx-gateway-fabric:1.1.0
- imagePullPolicy: IfNotPresent
- name: nginx-gateway
- ports:
- - name: metrics
- containerPort: 9113
- - name: health
- containerPort: 8081
- readinessProbe:
- httpGet:
- path: /readyz
- port: health
- initialDelaySeconds: 3
- periodSeconds: 1
- securityContext:
- allowPrivilegeEscalation: false
- capabilities:
- add:
- - KILL
- drop:
- - ALL
- readOnlyRootFilesystem: true
- runAsUser: 102
- runAsGroup: 1001
- volumeMounts:
- - name: nginx-conf
- mountPath: /etc/nginx/conf.d
- - name: nginx-secrets
- mountPath: /etc/nginx/secrets
- - name: nginx-run
- mountPath: /var/run/nginx
- - image: ghcr.io/nginxinc/nginx-gateway-fabric/nginx:1.1.0
- imagePullPolicy: IfNotPresent
- name: nginx
- ports:
- - containerPort: 80
- name: http
- - containerPort: 443
- name: https
- securityContext:
- capabilities:
- add:
- - NET_BIND_SERVICE
- drop:
- - ALL
- readOnlyRootFilesystem: true
- runAsUser: 101
- runAsGroup: 1001
- volumeMounts:
- - name: nginx-conf
- mountPath: /etc/nginx/conf.d
- - name: nginx-secrets
- mountPath: /etc/nginx/secrets
- - name: nginx-run
- mountPath: /var/run/nginx
- - name: nginx-cache
- mountPath: /var/cache/nginx
- - name: nginx-lib
- mountPath: /var/lib/nginx
- terminationGracePeriodSeconds: 30
- serviceAccountName: nginx-gateway
- shareProcessNamespace: true
- securityContext:
- fsGroup: 1001
- runAsNonRoot: true
- volumes:
- - name: nginx-conf
- emptyDir: {}
- - name: nginx-secrets
- emptyDir: {}
- - name: nginx-run
- emptyDir: {}
- - name: nginx-cache
- emptyDir: {}
- - name: nginx-lib
- emptyDir: {}
- ---
- # Source: nginx-gateway-fabric/templates/gatewayclass.yaml
- apiVersion: gateway.networking.k8s.io/v1
- kind: GatewayClass
- metadata:
- name: nginx
- labels:
- app.kubernetes.io/name: nginx-gateway
- app.kubernetes.io/instance: nginx-gateway
- app.kubernetes.io/version: "1.1.0"
- spec:
- controllerName: gateway.nginx.org/nginx-gateway-controller
- ---
- # Source: nginx-gateway-fabric/templates/nginxgateway.yaml
- apiVersion: gateway.nginx.org/v1alpha1
- kind: NginxGateway
- metadata:
- name: nginx-gateway-config
- namespace: nginx-gateway
- labels:
- app.kubernetes.io/name: nginx-gateway
- app.kubernetes.io/instance: nginx-gateway
- app.kubernetes.io/version: "1.1.0"
- spec:
- logging:
- level: info
|