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

"harness-apply" command asks for user input with values already present on YAML. #31

Open
Debanitrkl opened this issue Jul 25, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@Debanitrkl
Copy link
Member

Summary

harness Cli is asking for text input for the delegate-name for creating kubernetes connector as show below, even when the delegateSelectors: had delegate name mentioned

Trying to create or update connector using the yaml= harnesscd-example-apps/guestbook/harnesscd-pipeline/kubernetes-connector.yml
? Enter valid delegate name: delegate-deba-demo

Environment

Harness Cli Version: v0.0.10-alpha
OS: Mac M1 Pro

Steps To Reproduce

  1. Use the connector YAML with pre-filled delegate name under delegateSelectors: as follows:
connector:
  name: harness_k8sconnecto
  identifier: harnessk8sconnecto
  description: ""
  orgIdentifier: default
  projectIdentifier: communityeng
  type: K8sCluster
  spec:
    credential:
      type: InheritFromDelegate
    delegateSelectors:
      - Delegate_Name

  1. Use apply command to create the connector as follows:
harness connector --file <file-path of the connector yaml> apply

Expected Results

deba@Debabrata Panigrahi harness-cli %  harness connector --file harnesscd-example-apps/guestbook/harnesscd-pipeline/kubernetes-connector.yml apply     
Trying to create or update connector using the yaml= harnesscd-example-apps/guestbook/harnesscd-pipeline/kubernetes-connector.yml
ERRO[2023-07-25T15:27:35+05:30] Connector with identifier [harnessk8sconnecto] not found in project [communityeng] and org [default]. 
Creating connector with id:  harnessk8sconnecto
Successfully created connector with id= harnessk8sconnecto

Actual Results

deba@Debabrata Panigrahi harness-cli %  harness connector --file harnesscd-example-apps/guestbook/harnesscd-pipeline/kubernetes-connector.yml apply                         
Trying to create or update connector using the yaml= harnesscd-example-apps/guestbook/harnesscd-pipeline/kubernetes-connector.yml
? Enter valid delegate name: delegate-deba-demo
ERRO[2023-07-25T15:27:35+05:30] Connector with identifier [harnessk8sconnecto] not found in project [communityeng] and org [default]. 
Creating connector with id:  harnessk8sconnecto
Successfully created connector with id= harnessk8sconnecto
@nicholaslotz nicholaslotz added the bug Something isn't working label Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants