Skip to content

Commit e5aaf3a

Browse files
fix: monitor rbac (#394)
1 parent f47779e commit e5aaf3a

File tree

4 files changed

+78
-8
lines changed

4 files changed

+78
-8
lines changed

charts/cf-runtime/Chart.yaml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v2
22
description: A Helm chart for Codefresh Runner
33
name: cf-runtime
4-
version: 6.1.2
4+
version: 6.1.3
55
keywords:
66
- codefresh
77
- runner
@@ -14,12 +14,8 @@ maintainers:
1414
url: https://codefresh-io.github.io/
1515
annotations:
1616
artifacthub.io/changes: |
17-
- kind: changed
18-
description: Updated runner image to `1.10.1`
19-
- kind: added
20-
description: Add pod monitor for Runner deployment
2117
- kind: fixed
22-
description: Add default nameOverride to .Values.serviceMonitor and .Values.podMonitor to avoid naming collision
18+
description: Fix Role(ClusterRole) for monitor
2319
dependencies:
2420
- name: cf-common
2521
repository: https://chartmuseum.codefresh.io/cf-common

charts/cf-runtime/README.md

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Codefresh Runner
22

3-
![Version: 6.1.2](https://img.shields.io/badge/Version-6.1.2-informational?style=flat-square)
3+
![Version: 6.1.3](https://img.shields.io/badge/Version-6.1.3-informational?style=flat-square)
44

55
Helm chart for deploying [Codefresh Runner](https://codefresh.io/docs/docs/installation/codefresh-runner/) to Kubernetes.
66

@@ -23,6 +23,8 @@ Helm chart for deploying [Codefresh Runner](https://codefresh.io/docs/docs/insta
2323
- [Custom global environment variables](#custom-global-environment-variables)
2424
- [Volume reuse policy](#volume-reuse-policy)
2525
- [Volume cleaners](#volume-cleaners)
26+
- [Rootless DinD](#rootless-dind)
27+
- [ARM](#arm)
2628
- [Openshift](#openshift)
2729
- [On-premise](#on-premise)
2830

@@ -523,6 +525,41 @@ volumeProvisioner:
523525
INODE_USAGE_THRESHOLD: 60 # default 80
524526
```
525527
528+
### Rootless DinD
529+
530+
DinD pod runs a `priviliged` container with **rootfull** docker.
531+
To run the docker daemon as non-root user (**rootless** mode), change dind image tag:
532+
533+
`values.yaml`
534+
```yaml
535+
runtime:
536+
dind:
537+
image:
538+
tag: rootless
539+
```
540+
541+
### ARM
542+
543+
With the Codefresh Runner, you can run native ARM64v8 builds.
544+
545+
> **Note!**
546+
> You cannot run both amd64 and arm64 images within the same pipeline. As one pipeline can map only to one runtime, you can run either amd64 or arm64 within the same pipeline.
547+
548+
Provide `nodeSelector` and(or) `tolerations` for dind pods:
549+
550+
`values.yaml`
551+
```yaml
552+
runtime:
553+
dind:
554+
nodeSelector:
555+
arch: arm64
556+
tolerations:
557+
- key: arch
558+
operator: Equal
559+
value: arm64
560+
effect: NoSchedule
561+
```
562+
526563
### Openshift
527564

528565
To install Codefresh Runner on OpenShift use the following `values.yaml` example

charts/cf-runtime/README.md.gotmpl

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ Helm chart for deploying [Codefresh Runner](https://codefresh.io/docs/docs/insta
2323
- [Custom global environment variables](#custom-global-environment-variables)
2424
- [Volume reuse policy](#volume-reuse-policy)
2525
- [Volume cleaners](#volume-cleaners)
26+
- [Rootless DinD](#rootless-dind)
27+
- [ARM](#arm)
2628
- [Openshift](#openshift)
2729
- [On-premise](#on-premise)
2830

@@ -523,6 +525,41 @@ volumeProvisioner:
523525
INODE_USAGE_THRESHOLD: 60 # default 80
524526
```
525527

528+
### Rootless DinD
529+
530+
DinD pod runs a `priviliged` container with **rootfull** docker.
531+
To run the docker daemon as non-root user (**rootless** mode), change dind image tag:
532+
533+
`values.yaml`
534+
```yaml
535+
runtime:
536+
dind:
537+
image:
538+
tag: rootless
539+
```
540+
541+
### ARM
542+
543+
With the Codefresh Runner, you can run native ARM64v8 builds.
544+
545+
> **Note!**
546+
> You cannot run both amd64 and arm64 images within the same pipeline. As one pipeline can map only to one runtime, you can run either amd64 or arm64 within the same pipeline.
547+
548+
Provide `nodeSelector` and(or) `tolerations` for dind pods:
549+
550+
`values.yaml`
551+
```yaml
552+
runtime:
553+
dind:
554+
nodeSelector:
555+
arch: arm64
556+
tolerations:
557+
- key: arch
558+
operator: Equal
559+
value: arm64
560+
effect: NoSchedule
561+
```
562+
526563
### Openshift
527564

528565
To install Codefresh Runner on OpenShift use the following `values.yaml` example

charts/cf-runtime/templates/_components/monitor/_rbac.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ subjects:
4949
name: {{ include "monitor.serviceAccountName" . }}
5050
namespace: {{ .Release.Namespace }}
5151
roleRef:
52-
kind: Role
52+
kind: {{ .Values.rbac.namespaced | ternary "Role" "ClusterRole" }}
5353
name: {{ include "monitor.fullname" . }}
5454
apiGroup: rbac.authorization.k8s.io
5555
{{- end }}

0 commit comments

Comments
 (0)