Skip to content

Instantly share code, notes, and snippets.

@nomaster
Created June 10, 2022 13:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nomaster/ed264975d0ed88d482bab3eab62b478e to your computer and use it in GitHub Desktop.
Save nomaster/ed264975d0ed88d482bab3eab62b478e to your computer and use it in GitHub Desktop.
Kustomization patch for Java Application Insights Agent
---
- op: add
path: /spec/template/spec/containers/0/envFrom/-
value:
secretRef:
name: appinsights
- op: add
path: /spec/template/spec/containers/0/env/-
value:
name: JAVA_OPTIONS
value: -javaagent:/extras/applicationinsights-agent.jar
- op: add
path: /spec/template/spec/containers/0/volumeMounts
value:
- mountPath: /extras
name: extras
- op: add
path: /spec/template/spec/initContainers
value:
- name: appinsights-agent-download
image: curlimages/curl:latest
command:
- "curl"
- "-Lvo"
- "/extras/applicationinsights-agent.jar"
- "https://github.com/microsoft/ApplicationInsights-Java/releases/download/3.2.11/applicationinsights-agent-3.2.11.jar"
resources:
limits:
cpu: 100m
memory: 64Mi
volumeMounts:
- mountPath: /extras
name: extras
- op: add
path: /spec/template/spec/volumes
value:
- name: extras
emptyDir: {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment