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

don't warn about uid/gid not being supported while ... they are #12232

Merged
merged 1 commit into from
Oct 25, 2024
Merged
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
don't warn about uid/gid not being supported while ... they are
Signed-off-by: Nicolas De Loof <[email protected]>
  • Loading branch information
ndeloof committed Oct 24, 2024
commit bbd8445d0136ab58ffbfd398fe82445a2c12b682
16 changes: 8 additions & 8 deletions pkg/compose/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -976,10 +976,6 @@ func buildContainerConfigMounts(p types.Project, s types.ServiceConfig) ([]mount
target = configsBaseDir + config.Target
}

if config.UID != "" || config.GID != "" || config.Mode != nil {
logrus.Warn("config `uid`, `gid` and `mode` are not supported, they will be ignored")
}

definedConfig := p.Configs[config.Source]
if definedConfig.External {
return nil, fmt.Errorf("unsupported external config %s", definedConfig.Name)
Expand All @@ -996,6 +992,10 @@ func buildContainerConfigMounts(p types.Project, s types.ServiceConfig) ([]mount
continue
}

if config.UID != "" || config.GID != "" || config.Mode != nil {
logrus.Warn("config `uid`, `gid` and `mode` are not supported, they will be ignored")
}

bindMount, err := buildMount(p, types.ServiceVolumeConfig{
Type: types.VolumeTypeBind,
Source: definedConfig.File,
Expand Down Expand Up @@ -1026,10 +1026,6 @@ func buildContainerSecretMounts(p types.Project, s types.ServiceConfig) ([]mount
target = secretsDir + secret.Target
}

if secret.UID != "" || secret.GID != "" || secret.Mode != nil {
logrus.Warn("secrets `uid`, `gid` and `mode` are not supported, they will be ignored")
}

definedSecret := p.Secrets[secret.Source]
if definedSecret.External {
return nil, fmt.Errorf("unsupported external secret %s", definedSecret.Name)
Expand All @@ -1046,6 +1042,10 @@ func buildContainerSecretMounts(p types.Project, s types.ServiceConfig) ([]mount
continue
}

if secret.UID != "" || secret.GID != "" || secret.Mode != nil {
logrus.Warn("secrets `uid`, `gid` and `mode` are not supported, they will be ignored")
}

if _, err := os.Stat(definedSecret.File); os.IsNotExist(err) {
logrus.Warnf("secret file %s does not exist", definedSecret.Name)
}
Expand Down
Loading