Skip to content

[FEAT cloudctl] - Implement Viper for configuration management #49

@onuryilmaz

Description

@onuryilmaz

[FEAT cloudctl] - Implement Viper for configuration management

Labels

  • feature
  • enhancement
  • configuration

Priority

(Medium) I'm annoyed but I'll live

User Story

As a cloudctl user, I can configure the tool using environment variables and configuration files, so that I don't have to provide all flags every time I run a command.

Description

Currently, cloudctl relies heavily on CLI flags. Implementing spf13/viper will allow users to use a cloudctl.yaml config file or environment variables (e.g., CLOUDCTL_GREENHOUSE_CLUSTER_KUBECONFIG). This makes the tool more flexible and easier to use in CI/CD pipelines or AI-driven automation where secrets might be passed via environment.

Acceptance Criteria

  • Integrate Viper with Cobra in cmd/root.go.
  • Support cloudctl.yaml, .cloudctl.yaml, and environment variables.
  • Ensure all existing flags can be overridden by config/env.
  • Add a --config flag to specify a custom config file path.
  • Update README.md with configuration instructions.

Reference Issues

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    backlogReady for sprint planning; triggers project additionconfigurationIssues related to how the tool is configured (Viper, env vars, etc.)enhancementImprovements to existing features, logic, or performance.featureNew functional capabilities or significant additions to the CLI.needs-refinementNeeds scoping before implementation

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Sprint Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions