Install robot-shop with a minimal pod security policy and associated RBAC resources
This should't be merged until we can toggle the creation of the pod security policy and associated RBAC resources on and off
This commit is contained in:
@@ -14,10 +14,11 @@ spec:
|
||||
labels:
|
||||
service: cart
|
||||
spec:
|
||||
serviceAccountName: robot-shop
|
||||
containers:
|
||||
- name: cart
|
||||
image: robotshop/rs-cart:latest
|
||||
# agent networking access
|
||||
# agent networking access
|
||||
env:
|
||||
- name: INSTANA_AGENT_HOST
|
||||
valueFrom:
|
||||
|
@@ -14,6 +14,7 @@ spec:
|
||||
labels:
|
||||
service: catalogue
|
||||
spec:
|
||||
serviceAccountName: robot-shop
|
||||
containers:
|
||||
- name: catalogue
|
||||
image: robotshop/rs-catalogue:latest
|
||||
|
13
K8s/descriptors/clusterrole.yaml
Normal file
13
K8s/descriptors/clusterrole.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: robot-shop
|
||||
rules:
|
||||
- apiGroups:
|
||||
- policy
|
||||
resourceNames:
|
||||
- robot-shop
|
||||
resources:
|
||||
- podsecuritypolicies
|
||||
verbs:
|
||||
- use
|
12
K8s/descriptors/clusterrolebinding.yaml
Normal file
12
K8s/descriptors/clusterrolebinding.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: robot-shop
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: robot-shop
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: robot-shop
|
||||
namespace: robot-shop
|
@@ -14,6 +14,7 @@ spec:
|
||||
labels:
|
||||
service: dispatch
|
||||
spec:
|
||||
serviceAccountName: robot-shop
|
||||
containers:
|
||||
- name: dispatch
|
||||
image: robotshop/rs-dispatch:latest
|
||||
|
@@ -14,6 +14,7 @@ spec:
|
||||
labels:
|
||||
service: mongodb
|
||||
spec:
|
||||
serviceAccountName: robot-shop
|
||||
containers:
|
||||
- name: mongodb
|
||||
image: robotshop/rs-mongodb:latest
|
||||
|
@@ -16,6 +16,7 @@ spec:
|
||||
annotations:
|
||||
sidecar.istio.io/inject: "false"
|
||||
spec:
|
||||
serviceAccountName: robot-shop
|
||||
containers:
|
||||
- name: mysql
|
||||
image: robotshop/rs-mysql-db:latest
|
||||
|
@@ -17,6 +17,7 @@ spec:
|
||||
service: payment
|
||||
stage: prod
|
||||
spec:
|
||||
serviceAccountName: robot-shop
|
||||
containers:
|
||||
- name: payment
|
||||
image: robotshop/rs-payment:latest
|
||||
|
24
K8s/descriptors/podsecuritypolicy.yaml
Normal file
24
K8s/descriptors/podsecuritypolicy.yaml
Normal file
@@ -0,0 +1,24 @@
|
||||
apiVersion: policy/v1beta1
|
||||
kind: PodSecurityPolicy
|
||||
metadata:
|
||||
name: robot-shop
|
||||
spec:
|
||||
allowPrivilegeEscalation: false
|
||||
fsGroup:
|
||||
rule: RunAsAny
|
||||
privileged: false
|
||||
runAsUser:
|
||||
rule: RunAsAny
|
||||
seLinux:
|
||||
rule: RunAsAny
|
||||
supplementalGroups:
|
||||
rule: RunAsAny
|
||||
allowedCapabilities:
|
||||
- 'NET_ADMIN'
|
||||
volumes:
|
||||
- configMap
|
||||
- downwardAPI
|
||||
- emptyDir
|
||||
- persistentVolumeClaim
|
||||
- secret
|
||||
- projected
|
@@ -14,6 +14,7 @@ spec:
|
||||
labels:
|
||||
service: rabbitmq
|
||||
spec:
|
||||
serviceAccountName: robot-shop
|
||||
containers:
|
||||
- name: rabbitmq
|
||||
image: rabbitmq:3.7-management-alpine
|
||||
|
@@ -14,6 +14,7 @@ spec:
|
||||
labels:
|
||||
service: ratings
|
||||
spec:
|
||||
serviceAccountName: robot-shop
|
||||
containers:
|
||||
- name: ratings
|
||||
image: robotshop/rs-ratings:latest
|
||||
|
@@ -14,6 +14,7 @@ spec:
|
||||
labels:
|
||||
service: redis
|
||||
spec:
|
||||
serviceAccountName: robot-shop
|
||||
containers:
|
||||
- name: redis
|
||||
image: redis:4.0.6
|
||||
|
5
K8s/descriptors/serviceaccount.yaml
Normal file
5
K8s/descriptors/serviceaccount.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: robot-shop
|
||||
namespace: robot-shop
|
@@ -14,6 +14,7 @@ spec:
|
||||
labels:
|
||||
service: shipping
|
||||
spec:
|
||||
serviceAccountName: robot-shop
|
||||
containers:
|
||||
- name: shipping
|
||||
image: robotshop/rs-shipping:latest
|
||||
|
@@ -14,6 +14,7 @@ spec:
|
||||
labels:
|
||||
service: user
|
||||
spec:
|
||||
serviceAccountName: robot-shop
|
||||
containers:
|
||||
- name: user
|
||||
image: robotshop/rs-user:latest
|
||||
|
@@ -14,6 +14,7 @@ spec:
|
||||
labels:
|
||||
service: web
|
||||
spec:
|
||||
serviceAccountName: robot-shop
|
||||
containers:
|
||||
- name: web
|
||||
image: robotshop/rs-web:latest
|
||||
|
Reference in New Issue
Block a user