diff --git a/jaeger/charts/linkerd-jaeger/README.md b/jaeger/charts/linkerd-jaeger/README.md index e0d5a5f79e039..7eaceabf41591 100644 --- a/jaeger/charts/linkerd-jaeger/README.md +++ b/jaeger/charts/linkerd-jaeger/README.md @@ -65,85 +65,86 @@ Kubernetes: `>=1.22.0-0` ## Values -| Key | Type | Default | Description | -|-----|------|---------|-------------| -| clusterDomain | string | `"cluster.local"` | Kubernetes DNS Domain name to use | -| collector.GID | string | `nil` | GID for the collector resource | -| collector.UID | string | `nil` | UID for the collector resource | -| collector.command | string | `"/otelcol-contrib"` | | -| collector.config | object | see `value.yaml` for actual configuration | OpenTelemetry Collector config, See the [Configuration docs](https://opentelemetry.io/docs/collector/configuration/) for more information | -| collector.enabled | bool | `true` | Set to false to exclude collector installation | -| collector.env | list | `[]` | Collector Deployment env | -| collector.image.name | string | `"otel/opentelemetry-collector-contrib"` | | -| collector.image.pullPolicy | string | `""` | | -| collector.image.version | string | `"0.83.0"` | | -| collector.nodeSelector | object | `{"kubernetes.io/os":"linux"}` | NodeSelector section, See the [K8S documentation](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector) for more information | -| collector.replicas | int | `1` | Number of replicas of the collector component | -| collector.resources.cpu.limit | string | `nil` | Maximum amount of CPU units that the collector container can use | -| collector.resources.cpu.request | string | `nil` | Amount of CPU units that the collector container requests | -| collector.resources.ephemeral-storage.limit | string | `""` | Maximum amount of ephemeral storage that the collector container can use | -| collector.resources.ephemeral-storage.request | string | `""` | Amount of ephemeral storage that the collector container requests | -| collector.resources.memory.limit | string | `nil` | Maximum amount of memory that collector container can use | -| collector.resources.memory.request | string | `nil` | Amount of memory that the collector container requests | -| collector.tolerations | string | `nil` | Tolerations section, See the [K8S documentation](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) for more information | -| commonLabels | object | `{}` | Labels to apply to all resources | -| createNamespaceMetadataJob | bool | `true` | Creates a Job that adds necessary metadata to the extension's namespace during install; disable if lack of privileges require doing this manually | -| defaultGID | int | `2103` | Default GID for all the jaeger components | -| defaultUID | int | `2103` | Default UID for all the jaeger components | -| enablePSP | bool | `false` | Create Roles and RoleBindings to associate this extension's ServiceAccounts to the control plane PSP resource. This requires that `enabledPSP` is set to true on the control plane install. Note PSP has been deprecated since k8s v1.21 | -| enablePodAntiAffinity | bool | `false` | Enables Pod Anti Affinity logic to balance the placement of replicas across hosts and zones for High Availability. Enable this only when you have multiple replicas of components. | -| imagePullSecrets | list | `[]` | For Private docker registries, authentication is needed. Registry secrets are applied to the respective service accounts | -| jaeger.GID | string | `nil` | GID for the jaeger resource | -| jaeger.UID | string | `nil` | UID for the jaeger resource | -| jaeger.args | list | `["--query.base-path=/jaeger"]` | CLI arguments for Jaeger, See [Jaeger AIO Memory CLI reference](https://www.jaegertracing.io/docs/1.24/cli/#jaeger-all-in-one-memory) | -| jaeger.enabled | bool | `true` | Set to false to exclude all-in-one Jaeger installation | -| jaeger.image.name | string | `"jaegertracing/all-in-one"` | | -| jaeger.image.pullPolicy | string | `""` | | -| jaeger.image.version | float | `1.31` | | -| jaeger.nodeSelector | object | `{"kubernetes.io/os":"linux"}` | NodeSelector section, See the [K8S documentation](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector) for more information | -| jaeger.resources.cpu.limit | string | `nil` | Maximum amount of CPU units that the jaeger container can use | -| jaeger.resources.cpu.request | string | `nil` | Amount of CPU units that the jaeger container requests | -| jaeger.resources.ephemeral-storage.limit | string | `""` | Maximum amount of ephemeral storage that the jaeger container can use | -| jaeger.resources.ephemeral-storage.request | string | `""` | Amount of ephemeral storage that the jaeger container requests | -| jaeger.resources.memory.limit | string | `nil` | Maximum amount of memory that jaeger container can use | -| jaeger.resources.memory.request | string | `nil` | Amount of memory that the jaeger container requests | -| jaeger.tolerations | string | `nil` | Tolerations section, See the [K8S documentation](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) for more information | -| linkerdNamespace | string | `"linkerd"` | Namespace of the Linkerd core control-plane install | -| linkerdVersion | string | `"linkerdVersionValue"` | | -| namespaceMetadata.image.name | string | `"extension-init"` | Docker image name for the namespace-metadata instance | -| namespaceMetadata.image.pullPolicy | string | imagePullPolicy | Pull policy for the namespace-metadata instance | -| namespaceMetadata.image.registry | string | `"cr.l5d.io/linkerd"` | Docker registry for the namespace-metadata instance | -| namespaceMetadata.image.tag | string | `"v0.1.1"` | Docker image tag for the namespace-metadata instance | -| namespaceMetadata.nodeSelector | object | `{"kubernetes.io/os":"linux"}` | NodeSelector section, See the [K8S documentation](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector) for more information | -| namespaceMetadata.tolerations | string | `nil` | Tolerations section, See the [K8S documentation](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) for more information | -| nodeSelector | object | `{"kubernetes.io/os":"linux"}` | Default nodeSelector section, See the [K8S documentation](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector) for more information | -| podLabels | object | `{}` | Additional labels to add to all pods | -| revisionHistoryLimit | int | `10` | Specifies the number of old ReplicaSets to retain to allow rollback. | -| tolerations | string | `nil` | Default tolerations section, See the [K8S documentation](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) for more information | -| webhook.GID | string | `nil` | GID for the webhook resource | -| webhook.UID | string | `nil` | UID for the webhook resource | -| webhook.caBundle | string | `""` | Bundle of CA certificates for webhook. If not provided nor injected with cert-manager, then Helm will use the certificate generated for `webhook.crtPEM`. If `webhook.externalSecret` is set to true, this value, injectCaFrom, or injectCaFromSecret must be set, as no certificate will be generated. See the cert-manager [CA Injector Docs](https://cert-manager.io/docs/concepts/ca-injector) for more information. | -| webhook.collectorSvcAccount | string | `"collector"` | service account associated with the collector instance | -| webhook.collectorSvcAddr | string | `"collector.linkerd-jaeger:55678"` | collector service address for the proxies to send trace data. Points by default to the linkerd-jaeger collector | -| webhook.crtPEM | string | `""` | Certificate for the webhook. If not provided and not using an external secret then Helm will generate one. | -| webhook.externalSecret | bool | `false` | Do not create a secret resource for the webhook. If this is set to `true`, the value `webhook.caBundle` must be set or the ca bundle must injected with cert-manager ca injector using `webhook.injectCaFrom` or `webhook.injectCaFromSecret` (see below). | -| webhook.failurePolicy | string | `"Ignore"` | | -| webhook.image.name | string | `"cr.l5d.io/linkerd/jaeger-webhook"` | | -| webhook.image.pullPolicy | string | `""` | | -| webhook.image.version | string | `"linkerdVersionValue"` | | -| webhook.injectCaFrom | string | `""` | Inject the CA bundle from a cert-manager Certificate. See the cert-manager [CA Injector Docs](https://cert-manager.io/docs/concepts/ca-injector/#injecting-ca-data-from-a-certificate-resource) for more information. | -| webhook.injectCaFromSecret | string | `""` | Inject the CA bundle from a Secret. If set, the `cert-manager.io/inject-ca-from-secret` annotation will be added to the webhook. The Secret must have the CA Bundle stored in the `ca.crt` key and have the `cert-manager.io/allow-direct-injection` annotation set to `true`. See the cert-manager [CA Injector Docs](https://cert-manager.io/docs/concepts/ca-injector/#injecting-ca-data-from-a-secret-resource) for more information. | -| webhook.keyPEM | string | `""` | Certificate key for the webhook. If not provided and not using an external secret then Helm will generate one. | -| webhook.logLevel | string | `"info"` | | -| webhook.namespaceSelector | object | `{"matchExpressions":[{"key":"kubernetes.io/metadata.name","operator":"NotIn","values":["kube-system"]}]}` | Namespace selector used by admission webhook. | -| webhook.nodeSelector | object | `{"kubernetes.io/os":"linux"}` | NodeSelector section, See the [K8S documentation](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector) for more information | -| webhook.objectSelector | string | `nil` | | -| webhook.replicas | int | `1` | Number of replicas of the jaeger-injector component | -| webhook.resources.cpu.limit | string | `nil` | Maximum amount of CPU units that the jaeger-injector container can use | -| webhook.resources.cpu.request | string | `nil` | Amount of CPU units that the jaeger-injector container requests | -| webhook.resources.memory.limit | string | `nil` | Maximum amount of memory that jaeger-injector container can use | -| webhook.resources.memory.request | string | `nil` | Amount of memory that the jaeger-injector container requests | -| webhook.tolerations | string | `nil` | Tolerations section, See the [K8S documentation](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) for more information | +| Key | Type | Default | Description | +|-----------------------------------------------|------|------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| clusterDomain | string | `"cluster.local"` | Kubernetes DNS Domain name to use | +| collector.GID | string | `nil` | GID for the collector resource | +| collector.UID | string | `nil` | UID for the collector resource | +| collector.command | string | `"/otelcol-contrib"` | | +| collector.config | object | see `value.yaml` for actual configuration | OpenTelemetry Collector config, See the [Configuration docs](https://opentelemetry.io/docs/collector/configuration/) for more information | +| collector.enabled | bool | `true` | Set to false to exclude collector installation | +| collector.env | list | `[]` | Collector Deployment env | +| collector.image.name | string | `"otel/opentelemetry-collector-contrib"` | | +| collector.image.pullPolicy | string | `""` | | +| collector.image.version | string | `"0.83.0"` | | +| collector.nodeSelector | object | `{"kubernetes.io/os":"linux"}` | NodeSelector section, See the [K8S documentation](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector) for more information | +| collector.replicas | int | `1` | Number of replicas of the collector component | +| collector.resources.cpu.limit | string | `nil` | Maximum amount of CPU units that the collector container can use | +| collector.resources.cpu.request | string | `nil` | Amount of CPU units that the collector container requests | +| collector.resources.ephemeral-storage.limit | string | `""` | Maximum amount of ephemeral storage that the collector container can use | +| collector.resources.ephemeral-storage.request | string | `""` | Amount of ephemeral storage that the collector container requests | +| collector.resources.memory.limit | string | `nil` | Maximum amount of memory that collector container can use | +| collector.resources.memory.request | string | `nil` | Amount of memory that the collector container requests | +| collector.tolerations | string | `nil` | Tolerations section, See the [K8S documentation](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) for more information | +| commonLabels | object | `{}` | Labels to apply to all resources | +| createNamespaceMetadataJob | bool | `true` | Creates a Job that adds necessary metadata to the extension's namespace during install; disable if lack of privileges require doing this manually | +| defaultGID | int | `2103` | Default GID for all the jaeger components | +| defaultUID | int | `2103` | Default UID for all the jaeger components | +| enablePSP | bool | `false` | Create Roles and RoleBindings to associate this extension's ServiceAccounts to the control plane PSP resource. This requires that `enabledPSP` is set to true on the control plane install. Note PSP has been deprecated since k8s v1.21 | +| enablePodAntiAffinity | bool | `false` | Enables Pod Anti Affinity logic to balance the placement of replicas across hosts and zones for High Availability. Enable this only when you have multiple replicas of components. | +| imagePullSecrets | list | `[]` | For Private docker registries, authentication is needed. Registry secrets are applied to the respective service accounts | +| jaeger.GID | string | `nil` | GID for the jaeger resource | +| jaeger.UID | string | `nil` | UID for the jaeger resource | +| jaeger.args | list | `["--query.base-path=/jaeger"]` | CLI arguments for Jaeger, See [Jaeger AIO Memory CLI reference](https://www.jaegertracing.io/docs/1.24/cli/#jaeger-all-in-one-memory) | +| jaeger.enabled | bool | `true` | Set to false to exclude all-in-one Jaeger installation | +| jaeger.image.name | string | `"jaegertracing/all-in-one"` | | +| jaeger.image.pullPolicy | string | `""` | | +| jaeger.image.version | float | `1.31` | | +| jaeger.nodeSelector | object | `{"kubernetes.io/os":"linux"}` | NodeSelector section, See the [K8S documentation](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector) for more information | +| jaeger.resources.cpu.limit | string | `nil` | Maximum amount of CPU units that the jaeger container can use | +| jaeger.resources.cpu.request | string | `nil` | Amount of CPU units that the jaeger container requests | +| jaeger.resources.ephemeral-storage.limit | string | `""` | Maximum amount of ephemeral storage that the jaeger container can use | +| jaeger.resources.ephemeral-storage.request | string | `""` | Amount of ephemeral storage that the jaeger container requests | +| jaeger.resources.memory.limit | string | `nil` | Maximum amount of memory that jaeger container can use | +| jaeger.resources.memory.request | string | `nil` | Amount of memory that the jaeger container requests | +| jaeger.tolerations | string | `nil` | Tolerations section, See the [K8S documentation](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) for more information | +| linkerdNamespace | string | `"linkerd"` | Namespace of the Linkerd core control-plane install | +| linkerdVersion | string | `"linkerdVersionValue"` | | +| namespaceMetadata.image.name | string | `"extension-init"` | Docker image name for the namespace-metadata instance | +| namespaceMetadata.image.pullPolicy | string | imagePullPolicy | Pull policy for the namespace-metadata instance | +| namespaceMetadata.image.registry | string | `"cr.l5d.io/linkerd"` | Docker registry for the namespace-metadata instance | +| namespaceMetadata.image.tag | string | `"v0.1.1"` | Docker image tag for the namespace-metadata instance | +| namespaceMetadata.nodeSelector | object | `{"kubernetes.io/os":"linux"}` | NodeSelector section, See the [K8S documentation](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector) for more information | +| namespaceMetadata.tolerations | string | `nil` | Tolerations section, See the [K8S documentation](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) for more information | +| nodeSelector | object | `{"kubernetes.io/os":"linux"}` | Default nodeSelector section, See the [K8S documentation](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector) for more information | +| podLabels | object | `{}` | Additional labels to add to all pods | +| revisionHistoryLimit | int | `10` | Specifies the number of old ReplicaSets to retain to allow rollback. | +| tolerations | string | `nil` | Default tolerations section, See the [K8S documentation](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) for more information | +| webhook.GID | string | `nil` | GID for the webhook resource | +| webhook.UID | string | `nil` | UID for the webhook resource | +| webhook.caBundle | string | `""` | Bundle of CA certificates for webhook. If not provided nor injected with cert-manager, then Helm will use the certificate generated for `webhook.crtPEM`. If `webhook.externalSecret` is set to true, this value, injectCaFrom, or injectCaFromSecret must be set, as no certificate will be generated. See the cert-manager [CA Injector Docs](https://cert-manager.io/docs/concepts/ca-injector) for more information. | +| webhook.collectorSvcAccount | string | `"collector"` | service account associated with the collector instance | +| webhook.collectorSvcAddr | string | `"collector.linkerd-jaeger:55678"` | collector service address for the proxies to send trace data. Points by default to the linkerd-jaeger collector | +| webhook.collectorTraceProtocol | string | `"opencensus"` | protocol proxies should use to send trace data. Can be `opencensus` (default) or `opentelemetry` | +| webhook.crtPEM | string | `""` | Certificate for the webhook. If not provided and not using an external secret then Helm will generate one. | +| webhook.externalSecret | bool | `false` | Do not create a secret resource for the webhook. If this is set to `true`, the value `webhook.caBundle` must be set or the ca bundle must injected with cert-manager ca injector using `webhook.injectCaFrom` or `webhook.injectCaFromSecret` (see below). | +| webhook.failurePolicy | string | `"Ignore"` | | +| webhook.image.name | string | `"cr.l5d.io/linkerd/jaeger-webhook"` | | +| webhook.image.pullPolicy | string | `""` | | +| webhook.image.version | string | `"linkerdVersionValue"` | | +| webhook.injectCaFrom | string | `""` | Inject the CA bundle from a cert-manager Certificate. See the cert-manager [CA Injector Docs](https://cert-manager.io/docs/concepts/ca-injector/#injecting-ca-data-from-a-certificate-resource) for more information. | +| webhook.injectCaFromSecret | string | `""` | Inject the CA bundle from a Secret. If set, the `cert-manager.io/inject-ca-from-secret` annotation will be added to the webhook. The Secret must have the CA Bundle stored in the `ca.crt` key and have the `cert-manager.io/allow-direct-injection` annotation set to `true`. See the cert-manager [CA Injector Docs](https://cert-manager.io/docs/concepts/ca-injector/#injecting-ca-data-from-a-secret-resource) for more information. | +| webhook.keyPEM | string | `""` | Certificate key for the webhook. If not provided and not using an external secret then Helm will generate one. | +| webhook.logLevel | string | `"info"` | | +| webhook.namespaceSelector | object | `{"matchExpressions":[{"key":"kubernetes.io/metadata.name","operator":"NotIn","values":["kube-system"]}]}` | Namespace selector used by admission webhook. | +| webhook.nodeSelector | object | `{"kubernetes.io/os":"linux"}` | NodeSelector section, See the [K8S documentation](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector) for more information | +| webhook.objectSelector | string | `nil` | | +| webhook.replicas | int | `1` | Number of replicas of the jaeger-injector component | +| webhook.resources.cpu.limit | string | `nil` | Maximum amount of CPU units that the jaeger-injector container can use | +| webhook.resources.cpu.request | string | `nil` | Amount of CPU units that the jaeger-injector container requests | +| webhook.resources.memory.limit | string | `nil` | Maximum amount of memory that jaeger-injector container can use | +| webhook.resources.memory.request | string | `nil` | Amount of memory that the jaeger-injector container requests | +| webhook.tolerations | string | `nil` | Tolerations section, See the [K8S documentation](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) for more information | ---------------------------------------------- Autogenerated from chart metadata using [helm-docs v1.12.0](https://github.com/norwoodj/helm-docs/releases/v1.12.0) diff --git a/jaeger/charts/linkerd-jaeger/templates/jaeger-injector.yaml b/jaeger/charts/linkerd-jaeger/templates/jaeger-injector.yaml index 1a4b5f2f30ffd..633dfa8765d2b 100644 --- a/jaeger/charts/linkerd-jaeger/templates/jaeger-injector.yaml +++ b/jaeger/charts/linkerd-jaeger/templates/jaeger-injector.yaml @@ -50,6 +50,7 @@ spec: containers: - args: - -collector-svc-addr={{.Values.webhook.collectorSvcAddr}} + - -collector-trace-protocol={{.Values.webhook.collectorTraceProtocol}} - -collector-svc-account={{.Values.webhook.collectorSvcAccount}} - -log-level={{.Values.webhook.logLevel}} - -cluster-domain={{.Values.clusterDomain}} diff --git a/jaeger/charts/linkerd-jaeger/values.yaml b/jaeger/charts/linkerd-jaeger/values.yaml index 1d98bf5266344..9ee32c5fc9689 100644 --- a/jaeger/charts/linkerd-jaeger/values.yaml +++ b/jaeger/charts/linkerd-jaeger/values.yaml @@ -102,6 +102,9 @@ collector: config: receivers: opencensus: + otlp: + protocols: + grpc: processors: batch: resource: @@ -177,7 +180,7 @@ collector: extensions: [health_check] pipelines: traces: - receivers: [opencensus] + receivers: [opencensus, otlp] processors: [resource, k8sattributes, batch] exporters: [jaeger] @@ -290,6 +293,9 @@ webhook: # -- collector service address for the proxies to send trace data. # Points by default to the linkerd-jaeger collector collectorSvcAddr: collector.linkerd-jaeger:55678 + # -- protocol proxies should use to send trace data. + # Can be `opencensus` (default) or `opentelemetry` + collectorTraceProtocol: opencensus # -- service account associated with the collector instance collectorSvcAccount: collector diff --git a/jaeger/cmd/testdata/install_collector_disabled.golden b/jaeger/cmd/testdata/install_collector_disabled.golden index ebc55d4019503..bd8295218669b 100644 --- a/jaeger/cmd/testdata/install_collector_disabled.golden +++ b/jaeger/cmd/testdata/install_collector_disabled.golden @@ -46,6 +46,7 @@ spec: containers: - args: - -collector-svc-addr=collector.linkerd-jaeger:55678 + - -collector-trace-protocol=opencensus - -collector-svc-account=collector - -log-level=info - -cluster-domain=cluster.local diff --git a/jaeger/cmd/testdata/install_default.golden b/jaeger/cmd/testdata/install_default.golden index a49263a14bc31..629f1a74fb6c3 100644 --- a/jaeger/cmd/testdata/install_default.golden +++ b/jaeger/cmd/testdata/install_default.golden @@ -46,6 +46,7 @@ spec: containers: - args: - -collector-svc-addr=collector.linkerd-jaeger:55678 + - -collector-trace-protocol=opencensus - -collector-svc-account=collector - -log-level=info - -cluster-domain=cluster.local @@ -371,6 +372,9 @@ data: key: k8s.namespace.name receivers: opencensus: null + otlp: + protocols: + grpc: null service: extensions: - health_check @@ -384,6 +388,7 @@ data: - batch receivers: - opencensus + - otlp --- apiVersion: v1 kind: Service @@ -444,7 +449,7 @@ spec: template: metadata: annotations: - checksum/config: 319d95c61f89ff68538c097cca12358ac58383e2c1d93fe3d92e35c501b0541a + checksum/config: a5b9a0f939a556548f732f80a6cfe7b27a55f1c309ad2decacd1ce63d469d4a3 cluster-autoscaler.kubernetes.io/safe-to-evict: "true" config.alpha.linkerd.io/proxy-wait-before-exit-seconds: "0" config.linkerd.io/proxy-await: "enabled" diff --git a/jaeger/cmd/testdata/install_jaeger_disabled.golden b/jaeger/cmd/testdata/install_jaeger_disabled.golden index bb1f97a571f9a..c17f4736f71fd 100644 --- a/jaeger/cmd/testdata/install_jaeger_disabled.golden +++ b/jaeger/cmd/testdata/install_jaeger_disabled.golden @@ -46,6 +46,7 @@ spec: containers: - args: - -collector-svc-addr=collector.linkerd-jaeger:55678 + - -collector-trace-protocol=opencensus - -collector-svc-account=collector - -log-level=info - -cluster-domain=cluster.local @@ -360,6 +361,9 @@ data: key: k8s.namespace.name receivers: opencensus: null + otlp: + protocols: + grpc: null service: extensions: - health_check @@ -373,6 +377,7 @@ data: - batch receivers: - opencensus + - otlp --- apiVersion: v1 kind: Service @@ -433,7 +438,7 @@ spec: template: metadata: annotations: - checksum/config: 319d95c61f89ff68538c097cca12358ac58383e2c1d93fe3d92e35c501b0541a + checksum/config: a5b9a0f939a556548f732f80a6cfe7b27a55f1c309ad2decacd1ce63d469d4a3 cluster-autoscaler.kubernetes.io/safe-to-evict: "true" config.alpha.linkerd.io/proxy-wait-before-exit-seconds: "0" config.linkerd.io/proxy-await: "enabled" diff --git a/jaeger/injector/cmd/main.go b/jaeger/injector/cmd/main.go index a543586b515e9..c5b435486878c 100644 --- a/jaeger/injector/cmd/main.go +++ b/jaeger/injector/cmd/main.go @@ -20,6 +20,8 @@ func main() { kubeconfig := cmd.String("kubeconfig", "", "path to kubeconfig") collectorSvcAddr := cmd.String("collector-svc-addr", "", "collector service address for the proxies to send trace data") + collectorTraceProtocol := cmd.String("collector-trace-protocol", "", + "protocol proxies should use to send trace data.") collectorSvcAccount := cmd.String("collector-svc-account", "", "service account associated with the collector instance") clusterDomain := cmd.String("cluster-domain", "cluster.local", "kubernetes cluster domain") @@ -31,7 +33,7 @@ func main() { webhook.Launch( context.Background(), []k8s.APIResource{k8s.NS}, - mutator.Mutate(*collectorSvcAddr, *collectorSvcAccount, *clusterDomain, *linkerdNamespace), + mutator.Mutate(*collectorSvcAddr, *collectorTraceProtocol, *collectorSvcAccount, *clusterDomain, *linkerdNamespace), "linkerd-jaeger-injector", *metricsAddr, *addr, diff --git a/jaeger/injector/mutator/patch.go b/jaeger/injector/mutator/patch.go index e78251797f50c..3dad3e4f6eb77 100644 --- a/jaeger/injector/mutator/patch.go +++ b/jaeger/injector/mutator/patch.go @@ -22,6 +22,14 @@ const tpl = `[ "value": "{{.CollectorSvcAddr}}" } }, + { + "op": "add", + "path": "/spec/{{.ProxyPath}}/env/-", + "value": { + "name": "LINKERD2_PROXY_TRACE_PROTOCOL", + "value": "{{.CollectorProtocol}}" + } + }, { "op": "add", "path": "/spec/{{.ProxyPath}}/env/-", diff --git a/jaeger/injector/mutator/webhook.go b/jaeger/injector/mutator/webhook.go index de51848732329..ca286247b48ab 100644 --- a/jaeger/injector/mutator/webhook.go +++ b/jaeger/injector/mutator/webhook.go @@ -20,23 +20,25 @@ import ( ) const ( - collectorSvcAddrAnnotation = l5dLabels.ProxyConfigAnnotationsPrefix + "/trace-collector" - collectorSvcAccountAnnotation = l5dLabels.ProxyConfigAnnotationsPrefixAlpha + + collectorSvcAddrAnnotation = l5dLabels.ProxyConfigAnnotationsPrefix + "/trace-collector" + collectorTraceProtocolAnnotation = l5dLabels.ProxyConfigAnnotationsPrefix + "/trace-collector-protocol" + collectorSvcAccountAnnotation = l5dLabels.ProxyConfigAnnotationsPrefixAlpha + "/trace-collector-service-account" ) // Params holds the values used in the patch template type Params struct { - ProxyPath string - CollectorSvcAddr string - CollectorSvcAccount string - ClusterDomain string - LinkerdNamespace string + ProxyPath string + CollectorSvcAddr string + CollectorTraceProtocol string + CollectorSvcAccount string + ClusterDomain string + LinkerdNamespace string } // Mutate returns an AdmissionResponse containing the patch, if any, to apply // to the proxy -func Mutate(collectorSvcAddr, collectorSvcAccount, clusterDomain, linkerdNamespace string) webhook.Handler { +func Mutate(collectorSvcAddr, collectorTraceProtocol, collectorSvcAccount, clusterDomain, linkerdNamespace string) webhook.Handler { return func( _ context.Context, api *k8s.MetadataAPI, @@ -59,11 +61,12 @@ func Mutate(collectorSvcAddr, collectorSvcAccount, clusterDomain, linkerdNamespa return nil, err } params := Params{ - ProxyPath: webhook.GetProxyContainerPath(pod.Spec), - CollectorSvcAddr: collectorSvcAddr, - CollectorSvcAccount: collectorSvcAccount, - ClusterDomain: clusterDomain, - LinkerdNamespace: linkerdNamespace, + ProxyPath: webhook.GetProxyContainerPath(pod.Spec), + CollectorSvcAddr: collectorSvcAddr, + CollectorTraceProtocol: collectorTraceProtocol, + CollectorSvcAccount: collectorSvcAccount, + ClusterDomain: clusterDomain, + LinkerdNamespace: linkerdNamespace, } if params.ProxyPath == "" || labels.IsTracingEnabled(pod) { return admissionResponse, nil @@ -104,6 +107,9 @@ func applyOverrides(ns metav1.Object, pod *corev1.Pod, params *Params) { if override, ok := ann[collectorSvcAddrAnnotation]; ok { params.CollectorSvcAddr = override } + if override, ok := ann[collectorTraceProtocolAnnotation]; ok { + params.CollectorTraceProtocol = override + } if override, ok := ann[collectorSvcAccountAnnotation]; ok { params.CollectorSvcAccount = override }