# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). # You may not use this file except in compliance with the License. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license" file accompanying this file. This file is distributed # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either # express or implied. See the License for the specific language governing # permissions and limitations under the License. apiVersion: v1 kind: ServiceAccount metadata: annotations: eks.amazonaws.com/role-arn: XRAY_SA_ROLE labels: app: xray-daemon name: xray-daemon namespace: default --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: xray-daemon labels: app: xray-daemon roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: cluster-admin subjects: - kind: ServiceAccount name: xray-daemon namespace: default --- apiVersion: apps/v1 kind: DaemonSet metadata: name: xray-daemon spec: updateStrategy: type: RollingUpdate selector: matchLabels: app: xray-daemon template: metadata: labels: app: xray-daemon spec: serviceAccountName: xray-daemon volumes: - name: config-volume configMap: name: xray-config hostNetwork: true containers: - name: xray-daemon image: public.ecr.aws/xray/aws-xray-daemon:3.3.3 imagePullPolicy: Always command: - "/xray" - "-c" - "/aws/xray/config.yaml" resources: limits: memory: 24Mi ports: - name: xray-ingest containerPort: 2000 hostPort: 2000 protocol: UDP volumeMounts: - name: config-volume mountPath: "/aws/xray" readOnly: true --- apiVersion: v1 kind: ConfigMap metadata: name: xray-config namespace: default data: config.yaml: |- TotalBufferSizeMB: 24 Socket: UDPAddress: "0.0.0.0:2000" TCPAddress: "0.0.0.0:2000" Version: 2 Logging: LogLevel: "info" --- apiVersion: v1 kind: Service metadata: name: xray-service spec: selector: app: xray-daemon clusterIP: None ports: - name: incoming port: 2000 protocol: UDP