60 lines
1.7 KiB
YAML
60 lines
1.7 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: istio-ingressgateway
|
|
namespace: istio-ingress
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
istio: ingressgateway
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
# Select the gateway injection template (rather than the default sidecar template)
|
|
inject.istio.io/templates: gateway
|
|
labels:
|
|
# Set a unique label for the gateway. This is required to ensure Gateways can select this workload
|
|
istio: ingressgateway
|
|
# Enable gateway injection. If connecting to a revisioned control plane, replace with "istio.io/rev: revision-name"
|
|
sidecar.istio.io/inject: "true"
|
|
spec:
|
|
# Allow binding to all ports (such as 80 and 443)
|
|
securityContext:
|
|
sysctls:
|
|
- name: net.ipv4.ip_unprivileged_port_start
|
|
value: "0"
|
|
containers:
|
|
- name: istio-proxy
|
|
image: auto # The image will automatically update each time the pod starts.
|
|
# Drop all privileges, allowing to run as non-root
|
|
securityContext:
|
|
capabilities:
|
|
drop:
|
|
- ALL
|
|
runAsUser: 1337
|
|
runAsGroup: 1337
|
|
---
|
|
# Set up roles to allow reading credentials for TLS
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: Role
|
|
metadata:
|
|
name: istio-ingressgateway-sds
|
|
namespace: istio-ingress
|
|
rules:
|
|
- apiGroups: [""]
|
|
resources: ["secrets"]
|
|
verbs: ["get", "watch", "list"]
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: RoleBinding
|
|
metadata:
|
|
name: istio-ingressgateway-sds
|
|
namespace: istio-ingress
|
|
roleRef:
|
|
apiGroup: rbac.authorization.k8s.io
|
|
kind: Role
|
|
name: istio-ingressgateway-sds
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: default
|