在您的自定义 CA 证书通过 ConfigMap 添加到集群中后,Cluster Network Operator 会将用户提供的证书和系统 CA 证书合并到单一捆绑包中,并将合并的捆绑包注入请求信任捆绑包注入的 Operator。
config.openshift.io/inject-trusted-cabundle="true"
config.openshift.io/inject- trusted- cabundle="true"
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
apiVersion: v1
data: {}
kind: ConfigMap
metadata:
labels:
config.openshift.io/inject-trusted-cabundle: "true"
name: ca-inject
namespace: apache
apiVersion : v1
data : { }
kind : ConfigMap
metadata :
labels :
config.openshift.io/inject-trusted-cabundle : "true"
name : ca- inject 1
namespace : apache
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-example-custom-ca-deployment
namespace: my-example-custom-ca-ns
spec:
...
spec:
...
containers:
- name: my-container-that-needs-custom-ca
volumeMounts:
- name: trusted-ca
mountPath: /etc/pki/ca-trust/extracted/pem
readOnly: true
volumes:
- name: trusted-ca
configMap:
name: trusted-ca
items:
- key: ca-bundle.crt
path: tls-ca-bundle.pem
apiVersion : apps/v1
kind : Deployment
metadata :
name : my- example- custom- ca- deployment
namespace : my- example- custom- ca- ns
spec :
...
spec :
...
containers :
- name : my- container- that- needs- custom- ca
volumeMounts :
- name : trusted- ca
mountPath : /etc/pki/ca- trust/extracted/pem
readOnly : true
volumes :
- name : trusted- ca
configMap :
name : trusted- ca
items :
- key : ca- bundle.crt 1
path : tls- ca- bundle.pem 2
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow