Skip to content

feat: add --logs-collector-enabled flag to kubernetes create Fixes #485#596

Open
yuvarajrece wants to merge 4 commits into
civo:masterfrom
yuvarajrece:master
Open

feat: add --logs-collector-enabled flag to kubernetes create Fixes #485#596
yuvarajrece wants to merge 4 commits into
civo:masterfrom
yuvarajrece:master

Conversation

@yuvarajrece

Copy link
Copy Markdown
Contributor

Summary

Fixes #485

Adds a --logs-collector-enabled flag to civo kubernetes create,
allowing users to control whether the logs collector is installed on a
new cluster.

  • If the flag is explicitly set, that value is always respected
    regardless of node size.
  • If not explicitly set, the logs collector is automatically disabled on
    standard small/xsmall nodes (g4s.kube.small, g4s.kube.xsmall) to
    save node resources, and an informational message is printed:
    "Logs collector not installed by default to save resource on small and
    xsmall standard nodes. If you wish to enable logs collector create the
    cluster with LogsCollectorEnable set to true"
  • For all other node sizes, the value is left unset by default, so the
    API's own default applies.

Depends on civo/civogo#<PR_NUMBER_HERE> for the underlying
LogsCollectorEnabled field on KubernetesClusterConfig — needs to be
merged and released before this PR can build against a real civogo
version bump (currently uses a local replace only for testing, removed
before submission).

Testing

Added unit tests in utility/kubernetes_test.go covering node-size
detection and the enable/disable resolution logic (explicit flag,
auto-disable on standard small/xsmall, default-deferred on other sizes,
and confirming non-standard tiers like performance/RAM/CPU-optimized are
not affected).

Added a flag to enable or disable logs collection for the Civo platform dashboard.
Added logs collector feature to Kubernetes creation command.
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.

Add the LogsCollectorEnabled option (true/false) to CLI when creating clusters

1 participant