mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-23 22:17:19 +00:00
Change pod runAsUser value of a Deployment after generating the Deployment's policy, and verify that the Deployment fails due to this change. Signed-off-by: Dan Mihai <dmihai@microsoft.com>
39 lines
737 B
YAML
39 lines
737 B
YAML
#
|
|
# Copyright (c) 2024 Microsoft
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: policy-redis-deployment
|
|
labels:
|
|
app: policyredis
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: policyredis
|
|
role: master
|
|
tier: backend
|
|
replicas: 1
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: policyredis
|
|
role: master
|
|
tier: backend
|
|
spec:
|
|
terminationGracePeriodSeconds: 0
|
|
runtimeClassName: kata
|
|
securityContext:
|
|
runAsUser: 1000
|
|
containers:
|
|
- name: master
|
|
image: quay.io/opstree/redis
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 100Mi
|
|
ports:
|
|
- containerPort: 6379
|