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

Support for turning on/off logs #1155

Merged
merged 2 commits into from
Jun 3, 2022
Merged

Conversation

reivaj05
Copy link
Contributor

@reivaj05 reivaj05 commented Jun 1, 2022

Closes: https://github.com/miniohq/engineering/issues/857

This PR adds logic to kubectl-minio to turn on and off logs during tenant creation

@@ -82,6 +82,12 @@ func newTenantCreateCmd(out io.Writer, errOut io.Writer) *cobra.Command {
f.StringVarP(&c.tenantOpts.ImagePullSecret, "image-pull-secret", "", "", "image pull secret to be used for pulling MinIO")
f.BoolVar(&c.tenantOpts.DisableAntiAffinity, "enable-host-sharing", false, "[TESTING-ONLY] disable anti-affinity to allow pods to be co-located on a single node (unsupported in production environment)")
f.StringVar(&c.tenantOpts.KmsSecret, "kes-config", "", "name of secret for KES KMS setup, refer https://github.com/minio/operator/blob/master/examples/kes-secret.yaml")
f.BoolVar(&c.tenantOpts.EnableAuditLogs, "enable-audit-logs", true, "Enable/Disable audit logs")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Operator UI has this enable by default but not sure if it should be the same behavior for kubectl

},
Resources: v1.ResourceRequirements{
Requests: v1.ResourceList{
v1.ResourceStorage: *resource.NewQuantity(diskSpace, resource.DecimalExponent),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's confirm this line first.

when deploying audit log via yamls operator will assign the storage using resource.BinarySI.
Ideally we should abstract the logic of the NewForLogDb function in https://github.com/minio/operator/blob/master/pkg/resources/statefulsets/log.go#L147 and use the same logic for both deployment types yamls and kubectl plugin

@dvaldivia dvaldivia merged commit 9a82a87 into minio:master Jun 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants