|
| 1 | +--- |
| 2 | +# Source: elastic-agent/templates/agent/service-account.yaml |
| 3 | +apiVersion: v1 |
| 4 | +kind: ServiceAccount |
| 5 | +metadata: |
| 6 | + name: agent-nginx-example |
| 7 | + namespace: "default" |
| 8 | + labels: |
| 9 | + helm.sh/chart: elastic-agent-0.0.1 |
| 10 | + app.kubernetes.io/name: elastic-agent |
| 11 | + app.kubernetes.io/instance: example |
| 12 | + app.kubernetes.io/version: 9.0.0 |
| 13 | + app.kubernetes.io/managed-by: Helm |
| 14 | +--- |
| 15 | +# Source: elastic-agent/templates/agent/k8s/secret.yaml |
| 16 | +apiVersion: v1 |
| 17 | +kind: Secret |
| 18 | +metadata: |
| 19 | + name: agent-nginx-example |
| 20 | + namespace: "default" |
| 21 | + labels: |
| 22 | + helm.sh/chart: elastic-agent-0.0.1 |
| 23 | + app.kubernetes.io/name: elastic-agent |
| 24 | + app.kubernetes.io/instance: example |
| 25 | + app.kubernetes.io/version: 9.0.0 |
| 26 | + app.kubernetes.io/managed-by: Helm |
| 27 | +stringData: |
| 28 | + |
| 29 | + agent.yml: |- |
| 30 | + fleet: |
| 31 | + enabled: true |
| 32 | + providers: |
| 33 | + kubernetes_leaderelection: |
| 34 | + enabled: false |
| 35 | +--- |
| 36 | +# Source: elastic-agent/templates/agent/cluster-role.yaml |
| 37 | +apiVersion: rbac.authorization.k8s.io/v1 |
| 38 | +kind: ClusterRole |
| 39 | +metadata: |
| 40 | + name: agent-nginx-example-default |
| 41 | + labels: |
| 42 | + helm.sh/chart: elastic-agent-0.0.1 |
| 43 | + app.kubernetes.io/name: elastic-agent |
| 44 | + app.kubernetes.io/instance: example |
| 45 | + app.kubernetes.io/version: 9.0.0 |
| 46 | + app.kubernetes.io/managed-by: Helm |
| 47 | +rules: |
| 48 | + - apiGroups: [ "" ] # "" indicates the core API group |
| 49 | + resources: |
| 50 | + - nodes |
| 51 | + - namespaces |
| 52 | + - events |
| 53 | + - pods |
| 54 | + - services |
| 55 | + - configmaps |
| 56 | + - persistentvolumes |
| 57 | + - persistentvolumeclaims |
| 58 | + - persistentvolumeclaims/status |
| 59 | + - nodes/metrics |
| 60 | + - nodes/proxy |
| 61 | + - nodes/stats |
| 62 | + verbs: |
| 63 | + - get |
| 64 | + - watch |
| 65 | + - list |
| 66 | + - apiGroups: |
| 67 | + - storage.k8s.io |
| 68 | + resources: |
| 69 | + - storageclasses |
| 70 | + verbs: |
| 71 | + - get |
| 72 | + - watch |
| 73 | + - list |
| 74 | + - nonResourceURLs: |
| 75 | + - /metrics |
| 76 | + verbs: |
| 77 | + - get |
| 78 | + - watch |
| 79 | + - list |
| 80 | + - apiGroups: [ "coordination.k8s.io" ] |
| 81 | + resources: |
| 82 | + - leases |
| 83 | + verbs: |
| 84 | + - get |
| 85 | + - create |
| 86 | + - update |
| 87 | + - nonResourceURLs: |
| 88 | + - /healthz |
| 89 | + - /healthz/* |
| 90 | + - /livez |
| 91 | + - /livez/* |
| 92 | + - /metrics |
| 93 | + - /metrics/slis |
| 94 | + - /readyz |
| 95 | + - /readyz/* |
| 96 | + verbs: |
| 97 | + - get |
| 98 | + - apiGroups: [ "apps" ] |
| 99 | + resources: |
| 100 | + - replicasets |
| 101 | + - deployments |
| 102 | + - daemonsets |
| 103 | + - statefulsets |
| 104 | + verbs: |
| 105 | + - get |
| 106 | + - list |
| 107 | + - watch |
| 108 | + - apiGroups: [ "batch" ] |
| 109 | + resources: |
| 110 | + - jobs |
| 111 | + - cronjobs |
| 112 | + verbs: |
| 113 | + - get |
| 114 | + - list |
| 115 | + - watch |
| 116 | + - apiGroups: |
| 117 | + - "" |
| 118 | + resources: |
| 119 | + - nodes |
| 120 | + - namespaces |
| 121 | + - pods |
| 122 | + verbs: |
| 123 | + - get |
| 124 | + - watch |
| 125 | + - list |
| 126 | + - apiGroups: |
| 127 | + - apps |
| 128 | + resources: |
| 129 | + - replicasets |
| 130 | + verbs: |
| 131 | + - get |
| 132 | + - list |
| 133 | + - watch |
| 134 | + - apiGroups: |
| 135 | + - batch |
| 136 | + resources: |
| 137 | + - jobs |
| 138 | + verbs: |
| 139 | + - get |
| 140 | + - list |
| 141 | + - watch |
| 142 | +--- |
| 143 | +# Source: elastic-agent/templates/agent/cluster-role-binding.yaml |
| 144 | +apiVersion: rbac.authorization.k8s.io/v1 |
| 145 | +kind: ClusterRoleBinding |
| 146 | +metadata: |
| 147 | + name: agent-nginx-example-default |
| 148 | + labels: |
| 149 | + helm.sh/chart: elastic-agent-0.0.1 |
| 150 | + app.kubernetes.io/name: elastic-agent |
| 151 | + app.kubernetes.io/instance: example |
| 152 | + app.kubernetes.io/version: 9.0.0 |
| 153 | + app.kubernetes.io/managed-by: Helm |
| 154 | +subjects: |
| 155 | + - kind: ServiceAccount |
| 156 | + name: agent-nginx-example |
| 157 | + namespace: "default" |
| 158 | +roleRef: |
| 159 | + kind: ClusterRole |
| 160 | + name: agent-nginx-example-default |
| 161 | + apiGroup: rbac.authorization.k8s.io |
| 162 | +--- |
| 163 | +# Source: elastic-agent/templates/agent/k8s/deployment.yaml |
| 164 | +apiVersion: apps/v1 |
| 165 | +kind: Deployment |
| 166 | +metadata: |
| 167 | + name: agent-nginx-example |
| 168 | + namespace: "default" |
| 169 | + labels: |
| 170 | + helm.sh/chart: elastic-agent-0.0.1 |
| 171 | + app.kubernetes.io/name: elastic-agent |
| 172 | + app.kubernetes.io/instance: example |
| 173 | + app.kubernetes.io/version: 9.0.0 |
| 174 | + app.kubernetes.io/managed-by: Helm |
| 175 | +spec: |
| 176 | + selector: |
| 177 | + matchLabels: |
| 178 | + name: agent-nginx-example |
| 179 | + template: |
| 180 | + metadata: |
| 181 | + labels: |
| 182 | + name: agent-nginx-example |
| 183 | + annotations: |
| 184 | + checksum/config: ce25762427c9b6e207de5327b69be314f9d077db8138b7b241fd40f7b8a80aca |
| 185 | + spec: |
| 186 | + automountServiceAccountToken: true |
| 187 | + containers: |
| 188 | + - args: |
| 189 | + - -c |
| 190 | + - /etc/elastic-agent/agent.yml |
| 191 | + - -e |
| 192 | + env: |
| 193 | + - name: NODE_NAME |
| 194 | + valueFrom: |
| 195 | + fieldRef: |
| 196 | + fieldPath: spec.nodeName |
| 197 | + - name: POD_NAME |
| 198 | + valueFrom: |
| 199 | + fieldRef: |
| 200 | + fieldPath: metadata.name |
| 201 | + - name: STATE_PATH |
| 202 | + value: /usr/share/elastic-agent/state |
| 203 | + - name: FLEET_URL |
| 204 | + value: http://localhost:8220 |
| 205 | + - name: FLEET_ENROLLMENT_TOKEN |
| 206 | + value: fleetToken |
| 207 | + - name: FLEET_INSECURE |
| 208 | + value: "false" |
| 209 | + - name: FLEET_ENROLL |
| 210 | + value: "1" |
| 211 | + image: docker.elastic.co/beats/elastic-agent:9.0.0-SNAPSHOT |
| 212 | + imagePullPolicy: IfNotPresent |
| 213 | + name: agent |
| 214 | + securityContext: |
| 215 | + runAsUser: 0 |
| 216 | + volumeMounts: |
| 217 | + - mountPath: /usr/share/elastic-agent/state |
| 218 | + name: agent-data |
| 219 | + - mountPath: /etc/elastic-agent/agent.yml |
| 220 | + name: config |
| 221 | + readOnly: true |
| 222 | + subPath: agent.yml |
| 223 | + dnsPolicy: ClusterFirstWithHostNet |
| 224 | + serviceAccountName: agent-nginx-example |
| 225 | + volumes: |
| 226 | + - hostPath: |
| 227 | + path: /etc/elastic-agent/default/agent-nginx-example-managed/state |
| 228 | + type: DirectoryOrCreate |
| 229 | + name: agent-data |
| 230 | + - name: config |
| 231 | + secret: |
| 232 | + defaultMode: 292 |
| 233 | + secretName: agent-nginx-example |
0 commit comments