apiVersion: apps/v1
kind: Deployment
metadata:
name: istio-ingressgateway-canary
namespace: istio-system (1)
spec:
selector:
matchLabels:
app: istio-ingressgateway
istio: ingressgateway
template:
metadata:
annotations:
inject.istio.io/templates: gateway
labels: (2)
app: istio-ingressgateway
istio: ingressgateway
sidecar.istio.io/inject: "true"
spec:
containers:
- name: istio-proxy
image: auto
serviceAccountName: istio-ingressgateway
---
apiVersion: v1
kind: serviceAccount
metadata:
name: istio-ingressgateway
namespace: istio-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: secret-reader
namespace: istio-system
rules:
- apiGroups: [""]
resources: ["secrets"]
verbs: ["get", "watch", "list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: istio-ingressgateway-secret-reader
namespace: istio-system
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: secret-reader
subjects:
- kind: serviceAccount
name: istio-ingressgateway
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy (3)
metadata:
name: gatewayingress
namespace: istio-system
spec:
podSelector:
matchLabels:
istio: ingressgateway
ingress:
- {}
policyTypes:
- Ingress