-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
consul/connect: fix regression where client connect images ignored #9624
Merged
+169
−65
Merged
Changes from all commits
Commits
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 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 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 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 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,49 @@ | ||
// Package envoy provides a high level view of the variables that go into | ||
// selecting an envoy version. | ||
package envoy | ||
|
||
const ( | ||
// SidecarMetaParam is the parameter name used to configure the connect sidecar | ||
// at the client level. Setting this option in client configuration takes the | ||
// lowest precedence. | ||
// | ||
// If this meta option is not set in client configuration, it defaults to | ||
// ImageFormat, so that Nomad will defer envoy version selection to Consul. | ||
SidecarMetaParam = "connect.sidecar_image" | ||
|
||
// SidecarConfigVar is used as the default config.image value for connect | ||
// sidecar proxies, when they are injected in the job connect mutator. | ||
SidecarConfigVar = "${meta." + SidecarMetaParam + "}" | ||
|
||
// GatewayMetaParam is the parameter name used to configure the connect gateway | ||
// at the client level. Setting this option in client configuration takes the | ||
// lowest precedence. | ||
// | ||
// If this meta option is not set in client configuration, it defaults to | ||
// ImageFormat, so that Nomad will defer envoy version selection to Consul. | ||
GatewayMetaParam = "connect.gateway_image" | ||
|
||
// GatewayConfigVar is used as the default config.image value for connect | ||
// gateway proxies, when they are injected in the job connect mutator. | ||
GatewayConfigVar = "${meta." + GatewayMetaParam + "}" | ||
|
||
// envoyImageFormat is the default format string used for official envoy Docker | ||
// images with the tag being the semver of the version of envoy. Nomad fakes | ||
// interpolation of ${NOMAD_envoy_version} by replacing it with the version | ||
// string for envoy that Consul reports as preferred. | ||
// | ||
// Folks wanting to build and use custom images while still having Nomad refer | ||
// to specific versions as preferred by Consul would set meta.connect.sidecar_image | ||
// to something like: "custom/envoy:${NOMAD_envoy_version}". | ||
ImageFormat = "envoyproxy/envoy:v" + VersionVar | ||
|
||
// envoyVersionVar will be replaced with the Envoy version string when | ||
// used in the meta.connect.sidecar_image variable. | ||
VersionVar = "${NOMAD_envoy_version}" | ||
|
||
// FallbackImage is the image set in the node meta by default | ||
// to be used by Consul Connect sidecar tasks. As of Nomad 1.0, this value | ||
// is only used as a fallback when the version of Consul does not yet support | ||
// dynamic envoy versions. | ||
FallbackImage = "envoyproxy/envoy:v1.11.2@sha256:a7769160c9c1a55bb8d07a3b71ce5d64f72b1f665f10d81aa1581bc3cf850d09" | ||
) |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Solid test coverage here 👍