Skip to content

Commit 36a18af

Browse files
authored
[pt-br] Add docs/tasks/configure-pod-container/configure-pod-configmap.md (#35144)
* [pt-br] add content/pt-br/docs/tasks/configure-pod-container/configure-pod-configmap.md * [pt-br] add content/pt-br/docs/tasks/configure-pod-container/configure-pod-configmap.md * [pt-br] add content/pt-br/docs/tasks/configure-pod-container/configure-pod-configmap.md * [pt-br] add content/pt-br/docs/tasks/configure-pod-container/configure-pod-configmap.md * [pt-br] add content/pt-br/docs/tasks/configure-pod-container/configure-pod-configmap.md * [pt-br] Add docs/tasks/configure-pod-container/configure-pod-configmap.md * [pt-br] Add content/pt-br/docs/tasks/configure-pod-container/configure-pod-configmap.md
1 parent b4abd5a commit 36a18af

9 files changed

+871
-0
lines changed

content/pt-br/docs/tasks/configure-pod-container/configure-pod-configmap.md

Lines changed: 735 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: special-config
5+
namespace: default
6+
data:
7+
SPECIAL_LEVEL: very
8+
SPECIAL_TYPE: charm
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: special-config
5+
namespace: default
6+
data:
7+
special.how: very
8+
---
9+
apiVersion: v1
10+
kind: ConfigMap
11+
metadata:
12+
name: env-config
13+
namespace: default
14+
data:
15+
log_level: INFO
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
name: dapi-test-pod
5+
spec:
6+
containers:
7+
- name: test-container
8+
image: registry.k8s.io/busybox
9+
command: [ "/bin/echo", "$(SPECIAL_LEVEL_KEY) $(SPECIAL_TYPE_KEY)" ]
10+
env:
11+
- name: SPECIAL_LEVEL_KEY
12+
valueFrom:
13+
configMapKeyRef:
14+
name: special-config
15+
key: SPECIAL_LEVEL
16+
- name: SPECIAL_TYPE_KEY
17+
valueFrom:
18+
configMapKeyRef:
19+
name: special-config
20+
key: SPECIAL_TYPE
21+
restartPolicy: Never
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
name: dapi-test-pod
5+
spec:
6+
containers:
7+
- name: test-container
8+
image: registry.k8s.io/busybox
9+
command: [ "/bin/sh", "-c", "env" ]
10+
envFrom:
11+
- configMapRef:
12+
name: special-config
13+
restartPolicy: Never
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
name: dapi-test-pod
5+
spec:
6+
containers:
7+
- name: test-container
8+
image: registry.k8s.io/busybox
9+
command: [ "/bin/sh","-c","cat /etc/config/keys" ]
10+
volumeMounts:
11+
- name: config-volume
12+
mountPath: /etc/config
13+
volumes:
14+
- name: config-volume
15+
configMap:
16+
name: special-config
17+
items:
18+
- key: SPECIAL_LEVEL
19+
path: keys
20+
restartPolicy: Never
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
name: dapi-test-pod
5+
spec:
6+
containers:
7+
- name: test-container
8+
image: registry.k8s.io/busybox
9+
command: [ "/bin/sh", "-c", "ls /etc/config/" ]
10+
volumeMounts:
11+
- name: config-volume
12+
mountPath: /etc/config
13+
volumes:
14+
- name: config-volume
15+
configMap:
16+
# Forneça o nome do ConfigMap que contém os arquivos
17+
# que você deseja adicionar ao contêiner
18+
name: special-config
19+
restartPolicy: Never
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
name: dapi-test-pod
5+
spec:
6+
containers:
7+
- name: test-container
8+
image: registry.k8s.io/busybox
9+
command: [ "/bin/sh", "-c", "env" ]
10+
env:
11+
- name: SPECIAL_LEVEL_KEY
12+
valueFrom:
13+
configMapKeyRef:
14+
name: special-config
15+
key: special.how
16+
- name: LOG_LEVEL
17+
valueFrom:
18+
configMapKeyRef:
19+
name: env-config
20+
key: log_level
21+
restartPolicy: Never
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
name: dapi-test-pod
5+
spec:
6+
containers:
7+
- name: test-container
8+
image: registry.k8s.io/busybox
9+
command: [ "/bin/sh", "-c", "env" ]
10+
env:
11+
# Defina a variável de ambiente
12+
- name: SPECIAL_LEVEL_KEY
13+
valueFrom:
14+
configMapKeyRef:
15+
# O ConfigMap contendo o valor que você deseja atribuir ao SPECIAL_LEVEL_KEY
16+
name: special-config
17+
# Especifique a chave associada ao valor
18+
key: special.how
19+
restartPolicy: Never

0 commit comments

Comments
 (0)