better istio?
This commit is contained in:
parent
98e08f5301
commit
63505ae86f
@ -1,36 +1,59 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: istio-ingress
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: istio-ingressgateway
|
||||
namespace: istio-ingress
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: istio-ingressgateway
|
||||
namespace: istio-ingress
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
istio: ingressgateway
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
istio: ingressgateway
|
||||
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:
|
||||
serviceAccountName: istio-ingressgateway
|
||||
# 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
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
- containerPort: 15021
|
||||
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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user