From ed9f34718dcc8c21b1cbbb62d0641b6273c33bb3 Mon Sep 17 00:00:00 2001 From: Gary Brown Date: Sat, 6 Apr 2019 09:41:36 +0100 Subject: [PATCH 1/2] Include docs for common config Signed-off-by: Gary Brown --- README.adoc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.adoc b/README.adoc index 0618a6481..cab4d6daa 100644 --- a/README.adoc +++ b/README.adoc @@ -486,6 +486,24 @@ spec: NOTE: the default create-schema job uses `MODE=prod`, which implies a replication factor of `2`, using `NetworkTopologyStrategy` as the class, effectively meaning that at least 3 nodes are required in the Cassandra cluster. If a `SimpleStrategy` is desired, set the mode to `test`, which then sets the replication factor of `1`. Refer to the link:https://github.com/jaegertracing/jaeger/blob/master/plugin/storage/cassandra/schema/create.sh[create-schema script] for more details. +== Finer grained configuration + +The custom resource can be used to define finer grained kubernetes configuration applied to all Jaeger components or at the individual component level. + +When a common definition (for all Jaeger components) is required, it is defined under the `spec` node. When the definition relates to an individual component, it is placed under the `spec/` node. + +The types of configuration supported include: + +* link:https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/[annotations] + +* link:https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container[resources] to limit cpu and memory + +* link:https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity[affinity] to determine which nodes a pod can be allocated to + +* link:https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/[tolerations] in conjunction with `taints` to enable pods to avoid being repelled from a node + +* link:https://kubernetes.io/docs/concepts/storage/volumes/[volumes] and volume mounts + == Removing an instance To remove an instance, just use the `delete` command with the file used for the instance creation: From ebe9cacb0c0154fed06522272096eb1434605377 Mon Sep 17 00:00:00 2001 From: Gary Brown Date: Mon, 8 Apr 2019 09:58:39 +0100 Subject: [PATCH 2/2] Add example Signed-off-by: Gary Brown --- README.adoc | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) diff --git a/README.adoc b/README.adoc index cab4d6daa..ba0844ca6 100644 --- a/README.adoc +++ b/README.adoc @@ -488,7 +488,7 @@ NOTE: the default create-schema job uses `MODE=prod`, which implies a replicatio == Finer grained configuration -The custom resource can be used to define finer grained kubernetes configuration applied to all Jaeger components or at the individual component level. +The custom resource can be used to define finer grained Kubernetes configuration applied to all Jaeger components or at the individual component level. When a common definition (for all Jaeger components) is required, it is defined under the `spec` node. When the definition relates to an individual component, it is placed under the `spec/` node. @@ -504,6 +504,67 @@ The types of configuration supported include: * link:https://kubernetes.io/docs/concepts/storage/volumes/[volumes] and volume mounts +[source,yaml] +---- +apiVersion: jaegertracing.io/v1 +kind: Jaeger +metadata: + name: simple-prod +spec: + strategy: production + storage: + type: elasticsearch + options: + es: + server-urls: http://elasticsearch:9200 + annotations: + key1: value1 + resources: + requests: + memory: "64Mi" + cpu: "250m" + limits: + memory: "128Mi" + cpu: "500m" + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/e2e-az-name + operator: In + values: + - e2e-az1 + - e2e-az2 + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 1 + preference: + matchExpressions: + - key: another-node-label-key + operator: In + values: + - another-node-label-value + tolerations: + - key: "key1" + operator: "Equal" + value: "value1" + effect: "NoSchedule" + - key: "key1" + operator: "Equal" + value: "value1" + effect: "NoExecute" + volumeMounts: + - name: config-vol + mountPath: /etc/config + volumes: + - name: config-vol + configMap: + name: log-config + items: + - key: log_level + path: log_level +---- + == Removing an instance To remove an instance, just use the `delete` command with the file used for the instance creation: