volumeMounts:をオプションのフィールドにする必要がある特定の要件があります。
spec:
volumes:
-
name: aaa
secret:
secretName: aaa-certs
containers:
-
name: my-celery
volumeMounts:
-
name: aaa
mountPath: /tmp/aaa_certs
readOnly: true
シークレットが存在する場合はマウントされ、そうでない場合は空のフォルダーが作成されます。これは可能ですか
シークレットボリュームは、タグ「optional:true」を使用してオプションとしてマークでき、ポッドの起動をブロックするのではなく、関連付けられたシークレットが存在しない場合は空のディレクトリになります。
例:
spec:
volumes:
-
name: aaa
secret:
secretName: aaa-certs
optional: true
containers:
-
name: my-celery
volumeMounts:
-
name: aaa
mountPath: /tmp/aaa_certs
readOnly: true
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加