Skip to content

Commit 6bc446c

Browse files
authored
Set fsGroupChangePolicy to OnRootMismatch in securityContext by default (#986)
Co-authored-by: Yevhen Ivantsov <[email protected]>
1 parent 754aff8 commit 6bc446c

File tree

19 files changed

+81
-4
lines changed

19 files changed

+81
-4
lines changed

src/main/charts/bamboo-agent/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Kubernetes: `>=1.21.x-0`
4242
| agent.resources.jvm.maxHeap | string | `"512m"` | The maximum amount of heap memory that will be used by the Bamboo agent JVM |
4343
| agent.resources.jvm.minHeap | string | `"256m"` | The minimum amount of heap memory that will be used by the Bamboo agent JVM |
4444
| agent.securityContext.fsGroup | int | `2005` | The GID used by the Bamboo docker image GID will default to 2005 if not supplied and securityContextEnabled is set to true. This is intended to ensure that the shared-home volume is group-writeable by the GID used by the Bamboo container. However, this doesn't appear to work for NFS volumes due to a K8s bug: https://github.com/kubernetes/examples/issues/260 |
45+
| agent.securityContext.fsGroupChangePolicy | string | `"OnRootMismatch"` | fsGroupChangePolicy defines behavior for changing ownership and permission of the volume before being exposed inside a Pod. This field only applies to volume types that support fsGroup controlled ownership and permissions. https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#configure-volume-permission-and-ownership-change-policy-for-pods |
4546
| agent.securityContextEnabled | bool | `true` | Whether to apply security context to pod. |
4647
| agent.securityToken.secretKey | string | `"security-token"` | |
4748
| agent.securityToken.secretName | string | `nil` | The name of the K8s Secret that contains the security token. When specified the token will be automatically utilised on agent boot. An Example of creating a K8s secret for the secret below: 'kubectl create secret generic <secret-name> --from-literal=security-token=<security token>' https://kubernetes.io/docs/concepts/configuration/secret/#opaque-secrets |

src/main/charts/bamboo-agent/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,12 @@ agent:
110110
#
111111
fsGroup: 2005
112112

113+
# -- fsGroupChangePolicy defines behavior for changing ownership and permission of the volume before being exposed inside a Pod.
114+
# This field only applies to volume types that support fsGroup controlled ownership and permissions.
115+
# https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#configure-volume-permission-and-ownership-change-policy-for-pods
116+
#
117+
fsGroupChangePolicy: "OnRootMismatch"
118+
113119
# -- Standard K8s field that holds security configurations that will be applied to a container.
114120
# https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
115121
#

src/main/charts/bamboo/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ Kubernetes: `>=1.21.x-0`
8282
| bamboo.resources.jvm.maxHeap | string | `"1024m"` | The maximum amount of heap memory that will be used by the Bamboo JVM |
8383
| bamboo.resources.jvm.minHeap | string | `"512m"` | The minimum amount of heap memory that will be used by the Bamboo JVM |
8484
| bamboo.securityContext.fsGroup | int | `2005` | The GID used by the Bamboo docker image GID will default to 2005 if not supplied and securityContextEnabled is set to true. This is intended to ensure that the shared-home volume is group-writeable by the GID used by the Bamboo container. However, this doesn't appear to work for NFS volumes due to a K8s bug: https://github.com/kubernetes/examples/issues/260 |
85+
| bamboo.securityContext.fsGroupChangePolicy | string | `"OnRootMismatch"` | fsGroupChangePolicy defines behavior for changing ownership and permission of the volume before being exposed inside a Pod. This field only applies to volume types that support fsGroup controlled ownership and permissions. https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#configure-volume-permission-and-ownership-change-policy-for-pods |
8586
| bamboo.securityContextEnabled | bool | `true` | Whether to apply security context to pod. |
8687
| bamboo.securityToken.secretKey | string | `"security-token"` | The key (default `secretKey`) in the Secret used to store the Bamboo shared key. |
8788
| bamboo.securityToken.secretName | string | `nil` | The name of the K8s Secret that contains the security token. When specified the token will overrided the generated one. This secret should also be shared with the agent deployment. An Example of creating a K8s secret for the secret below: 'kubectl create secret generic <secret-name> --from-literal=security-token=<security token>' https://kubernetes.io/docs/concepts/configuration/secret/#opaque-secrets |

src/main/charts/bamboo/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,12 @@ bamboo:
648648
#
649649
fsGroup: 2005
650650

651+
# -- fsGroupChangePolicy defines behavior for changing ownership and permission of the volume before being exposed inside a Pod.
652+
# This field only applies to volume types that support fsGroup controlled ownership and permissions.
653+
# https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#configure-volume-permission-and-ownership-change-policy-for-pods
654+
#
655+
fsGroupChangePolicy: "OnRootMismatch"
656+
651657
# -- Standard K8s field that holds security configurations that will be applied to a container.
652658
# https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
653659
#

src/main/charts/bitbucket/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ Kubernetes: `>=1.21.x-0`
125125
| bitbucket.resources.jvm.maxHeap | string | `"1g"` | The maximum amount of heap memory that will be used by the Bitbucket JVM The same value will be used by the Elasticsearch JVM. |
126126
| bitbucket.resources.jvm.minHeap | string | `"512m"` | The minimum amount of heap memory that will be used by the Bitbucket JVM The same value will be used by the Elasticsearch JVM. |
127127
| bitbucket.securityContext.fsGroup | int | `2003` | The GID used by the Bitbucket docker image GID will default to 2003 if not supplied and securityContextEnabled is set to true. This is intended to ensure that the shared-home volume is group-writeable by the GID used by the Bitbucket container. However, this doesn't appear to work for NFS volumes due to a K8s bug: https://github.com/kubernetes/examples/issues/260 |
128+
| bitbucket.securityContext.fsGroupChangePolicy | string | `"OnRootMismatch"` | fsGroupChangePolicy defines behavior for changing ownership and permission of the volume before being exposed inside a Pod. This field only applies to volume types that support fsGroup controlled ownership and permissions. https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#configure-volume-permission-and-ownership-change-policy-for-pods |
128129
| bitbucket.securityContextEnabled | bool | `true` | Whether to apply security context to pod. |
129130
| bitbucket.service.annotations | object | `{}` | Additional annotations to apply to the Service |
130131
| bitbucket.service.contextPath | string | `nil` | The context path that Bitbucket will use. |

src/main/charts/bitbucket/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -656,6 +656,12 @@ bitbucket:
656656
#
657657
fsGroup: 2003
658658

659+
# -- fsGroupChangePolicy defines behavior for changing ownership and permission of the volume before being exposed inside a Pod.
660+
# This field only applies to volume types that support fsGroup controlled ownership and permissions.
661+
# https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#configure-volume-permission-and-ownership-change-policy-for-pods
662+
#
663+
fsGroupChangePolicy: "OnRootMismatch"
664+
659665
# -- Standard K8s field that holds security configurations that will be applied to a container.
660666
# https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
661667
#

src/main/charts/confluence/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ Kubernetes: `>=1.21.x-0`
8585
| confluence.s3AttachmentsStorage.bucketRegion | string | `nil` | |
8686
| confluence.s3AttachmentsStorage.endpointOverride | string | `nil` | EXPERIMENTAL Feature! Override the default AWS API endpoint with a custom one, for example to use Minio as object storage https://min.io/ |
8787
| confluence.securityContext.fsGroup | int | `2002` | The GID used by the Confluence docker image GID will default to 2002 if not supplied and securityContextEnabled is set to true. This is intended to ensure that the shared-home volume is group-writeable by the GID used by the Confluence container. However, this doesn't appear to work for NFS volumes due to a K8s bug: https://github.com/kubernetes/examples/issues/260 |
88+
| confluence.securityContext.fsGroupChangePolicy | string | `"OnRootMismatch"` | fsGroupChangePolicy defines behavior for changing ownership and permission of the volume before being exposed inside a Pod. This field only applies to volume types that support fsGroup controlled ownership and permissions. https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#configure-volume-permission-and-ownership-change-policy-for-pods |
8889
| confluence.securityContextEnabled | bool | `true` | Whether to apply security context to pod. |
8990
| confluence.seraphConfig | object | `{"autoLoginCookieAge":"1209600","generateByHelm":false}` | By default seraph-config.xml is generated in the container entrypoint from a template shipped with an official Confluence image. However, seraph-config.xml generation may fail if container is not run as root, which is a common case if Confluence is deployed to OpenShift. |
9091
| confluence.seraphConfig.generateByHelm | bool | `false` | Mount seraph-config.xml as a ConfigMap. Override configuration elements if necessary |

src/main/charts/confluence/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -658,6 +658,12 @@ confluence:
658658
# However, this doesn't appear to work for NFS volumes due to a K8s bug: https://github.com/kubernetes/examples/issues/260
659659
fsGroup: 2002
660660

661+
# -- fsGroupChangePolicy defines behavior for changing ownership and permission of the volume before being exposed inside a Pod.
662+
# This field only applies to volume types that support fsGroup controlled ownership and permissions.
663+
# https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#configure-volume-permission-and-ownership-change-policy-for-pods
664+
#
665+
fsGroupChangePolicy: "OnRootMismatch"
666+
661667
# -- Standard K8s field that holds security configurations that will be applied to a container.
662668
# https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
663669
#

src/main/charts/crowd/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ Kubernetes: `>=1.21.x-0`
6969
| crowd.resources.jvm.maxHeap | string | `"768m"` | The maximum amount of heap memory that will be used by the Crowd JVM |
7070
| crowd.resources.jvm.minHeap | string | `"384m"` | The minimum amount of heap memory that will be used by the Crowd JVM |
7171
| crowd.securityContext.fsGroup | int | `2004` | The GID used by the Crowd docker image GID will default to 2004 if not supplied and securityContextEnabled is set to true. This is intended to ensure that the shared-home volume is group-writeable by the GID used by the Crowd container. However, this doesn't appear to work for NFS volumes due to a K8s bug: https://github.com/kubernetes/examples/issues/260 |
72+
| crowd.securityContext.fsGroupChangePolicy | string | `"OnRootMismatch"` | fsGroupChangePolicy defines behavior for changing ownership and permission of the volume before being exposed inside a Pod. This field only applies to volume types that support fsGroup controlled ownership and permissions. https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#configure-volume-permission-and-ownership-change-policy-for-pods |
7273
| crowd.securityContextEnabled | bool | `true` | Whether to apply security context to pod. |
7374
| crowd.service.annotations | object | `{}` | Additional annotations to apply to the Service |
7475
| crowd.service.contextPath | string | `"/crowd"` | The Tomcat context path that Crowd will use. The ATL_TOMCAT_CONTEXTPATH will be set automatically. |

src/main/charts/crowd/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,12 @@ crowd:
168168
#
169169
fsGroup: 2004
170170

171+
# -- fsGroupChangePolicy defines behavior for changing ownership and permission of the volume before being exposed inside a Pod.
172+
# This field only applies to volume types that support fsGroup controlled ownership and permissions.
173+
# https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#configure-volume-permission-and-ownership-change-policy-for-pods
174+
#
175+
fsGroupChangePolicy: "OnRootMismatch"
176+
171177
# -- Standard K8s field that holds security configurations that will be applied to a container.
172178
# https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
173179
#

0 commit comments

Comments
 (0)