Skip to content

Commit

Permalink
fix(helm): rolebinding should use templated values
Browse files Browse the repository at this point in the history
The ClusterRoleBinding created for the cert-manager service account did
not correctly use the templated values for the subject reference to the
service account.

Fixes #45
  • Loading branch information
terinjokes committed May 2, 2023
1 parent 89a93b3 commit f2e8638
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions deploy/charts/origin-ca-issuer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ The following table lists the configurable parameters of the origin-ca-issuer ch
| `controller.affinity` | Node (anti-)affinity for pod assignemt | `{}` |
| `controller.tolerations` | Node tolerations for pod assignment | `{}` |
| `controller.disableApprovedCheck` | Disable waiting for CertificateRequests to be Approved before signing | `false` |
| `cert-manager.namespace ` | Namespace where the cert-manager controller is running. | `cert-manager` |
| `cert-manager.serviceAccountName` | The Service Account used by the cert-manager controller. | `cert-manager` |

Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ roleRef:
name: cert-manager-controller-approve:cert-manager-k8s-cloudflare-com
subjects:
- kind: ServiceAccount
name: cert-manager
namespace: cert-manager
name: {{ template "cert-manager.serviceAccountName" . }}
namespace: {{ template "cert-manager.namespace" . }}
{{- end }}
4 changes: 4 additions & 0 deletions deploy/charts/origin-ca-issuer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,7 @@ controller:
# Optional pod tolerations.
# ref: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#toleration-v1-core
tolerations: {}

cert-manager:
namespace: cert-manager
serviceAccountName: cert-manager

0 comments on commit f2e8638

Please sign in to comment.