github.com/Ilhicas/nomad@v1.0.4-0.20210304152020-e86851182bc3/helper/envoy/envoy.go (about)

     1  // Package envoy provides a high level view of the variables that go into
     2  // selecting an envoy version.
     3  package envoy
     4  
     5  const (
     6  	// SidecarMetaParam is the parameter name used to configure the connect sidecar
     7  	// at the client level. Setting this option in client configuration takes the
     8  	// lowest precedence.
     9  	//
    10  	// If this meta option is not set in client configuration, it defaults to
    11  	// ImageFormat, so that Nomad will defer envoy version selection to Consul.
    12  	SidecarMetaParam = "connect.sidecar_image"
    13  
    14  	// SidecarConfigVar is used as the default config.image value for connect
    15  	// sidecar proxies, when they are injected in the job connect mutator.
    16  	SidecarConfigVar = "${meta." + SidecarMetaParam + "}"
    17  
    18  	// GatewayMetaParam is the parameter name used to configure the connect gateway
    19  	// at the client level. Setting this option in client configuration takes the
    20  	// lowest precedence.
    21  	//
    22  	// If this meta option is not set in client configuration, it defaults to
    23  	// ImageFormat, so that Nomad will defer envoy version selection to Consul.
    24  	GatewayMetaParam = "connect.gateway_image"
    25  
    26  	// GatewayConfigVar is used as the default config.image value for connect
    27  	// gateway proxies, when they are injected in the job connect mutator.
    28  	GatewayConfigVar = "${meta." + GatewayMetaParam + "}"
    29  
    30  	// envoyImageFormat is the default format string used for official envoy Docker
    31  	// images with the tag being the semver of the version of envoy. Nomad fakes
    32  	// interpolation of ${NOMAD_envoy_version} by replacing it with the version
    33  	// string for envoy that Consul reports as preferred.
    34  	//
    35  	// Folks wanting to build and use custom images while still having Nomad refer
    36  	// to specific versions as preferred by Consul would set meta.connect.sidecar_image
    37  	// to something like: "custom/envoy:${NOMAD_envoy_version}".
    38  	ImageFormat = "envoyproxy/envoy:v" + VersionVar
    39  
    40  	// envoyVersionVar will be replaced with the Envoy version string when
    41  	// used in the meta.connect.sidecar_image variable.
    42  	VersionVar = "${NOMAD_envoy_version}"
    43  
    44  	// FallbackImage is the image set in the node meta by default
    45  	// to be used by Consul Connect sidecar tasks. As of Nomad 1.0, this value
    46  	// is only used as a fallback when the version of Consul does not yet support
    47  	// dynamic envoy versions.
    48  	FallbackImage = "envoyproxy/envoy:v1.11.2@sha256:a7769160c9c1a55bb8d07a3b71ce5d64f72b1f665f10d81aa1581bc3cf850d09"
    49  )