Skip to content
This repository was archived by the owner on Dec 21, 2023. It is now read-only.
This repository was archived by the owner on Dec 21, 2023. It is now read-only.

Use Viper to manage CLIConfig #5490

@vadasambar

Description

@vadasambar

Environment

  • Client OS (e.g., Linux, macOS, Windows): any
  • Keptn Version (keptn version): any
  • Kubernetes Cloud Provider (e.g., GKE, AKS): any
  • Kubernetes version (kubectl version): any

Affected Component

  • Docs
  • CLI
  • Kubernetes Integration
  • Openshift Integration
  • Helm
  • Istio
  • Bridge
  • Approval
  • Datastore
  • REST API
  • eventbroker / distributor
  • jmeter

Describe the problem

  • Right now, we have our own code to read in CLIConfig here.
  • It would be good if we could replace it with Viper. We had Viper in root.go but I removed it in this PR. This is because there was code around Viper but it wasn't actually used for anything.
    i.e., cfgFile here is actually empty because we aren't reading it anywhere and the default cfgFile path is incorrect (should be ~/home/username/.keptn/config like in this function)

To Do

  • Replace the functions to manage CLIConfig with Viper
  • Fix cfgFile path (expose it as a flag)

Metadata

Metadata

Assignees

Labels

area:cligood first issueIssues for getting started developing Keptnhelp wantedExtra attention is neededtype:improvementImproves/enhances an existing feature

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions