-
Notifications
You must be signed in to change notification settings - Fork 486
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add kubectl.kubernetes.io/default-container annotation to grafana-age…
…nt pod template (#6146)
- Loading branch information
Showing
33 changed files
with
332 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
operations/helm/charts/grafana-agent/ci/pod_annotations-values.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Test correct rendering of the pod annotations | ||
controller: | ||
podAnnotations: | ||
testAnnotationKey: testAnnotationValue |
7 changes: 4 additions & 3 deletions
7
operations/helm/charts/grafana-agent/templates/controllers/_pod.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
operations/helm/tests/pod_annotations/grafana-agent/templates/configmap.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
# Source: grafana-agent/templates/configmap.yaml | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: grafana-agent | ||
labels: | ||
helm.sh/chart: grafana-agent | ||
app.kubernetes.io/name: grafana-agent | ||
app.kubernetes.io/instance: grafana-agent | ||
app.kubernetes.io/version: "vX.Y.Z" | ||
app.kubernetes.io/managed-by: Helm | ||
data: | ||
config.river: |- | ||
logging { | ||
level = "info" | ||
format = "logfmt" | ||
} | ||
discovery.kubernetes "pods" { | ||
role = "pod" | ||
} | ||
discovery.kubernetes "nodes" { | ||
role = "node" | ||
} | ||
discovery.kubernetes "services" { | ||
role = "service" | ||
} | ||
discovery.kubernetes "endpoints" { | ||
role = "endpoints" | ||
} | ||
discovery.kubernetes "endpointslices" { | ||
role = "endpointslice" | ||
} | ||
discovery.kubernetes "ingresses" { | ||
role = "ingress" | ||
} |
76 changes: 76 additions & 0 deletions
76
operations/helm/tests/pod_annotations/grafana-agent/templates/controllers/daemonset.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
--- | ||
# Source: grafana-agent/templates/controllers/daemonset.yaml | ||
apiVersion: apps/v1 | ||
kind: DaemonSet | ||
metadata: | ||
name: grafana-agent | ||
labels: | ||
helm.sh/chart: grafana-agent | ||
app.kubernetes.io/name: grafana-agent | ||
app.kubernetes.io/instance: grafana-agent | ||
app.kubernetes.io/version: "vX.Y.Z" | ||
app.kubernetes.io/managed-by: Helm | ||
spec: | ||
minReadySeconds: 10 | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: grafana-agent | ||
app.kubernetes.io/instance: grafana-agent | ||
template: | ||
metadata: | ||
annotations: | ||
kubectl.kubernetes.io/default-container: grafana-agent | ||
testAnnotationKey: testAnnotationValue | ||
labels: | ||
app.kubernetes.io/name: grafana-agent | ||
app.kubernetes.io/instance: grafana-agent | ||
spec: | ||
serviceAccountName: grafana-agent | ||
containers: | ||
- name: grafana-agent | ||
image: docker.io/grafana/agent:v0.39.0 | ||
imagePullPolicy: IfNotPresent | ||
args: | ||
- run | ||
- /etc/agent/config.river | ||
- --storage.path=/tmp/agent | ||
- --server.http.listen-addr=0.0.0.0:80 | ||
- --server.http.ui-path-prefix=/ | ||
env: | ||
- name: AGENT_MODE | ||
value: flow | ||
- name: AGENT_DEPLOY_MODE | ||
value: "helm" | ||
- name: HOSTNAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: spec.nodeName | ||
ports: | ||
- containerPort: 80 | ||
name: http-metrics | ||
readinessProbe: | ||
httpGet: | ||
path: /-/ready | ||
port: 80 | ||
initialDelaySeconds: 10 | ||
timeoutSeconds: 1 | ||
volumeMounts: | ||
- name: config | ||
mountPath: /etc/agent | ||
- name: config-reloader | ||
image: ghcr.io/jimmidyson/configmap-reload:v0.12.0 | ||
args: | ||
- --volume-dir=/etc/agent | ||
- --webhook-url=http://localhost:80/-/reload | ||
volumeMounts: | ||
- name: config | ||
mountPath: /etc/agent | ||
resources: | ||
requests: | ||
cpu: 1m | ||
memory: 5Mi | ||
dnsPolicy: ClusterFirst | ||
volumes: | ||
- name: config | ||
configMap: | ||
name: grafana-agent |
Oops, something went wrong.