mirror of
https://github.com/Dannecron/netology-devops.git
synced 2025-12-25 23:32:37 +03:00
homework 14.3: complete all tasks
This commit is contained in:
50
src/homework/14-kubernetes-security/14.3/config/test_pod.yml
Normal file
50
src/homework/14-kubernetes-security/14.3/config/test_pod.yml
Normal file
@@ -0,0 +1,50 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: test-env-config
|
||||
labels:
|
||||
app: test
|
||||
data:
|
||||
SOME_USER: user
|
||||
SOME_PASSWORD: passwd
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: test-file-config
|
||||
labels:
|
||||
app: test
|
||||
data:
|
||||
foo.json: |
|
||||
{"foo": "bar", "baz": 123}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
labels:
|
||||
app: test
|
||||
name: test-pod
|
||||
namespace: default
|
||||
spec:
|
||||
containers:
|
||||
- image: praqma/network-multitool:alpine-extra
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: test-container
|
||||
env:
|
||||
- name: SOME_NGINX_USER
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: test-env-config
|
||||
key: SOME_USER
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: test-env-config
|
||||
volumeMounts:
|
||||
- mountPath: "/opt/config"
|
||||
name: "config"
|
||||
readOnly: true
|
||||
volumes:
|
||||
- name: "config"
|
||||
configMap:
|
||||
name: test-file-config
|
||||
Reference in New Issue
Block a user