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

map': undefined method hosts' for nil:NilClass (NoMethodError) #1

Closed
displague opened this issue Oct 27, 2020 · 3 comments
Closed

map': undefined method hosts' for nil:NilClass (NoMethodError) #1

displague opened this issue Oct 27, 2020 · 3 comments

Comments

@displague
Copy link

displague commented Oct 27, 2020

2020-10-27 19:32:22 +0000: Fetching...
/app/src/main.rb:9:in `map': undefined method `hosts' for nil:NilClass (NoMethodError)
	from /app/src/main.rb:9:in `ingress_hosts'
	from /app/src/main.rb:31:in `block in main'
	from /app/src/main.rb:28:in `loop'
	from /app/src/main.rb:28:in `main'
	from /app/src/main.rb:50:in `<main>'

k8s.api("extensions/v1beta1").resource("ingresses").list.map { |r| r.spec.tls }.flatten.map(&:hosts).flatten.sort.uniq

I do have two extensions/v1beta1 ingresses in different namespaces in k8s 1.16:

spec:
  tls:
  - hosts:
    - foo
@compumike
Copy link
Owner

compumike commented Nov 2, 2020

Hi @displague thanks for reporting this! Looks like it was dying when there was any non-SSL Ingress present in the cluster -- oops.

I believe I've fixed this in ab191f6 and published a new tagged release v0.1.1. Can you try this again?

  1. Run kubectl apply -f https://raw.githubusercontent.com/compumike/hairpin-proxy/v0.1.1/deploy.yml
  2. Verify that the new 0.1.1 version images (not the old 0.1) come up with kubectl get pods -n hairpin-proxy -o jsonpath="{.items[*].spec.containers[*].image}")

Please let me know if the new version works or not. Closing the issue as I believe it's fixed, but happy to reopen if not.

@displague
Copy link
Author

@compumike That worked! Cert-manager was able to run the self-check and my cert applied.

@compumike
Copy link
Owner

@displague Excellent 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants