epam / hub-extensions

Hub CLI extensions
Mozilla Public License 2.0
0 stars 2 forks source link

Unable to use kubernetes executor #111

Closed TheRealSpaceShip closed 1 year ago

TheRealSpaceShip commented 1 year ago

If a user is using kubernetes executor by setting HUB_DEPLOY_PROFILE="kubernetes" a stack deployment fails with the next error:

Running pre deploy hook: kubernetes
* Using kubeconfig:/home/igor_lysak/agilestacks/stacks_examples/simple-rancher/.hub/env/localhost.kubeconfig
* Checking connectivity to cluster: Connected

Proceeding with: deploy
* Using profile: kubernetes
* Running CLI command:

  $ hubctl deploy /home/igor_lysak/agilestacks/stacks_examples/simple-rancher/.hub/localhost.elaborate -s /home/igor_lysak/agilestacks/stacks_examples/simple-rancher/.hub/localhost.state
2023/09/07 17:47:17 Unable to load state: file does not exist
Stack localhost not found

Steps to reproduce:

  1. Create a stack with the next hub.yaml:
kind: stack
version: 1

requires:
- kubernetes

extensions:
  configure:
  - kubernetes
  - env
  deploy:
    before:
    - kubernetes

components:
- name: cert-manager
  source:
    dir: components/cert-manager
    git:
      remote: https://github.com/epam/hub-kubeflow-components.git
      subDir: cert-manager

parameters:
- name: dns.domain
  value: localhost
  1. Run hubctl stack init
  2. Run hubctl stack deploy

Actual result: Deploy is failing with an error Expected result: Deploy should be run in the Kubernetes cluster

NellyHargeliya commented 1 year ago

@TheRealSpaceShip Deployment using profile: kubernetes works well with your branch on Rancher Desktop. Thanks!