From a785fcec7357a7ae6e5d1ad6ed672c2844de67d3 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Sat, 27 Jul 2024 13:10:20 -0500 Subject: [PATCH] sshca: Allow Jenkins jobs to restart the Deployment The Jenkins job for the SSHCA Server restarts the Deployment after building a new container image. --- sshca/jenkins.yaml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 sshca/jenkins.yaml diff --git a/sshca/jenkins.yaml b/sshca/jenkins.yaml new file mode 100644 index 0000000..40850ba --- /dev/null +++ b/sshca/jenkins.yaml @@ -0,0 +1,30 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: jenkins + namespace: sshca +rules: + - apiGroups: + - apps + resources: + - deployments + resourceNames: + - sshca + verbs: + - get + - patch + +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: jenkins + namespace: sshca +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: jenkins +subjects: +- kind: ServiceAccount + name: default + namespace: jenkins-jobs