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

feat(cardano-node-api): add loadbalancer and secret support for TLS #73

Merged
merged 1 commit into from
Jan 9, 2025

Conversation

verbotenj
Copy link
Contributor

  • Add support to adjust Service type to LoadBalancer and ports
  • Add Secret support for TLS configuration
  • Fix selector matcher to exclude version labels (immutable) during helm upgrade
  • Adjust the Service selector to align with Pod labels

@verbotenj verbotenj force-pushed the feat/cardano-node-api branch 2 times, most recently from 5fcb56c to cd36720 Compare January 9, 2025 03:27
secret:
enabled: false
tlsKey: ""
tlsCrt: ""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would probably be better like the following:

tls:
  enabled: true
  key: foo
  cert: foo

It's less awkward than secret.enabled for things like setting the HTTPS scheme on the health check

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to add the check back. The alternative would be generating a new key/cert pair.

{"level":"fatal","timestamp":"2025-01-09T03:39:56Z","caller":"cardano-node-api/main.go:113","msg":"failed to start gRPC: tls: failed to find any PEM data in certificate input","stacktrace":"main.main\n\t/app/cmd/cardano-node-api/main.go:113\nruntime.main\n\t/usr/lib/go/src/runtime/proc.go:272"}

@verbotenj verbotenj force-pushed the feat/cardano-node-api branch 12 times, most recently from 7e82023 to 18cc749 Compare January 9, 2025 16:48
apiVersion: v1
kind: Secret
metadata:
name: {{ include "cardano-node-api.fullname" . }}-wildcard-tls
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The wildcard doesn't really make sense in this resource name

secret:
enabled: false
tlsKey: foo
tlsCrt: foo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably have these default to an empty string (or not be defined at all). The foo from my previous comment was just because I was being lazy typing 😁

@verbotenj verbotenj force-pushed the feat/cardano-node-api branch from 18cc749 to 06bc188 Compare January 9, 2025 21:13
Signed-off-by: Ales Verbic <verbotenj@blinklabs.io>
@verbotenj verbotenj force-pushed the feat/cardano-node-api branch from 06bc188 to c2af95b Compare January 9, 2025 21:14
@verbotenj verbotenj merged commit 1415c37 into main Jan 9, 2025
1 check passed
@verbotenj verbotenj deleted the feat/cardano-node-api branch January 9, 2025 21:48
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

Successfully merging this pull request may close these issues.

2 participants