Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Stack apply fails for stacks containing both CRD + instances of that custom resource #13

Closed
SpComb opened this issue Aug 13, 2018 · 0 comments
Labels
bug Something isn't working

Comments

@SpComb
Copy link
Contributor

SpComb commented Aug 13, 2018

The K8s::Stack#apply => client.get_resources attempts to perform API discovery for all stack resources before starting the POST the resources. This fails for custom resources associated with CRDs in the same stack because the CRDs are not defined yet, so the API discovery returns a HTTP 404.

GET /apis/certmanager.k8s.io/v1alpha1 => HTTP 404 Not Found: 404 page not found
/usr/local/bundle/gems/k8s-client-0.3.0/lib/k8s/transport.rb:171:in `parse_response'
/usr/local/bundle/gems/k8s-client-0.3.0/lib/k8s/transport.rb:215:in `block in requests'
/usr/local/bundle/gems/k8s-client-0.3.0/lib/k8s/transport.rb:213:in `map'
/usr/local/bundle/gems/k8s-client-0.3.0/lib/k8s/transport.rb:213:in `requests'
/usr/local/bundle/gems/k8s-client-0.3.0/lib/k8s/transport.rb:254:in `gets'
/usr/local/bundle/gems/k8s-client-0.3.0/lib/k8s/client.rb:72:in `apis'
/usr/local/bundle/gems/k8s-client-0.3.0/lib/k8s/client.rb:123:in `get_resources'
/usr/local/bundle/gems/k8s-client-0.3.0/lib/k8s/stack.rb:72:in `apply'
/app/lib/pharos/addon.rb:205:in `apply_resources'
/app/lib/pharos/addon.rb:171:in `apply_install'
/app/lib/pharos/addon.rb:157:in `apply'
/app/lib/pharos/cluster_manager.rb:126:in `block in apply_addons'
/app/lib/pharos/addon_manager.rb:74:in `block in each'
/app/lib/pharos/addon_manager.rb:86:in `block in with_enabled_addons'
/app/lib/pharos/addon_manager.rb:83:in `each'
/app/lib/pharos/addon_manager.rb:83:in `with_enabled_addons'
/app/lib/pharos/addon_manager.rb:70:in `each'
/app/lib/pharos/cluster_manager.rb:123:in `apply_addons'
/app/lib/pharos/up_command.rb:107:in `configure'
/app/lib/pharos/up_command.rb:44:in `block in execute'
/app/lib/pharos/up_command.rb:43:in `chdir'
/app/lib/pharos/up_command.rb:43:in `execute'
/usr/local/bundle/gems/clamp-1.2.1/lib/clamp/command.rb:63:in `run'
/usr/local/bundle/gems/clamp-1.2.1/lib/clamp/subcommand/execution.rb:11:in `execute'
/usr/local/bundle/gems/clamp-1.2.1/lib/clamp/command.rb:63:in `run'
/usr/local/bundle/gems/clamp-1.2.1/lib/clamp/command.rb:132:in `run'
/app/lib/pharos/root_command.rb:16:in `run'
bin/pharos-cluster:12:in `<main>'

The API discovery at this point should just ignore the 404 errors, and assume that those resources will not exist yet.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant