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

expose services #1374

Merged
merged 1 commit into from
Dec 19, 2022
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: 6 additions & 0 deletions kubectl-minio/cmd/resources/tenant.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ type TenantOptions struct {
ImagePullSecret string
DisableAntiAffinity bool
EnableAuditLogs bool
ExposeMinioService bool
ExposeConsoleService bool
AuditLogsDiskSpace int32
AuditLogsImage string
AuditLogsPGImage string
Expand Down Expand Up @@ -132,6 +134,10 @@ func NewTenant(opts *TenantOptions, userSecret *v1.Secret) (*miniov2.Tenant, err
Configuration: &v1.LocalObjectReference{
Name: opts.ConfigurationSecretName,
},
ExposeServices: &miniov2.ExposeServices{
Console: opts.ExposeConsoleService,
MinIO: opts.ExposeMinioService,
},
Pools: []miniov2.Pool{Pool(opts, volumesPerServer, *capacityPerVolume)},
RequestAutoCert: &autoCert,
Mountpath: helpers.MinIOMountPath,
Expand Down
4 changes: 4 additions & 0 deletions kubectl-minio/cmd/tenant-create.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ func newTenantCreateCmd(out io.Writer, errOut io.Writer) *cobra.Command {
f.StringVar(&c.tenantOpts.PrometheusStorageClass, "prometheus-storage-class", "", "(Only used when enable-prometheus is on) Storage class for prometheus")
f.BoolVarP(&c.output, "output", "o", false, "generate tenant yaml for 'kubectl apply -f tenant.yaml'")
f.BoolVar(&c.tenantOpts.Interactive, "interactive", false, "Create tenant in interactive mode")
f.BoolVar(&c.tenantOpts.ExposeMinioService, "expose-minio-service", false, "Enable/Disable expose the Minio Service")
f.BoolVar(&c.tenantOpts.ExposeConsoleService, "expose-console-service", false, "Enable/Disable expose the Console service")
return cmd
}

Expand Down Expand Up @@ -205,6 +207,8 @@ func (c *createCmd) populateInteractiveTenant() error {
if c.tenantOpts.EnablePrometheus {
c.populatePrometheus()
}
c.tenantOpts.ExposeMinioService = helpers.Ask("Expose Minio Service")
c.tenantOpts.ExposeConsoleService = helpers.Ask("Expose Console Service")
return nil
}

Expand Down