- Create RSA keys for CA cert, server cert - this will output
ca-key.key
andserver-key.key
openssl genrsa -out ca.key 4096
openssl genrsa -out server.key 4096
- Create a
ca.conf
ca config file
basicConstraints = CA:TRUE
keyUsage = cRLSign, keyCertSign
[req]
distinguished_name = req_distinguished_name
prompt = no
[req_distinguished_name]
C = US
ST = SomeState
L = SomeCity
O = SomeOrg
emailAddress = [email protected]
CN = actionrunners.yourorg.com
- Create the ca certificate with the config file - this will output
ca.crt
openssl req -x509 -new -sha512 -nodes -key ./ca.key -days 7307 -out ./ca.crt -config ./ca.conf
- Optionally validate that the CA certificate created successfully
openssl x509 -noout -text -in ./ca.crt
- Create your server certificate config file - ie
server.conf
- all 3 alt names are needed - for the 3rd alt name, theactions-runner-system
is the namespace - if you are installing into a different namespace, replaceactions-runner-system
with the namespace you are installing to (ie:default
)
[req]
default_bits = 2048
prompt = no
default_md = sha256
x509_extensions = v3_req
distinguished_name = dn
[dn]
C = US
ST = SomeState
L = SomeCity
O = SomeOrg
emailAddress = [email protected]
CN = actionrunners.yourorg.com
[v3_req]
subjectAltName = @alt_names
[alt_names]
DNS.1 = webhook-service.actions-runner-system.svc
DNS.2 = webhook-service.actions-runner-system.svc.cluster.local
DNS.3 = actions-runner-controller-webhook.actions-runner-system.svc
- Create the server certificate signing request (csr) - this will outut
server.csr
openssl req -new -key ./server.key -out ./server.csr -config ./server.conf
- Create your server certificate - this will output
server.crt
openssl x509 -req -in ./server.csr -CA ./ca.crt -CAkey ./ca.key \
-CAcreateserial -out ./server.crt -days 10000 \
-extensions v3_req -extfile ./server.conf
- Optionally inspect your server cert to make sure it has the alt names
openssl x509 -noout -text -in ./server.crt
- Base64 the CA cert, copy to clipboard
CA_BUNDLE=$(cat ca.crt | base64)
echo $CA_BUNDLE | pbcopy
- Set the
admissionWebHooks.caBundle
value in thevalues.yaml
to the base64 value of the ca cert - you may have to remove the extra{}
underadmissionWebHooks
admissionWebHooks:
# {} # need to remove this
caBundle: "Ci0tL..."
- In the
values.yaml
, ensurecertManagerEnabled
is set to false
certManagerEnabled: false
- Create your certificate secrets using
kubectl
- both of these are needed
kubectl create secret tls webhook-server-cert -n actions-runner-system --cert=./server.crt --key=./server.key
kubectl create secret tls actions-runner-controller-serving-cert -n actions-runner-system --cert=./server.crt --key=./server.key
- Run the
helm upgrade
command to install the controller
helm upgrade --install --namespace actions-runner-system --create-namespace --wait actions-runner-controller actions-runner-controller/actions-runner-controller --values ./values.yaml
-
Ensure that your actions-runner-controller pod has started - if it fails, describe the pod and check the events
-
Deploy your runners
kubectl apply -f runner.yaml --namespace default
- Ensure that your runner pods have started; check GitHub to see if your runners show there also