-
Notifications
You must be signed in to change notification settings - Fork 334
peering: expose servers over Kubernetes service #1378
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
Merged
Merged
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
ebd7b28
default partitions works with load balancer service
ndhanushkodi 2a8f470
nodeport works if external ip's are added to the firewall rules. need…
ndhanushkodi 93f6b69
debug acceptance: set externalService to Nodeport and pass bool to co…
ndhanushkodi 4dfec23
eks load balancer health checks failed because 8501 isn't open when t…
ndhanushkodi c293851
poll-server-external-service should be false by default
ndhanushkodi 0e43fa4
internal ip's work with the flattened networks in eks and gke
ndhanushkodi 4ff97fb
scope this to support helm chart service only, add helm unit tests
ndhanushkodi 950a8dd
attempt to get the peering connect test to use the nodePort config fo…
ndhanushkodi 781419f
fix helm gen
ndhanushkodi 05c7f6f
configure the service on the acceptor side, and update the service name
ndhanushkodi 94c57aa
use new consul image that has generate token updates
ndhanushkodi 32d7cc3
try running just peering tests
ndhanushkodi 25bf5c1
actually only run peering tests, and use ent image for consul
ndhanushkodi e53d79a
change the name in a few more places and add unit tests
ndhanushkodi b01bd4e
actually use a proper ent image :(((((((((((
ndhanushkodi a50abb8
update acceptance tests to use multiple server instances, except for …
ndhanushkodi 7ef15b3
add more unit tests, make helm values merge the right way
ndhanushkodi 54f1495
add longer timeouts, enable on aks
ndhanushkodi f9de2a3
add the right helm values
ndhanushkodi d3c5d3e
update service name
ndhanushkodi c426cc0
update helm docs and connect inject tests
ndhanushkodi b06fc4f
try with less aggressive backoff in image
ndhanushkodi fda1bec
rebased on top of tls and acls, removed a few test cases, to run test…
ndhanushkodi b5cac64
address review comments
ndhanushkodi 7613fd9
address review comments
ndhanushkodi 922e7f8
update consul api
ndhanushkodi b45f1aa
bring back bootstrapexpect
ndhanushkodi b028f12
add some cloud cleanup
ndhanushkodi 1362da9
remove bootstrap expect
ndhanushkodi 7500b10
remove cleanup steps
ndhanushkodi 28579e3
add http/tls helm unit tests
ndhanushkodi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| {{- $serverEnabled := (or (and (ne (.Values.server.enabled | toString) "-") .Values.server.enabled) (and (eq (.Values.server.enabled | toString) "-") .Values.global.enabled)) -}} | ||
| {{- $serverExposeServiceEnabled := (or (and (ne (.Values.server.exposeService.enabled | toString) "-") .Values.server.exposeService.enabled) (and (eq (.Values.server.exposeService.enabled | toString) "-") (or .Values.global.peering.enabled .Values.global.adminPartitions.enabled))) -}} | ||
| {{- if (and $serverEnabled $serverExposeServiceEnabled) }} | ||
|
|
||
| # Service with an external IP to reach Consul servers. | ||
| # Used for exposing gRPC port for peering and ports for client partitions to discover servers. | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| name: {{ template "consul.fullname" . }}-expose-servers | ||
| namespace: {{ .Release.Namespace }} | ||
| labels: | ||
| app: {{ template "consul.name" . }} | ||
| chart: {{ template "consul.chart" . }} | ||
| heritage: {{ .Release.Service }} | ||
| release: {{ .Release.Name }} | ||
| component: server | ||
| annotations: | ||
| {{- if .Values.server.exposeService.annotations }} | ||
| {{ tpl .Values.server.exposeService.annotations . | nindent 4 | trim }} | ||
| {{- end }} | ||
| spec: | ||
| type: "{{ .Values.server.exposeService.type }}" | ||
| ports: | ||
| {{- if (or (not .Values.global.tls.enabled) (not .Values.global.tls.httpsOnly)) }} | ||
| - name: http | ||
| port: 8500 | ||
| targetPort: 8500 | ||
| {{ if (and (eq .Values.server.exposeService.type "NodePort") .Values.server.exposeService.nodePort.http) }} | ||
| nodePort: {{ .Values.server.exposeService.nodePort.http }} | ||
| {{- end }} | ||
| {{- end }} | ||
| {{- if .Values.global.tls.enabled }} | ||
| - name: https | ||
| port: 8501 | ||
| targetPort: 8501 | ||
| {{ if (and (eq .Values.server.exposeService.type "NodePort") .Values.server.exposeService.nodePort.https) }} | ||
| nodePort: {{ .Values.server.exposeService.nodePort.https }} | ||
| {{- end }} | ||
| {{- end }} | ||
| - name: serflan | ||
| port: 8301 | ||
| targetPort: 8301 | ||
| {{ if (and (eq .Values.server.exposeService.type "NodePort") .Values.server.exposeService.nodePort.serf) }} | ||
| nodePort: {{ .Values.server.exposeService.nodePort.serf }} | ||
| {{- end }} | ||
| - name: rpc | ||
| port: 8300 | ||
| targetPort: 8300 | ||
| {{ if (and (eq .Values.server.exposeService.type "NodePort") .Values.server.exposeService.nodePort.rpc) }} | ||
| nodePort: {{ .Values.server.exposeService.nodePort.rpc }} | ||
| {{- end }} | ||
| - name: grpc | ||
| port: 8502 | ||
| targetPort: 8503 | ||
| {{ if (and (eq .Values.server.exposeService.type "NodePort") .Values.server.exposeService.nodePort.grpc) }} | ||
| nodePort: {{ .Values.server.exposeService.nodePort.grpc }} | ||
| {{- end }} | ||
| selector: | ||
| app: {{ template "consul.name" . }} | ||
| release: "{{ .Release.Name }}" | ||
| component: server | ||
| {{- end }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.