mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 06:54:01 +00:00
Merge pull request #45230 from dims/single-ca-cert
Automatic merge from submit-queue (batch tested with PRs 45239, 45230) Create a single CA for both client and server certs **What this PR does / why we need it**: The following test: "Certificates API [It] should support building a client with a CSR" fails with local-up-cluster, but works in the existing CI jobs. This is because the other CI jobs use a single CA cert while local-up-cluster can use 2 different sets of CA(s). We need a way to mimic the other CI jobs (or alternatively change everything to have separate CA's). Just updating local-up-cluster with a flag seems to be the easy route. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # **Special notes for your reviewer**: **Release note**: ```release-note NONE ```
This commit is contained in:
commit
0b469f4cb5
@ -443,8 +443,16 @@ function start_apiserver {
|
||||
fi
|
||||
|
||||
# Create CA signers
|
||||
kube::util::create_signing_certkey "${CONTROLPLANE_SUDO}" "${CERT_DIR}" server '"server auth"'
|
||||
kube::util::create_signing_certkey "${CONTROLPLANE_SUDO}" "${CERT_DIR}" client '"client auth"'
|
||||
if [[ "${ENABLE_SINGLE_CA_SIGNER:-}" = true ]]; then
|
||||
kube::util::create_signing_certkey "${CONTROLPLANE_SUDO}" "${CERT_DIR}" server '"client auth","server auth"'
|
||||
sudo cp "${CERT_DIR}/server-ca.key" "${CERT_DIR}/client-ca.key"
|
||||
sudo cp "${CERT_DIR}/server-ca.crt" "${CERT_DIR}/client-ca.crt"
|
||||
sudo cp "${CERT_DIR}/server-ca-config.json" "${CERT_DIR}/client-ca-config.json"
|
||||
else
|
||||
kube::util::create_signing_certkey "${CONTROLPLANE_SUDO}" "${CERT_DIR}" server '"server auth"'
|
||||
kube::util::create_signing_certkey "${CONTROLPLANE_SUDO}" "${CERT_DIR}" client '"client auth"'
|
||||
fi
|
||||
|
||||
# Create auth proxy client ca
|
||||
kube::util::create_signing_certkey "${CONTROLPLANE_SUDO}" "${CERT_DIR}" request-header '"client auth"'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user