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

Enabled reverse proxy by default #686

Merged
merged 5 commits into from
Sep 16, 2024
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
6 changes: 5 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,16 @@
# Coulombel Florian (coulof)
# Deepak Ghivari (Deepak-Ghivari)
# Gallacher Sean (gallacher)
# Gil Taran (gilltaran)
# Harish P (harishp8889)
# Harish H (HarishH-DELL)
# Jacob Grosner (JacobGros)
# Jooseppi Luna (jooseppi-luna)
# Karthik K (karthikk92)
# Kumar Karthik Gosa (kumarkgosa)
# Keerthi Bandapati (bandak2)
# Meghana M (meggm)
# Mukesh Gandharva (mgandharva)
# Matt Schmaelzle (mjsdell)
# Nitesh Rewatkar (nitesh3108)
# Prabhu Revur (prabhu-dell)
Expand All @@ -35,4 +39,4 @@
# Yamunadevi N Shanmugam (shanmydell)

# for all files:
* @abhi16394 @mbasha-dell @alikdell @bharathsreekanth @chimanjain @coulof @Deepak-Ghivari @gallacher @HarishH-DELL @JacobGros @jooseppi-luna @karthikk92 @kumarkgosa @bandak2 @mjsdell @nitesh3108 @prabhu-dell @rajendraindukuri @rajkumar-palani @shefali-malhotra @panigs7 @tdawe @shaynafinocchiaro @atye @sharmilarama @shanmydell
* @abhi16394 @mbasha-dell @alikdell @bharathsreekanth @chimanjain @coulof @Deepak-Ghivari @gallacher @gilltaran @harishp8889 @HarishH-DELL @JacobGros @jooseppi-luna @karthikk92 @kumarkgosa @bandak2 @meggm @mgandharva @mjsdell @nitesh3108 @prabhu-dell @rajendraindukuri @rajkumar-palani @shefali-malhotra @panigs7 @tdawe @shaynafinocchiaro @atye @sharmilarama @shanmydell
19 changes: 18 additions & 1 deletion pkg/drivers/powermax.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,17 @@ func PrecheckPowerMax(ctx context.Context, cr *csmv1.ContainerStorageModule, ope
Value: "/var/lib/kubelet",
})
}
if cr.Spec.Modules == nil {
// this means it's a minimal yaml and we will append reverse-proxy by default
modules := make([]csmv1.Module, 0)
modules = append(modules, csmv1.Module{
Name: "csireverseproxy",
Enabled: true,
ConfigVersion: "v2.10.0",
ForceRemoveModule: true,
})
cr.Spec.Modules = modules
}
foundRevProxy := false
for _, mod := range cr.Spec.Modules {
if mod.Name == csmv1.ReverseProxy {
Expand All @@ -102,7 +113,13 @@ func PrecheckPowerMax(ctx context.Context, cr *csmv1.ContainerStorageModule, ope
}
}
if !foundRevProxy {
return fmt.Errorf("failed to find reverseproxy module")
log.Infof("Reverse proxy module not found adding it with default config")
cr.Spec.Modules = append(cr.Spec.Modules, csmv1.Module{
Name: "csireverseproxy",
Enabled: true,
ConfigVersion: "v2.10.0",
ForceRemoveModule: true,
})
}

log.Debugw("preCheck", "secrets", cred)
Expand Down
2 changes: 1 addition & 1 deletion pkg/drivers/powermax_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ var (
expectedErr string
}{
{"happy path", powerMaxCSM, powerMaxClient, powerMaxSecret, ""},
{"no proxy", powerMaxCSMNoProxy, powerMaxClient, powerMaxSecret, "failed to find reverseproxy module"},
{"no proxy set defaults", powerMaxCSMNoProxy, powerMaxClient, powerMaxSecret, ""},
}

preCheckpowerMaxTest = []struct {
Expand Down
4 changes: 0 additions & 4 deletions samples/minimal-samples/powermax.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,3 @@ spec:
driver:
csiDriverType: "powermax"
configVersion: v2.12.0
modules:
- name: csireverseproxy
enabled: true
configVersion: v2.10.0
Loading