github.com/kata-containers/tests@v0.0.0-20240307153542-772105b56064/integration/kubernetes/runtimeclass_workloads/pod-nested-configmap-secret.yaml (about)

     1  #
     2  # Copyright (c) 2021 IBM Corporation
     3  #
     4  # SPDX-License-Identifier: Apache-2.0
     5  #
     6  apiVersion: v1
     7  kind: ConfigMap
     8  metadata:
     9    name: config
    10  data:
    11    config_key: myconfig
    12  ---
    13  apiVersion: v1
    14  data:
    15    secret_key: bXlzZWNyZXQ= #mysecret
    16  kind: Secret
    17  metadata:
    18    name: secret
    19  type: Opaque
    20  ---
    21  apiVersion: v1
    22  kind: Pod
    23  metadata:
    24    name: nested-configmap-secret-pod
    25  spec:
    26    terminationGracePeriodSeconds: 0
    27    runtimeClassName: kata
    28    containers:
    29      - name: test-container
    30        image: quay.io/prometheus/busybox:latest
    31        command: ["tail", "-f", "/dev/null"]
    32        volumeMounts:
    33          - mountPath: /config
    34            name: config
    35          - mountPath: /config/secret
    36            name: secret
    37    volumes:
    38      - name: secret
    39        secret:
    40          secretName: secret
    41      - name: config
    42        configMap:
    43          name: config
    44    restartPolicy: Never