Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove fsgroup from alluxio runtime (#3635) #3654

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion charts/alluxio/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,4 +249,7 @@

0.9.12

- Add `sidecar.istio.io/inject` to components annotation
- Add `sidecar.istio.io/inject` to components annotation

0.9.13
- Remove `fsGroup` to avoid changing owner group of directory
2 changes: 1 addition & 1 deletion charts/alluxio/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
name: alluxio
apiVersion: v1
description: Open source data orchestration for analytics and machine learning in any cloud.
version: 0.9.12
version: 0.9.13
home: https://www.alluxio.io/
maintainers:
- name: Adit Madan
Expand Down
2 changes: 0 additions & 2 deletions charts/alluxio/templates/fuse/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ spec:
{{- end }}
tolerations:
- operator: Exists
securityContext:
fsGroup: {{ .Values.fuse.fsGroup }}
initContainers:
{{ if .Values.initUsers.enabled -}}
- name: init-fuse
Expand Down
2 changes: 0 additions & 2 deletions charts/alluxio/templates/master/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ spec:
{{- else if .Values.nodeSelector }}
{{ toYaml .Values.nodeSelector | trim | indent 8 }}
{{- end }}
securityContext:
fsGroup: {{ .Values.fsGroup }}
{{- if .Values.tolerations }}
tolerations:
{{ toYaml .Values.tolerations | indent 8 }}
Expand Down
2 changes: 0 additions & 2 deletions charts/alluxio/templates/worker/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ spec:
hostNetwork: {{ $hostNetwork }}
dnsPolicy: ClusterFirstWithHostNet
{{- end }}
securityContext:
fsGroup: {{ .Values.fsGroup }}
nodeSelector:
{{- if .Values.worker.nodeSelector }}
{{ toYaml .Values.worker.nodeSelector | trim | indent 8 }}
Expand Down
2 changes: 0 additions & 2 deletions charts/alluxio/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ initUsers:
# Security Context
user: 1000
group: 1000
fsGroup: 1000

# Site properties for all the components
properties:
Expand Down Expand Up @@ -390,7 +389,6 @@ fuse:
dnsPolicy: ClusterFirstWithHostNet
user: 0
group: 0
fsGroup: 0
args:
- fuse
- --fuse-opts=allow_other
Expand Down
2 changes: 0 additions & 2 deletions charts/fluid-databackup/alluxio/templates/databackup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 4 }}
{{- end }}
securityContext:
fsGroup: {{ .Values.fsGroup }}
{{ if .Values.initUsers.enabled -}}
initContainers:
- name: init-users
Expand Down
1 change: 0 additions & 1 deletion charts/fluid-databackup/alluxio/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,3 @@ initUsers:
# Security Context
user: 1000
group: 1000
fsGroup: 1000
2 changes: 0 additions & 2 deletions charts/fluid-databackup/goosefs/templates/databackup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 4 }}
{{- end }}
securityContext:
fsGroup: {{ .Values.fsGroup }}
{{ if .Values.initUsers.enabled -}}
initContainers:
- name: init-users
Expand Down
10 changes: 6 additions & 4 deletions pkg/ddc/alluxio/backup_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ package alluxio

import (
"fmt"
"os"
"strconv"
"strings"

datav1alpha1 "github.com/fluid-cloudnative/fluid/api/v1alpha1"
"github.com/fluid-cloudnative/fluid/pkg/common"
cdatabackup "github.com/fluid-cloudnative/fluid/pkg/databackup"
Expand All @@ -26,10 +30,7 @@ import (
"github.com/fluid-cloudnative/fluid/pkg/utils"
"github.com/fluid-cloudnative/fluid/pkg/utils/docker"
"gopkg.in/yaml.v2"
"os"
"sigs.k8s.io/controller-runtime/pkg/client"
"strconv"
"strings"
)

// generateDataBackupValueFile builds a DataBackupValueFile by extracted specifications from the given DataBackup, and
Expand Down Expand Up @@ -146,7 +147,8 @@ func (e *AlluxioEngine) generateDataBackupValueFile(ctx cruntime.ReconcileReques
if runAs != nil {
dataBackupValue.UserInfo.User = int(*runAs.UID)
dataBackupValue.UserInfo.Group = int(*runAs.GID)
dataBackupValue.UserInfo.FSGroup = 0
// avoid setting FSGroup with root group
// dataBackupValue.UserInfo.FSGroup = 0
dataBackupValue.InitUsers = common.InitUsers{
Enabled: true,
EnvUsers: utils.GetInitUserEnv(runAs),
Expand Down
1 change: 0 additions & 1 deletion pkg/ddc/alluxio/port_parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ imageTag: release-2.5.0-2-SNAPSHOT-52ad95c
imagePullPolicy: IfNotPresent
user: 0
group: 0
fsGroup: 0
properties:
alluxio.fuse.cached.paths.max: "1000000"
alluxio.fuse.debug.enabled: "false"
Expand Down
6 changes: 3 additions & 3 deletions pkg/ddc/alluxio/transform.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@ func (e *AlluxioEngine) transformCommonPart(runtime *datav1alpha1.AlluxioRuntime
value.Image, value.ImageTag, value.ImagePullPolicy, value.ImagePullSecrets = e.parseRuntimeImage(image, imageTag, imagePullPolicy, imagePullSecrets)

value.UserInfo = common.UserInfo{
User: 0,
FSGroup: 0,
Group: 0,
User: 0,
// FSGroup: 0,
Group: 0,
}

// transform init users
Expand Down
Loading