-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add test support for k8s metrics (#249)
- Loading branch information
1 parent
ebf47ee
commit 141b6b8
Showing
29 changed files
with
658 additions
and
439 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
slow: | ||
testCaseSpecs: | ||
- host | ||
nightly: | ||
ec2: | ||
enabled: true | ||
enabled: true | ||
testCaseSpecs: | ||
- host |
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 |
---|---|---|
@@ -1,3 +1,9 @@ | ||
slow: | ||
testCaseSpecs: | ||
- k8s | ||
- host | ||
nightly: | ||
ec2: | ||
enabled: false | ||
enabled: false | ||
testCaseSpecs: | ||
- host |
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
40 changes: 40 additions & 0 deletions
40
test/charts/mocked_backend/templates/deployment-collector.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,40 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: &app nrdot-collector-deployment | ||
labels: | ||
app: *app | ||
spec: | ||
replicas: {{ .Values.image.repository | hasSuffix "k8s" | ternary 1 0 }} | ||
selector: | ||
matchLabels: | ||
app: *app | ||
template: | ||
metadata: | ||
labels: | ||
app: *app | ||
spec: | ||
serviceAccountName: read-k8s-api-account | ||
containers: | ||
- name: *app | ||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" | ||
imagePullPolicy: "{{ .Values.image.pullPolicy }}" | ||
args: ["--config", "/etc/nrdot-collector-k8s/config-deployment.yaml"] | ||
ports: | ||
- name: health | ||
containerPort: 13133 | ||
env: | ||
- name: OTEL_EXPORTER_OTLP_ENDPOINT | ||
value: "http://validation-backend:4318" | ||
# mock values | ||
# k8s distro expects this to be present | ||
- name: KUBE_NODE_NAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: spec.nodeName | ||
- name: NEW_RELIC_LICENSE_KEY | ||
value: "NR_LICENSE_KEY_PLACEHOLDER" | ||
# used to populate k8s.cluster.name | ||
- name: K8S_CLUSTER_NAME | ||
value: {{ .Values.clusterName }} |
File renamed without changes.
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
45 changes: 45 additions & 0 deletions
45
test/charts/nr_backend/templates/deployment-collector.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,45 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: &app nrdot-collector-deployment | ||
labels: | ||
app: *app | ||
spec: | ||
replicas: {{ .Values.image.repository | hasSuffix "k8s" | ternary 1 0 }} | ||
selector: | ||
matchLabels: | ||
app: *app | ||
template: | ||
metadata: | ||
labels: | ||
app: *app | ||
spec: | ||
serviceAccountName: read-k8s-api-account | ||
containers: | ||
- name: *app | ||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" | ||
imagePullPolicy: "{{ .Values.image.pullPolicy }}" | ||
args: ["--config", "/etc/nrdot-collector-k8s/config-deployment.yaml"] | ||
ports: | ||
- name: health | ||
containerPort: 13133 | ||
env: | ||
- name: KUBE_NODE_NAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: spec.nodeName | ||
- name: OTEL_EXPORTER_OTLP_ENDPOINT | ||
valueFrom: | ||
secretKeyRef: | ||
name: daemonset-secrets | ||
key: backendUrl | ||
- name: NEW_RELIC_LICENSE_KEY | ||
valueFrom: | ||
secretKeyRef: | ||
name: daemonset-secrets | ||
key: nrIngestKey | ||
# used to populate k8s.cluster.name | ||
- name: K8S_CLUSTER_NAME | ||
value: {{ .Values.clusterName }} | ||
|
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
Oops, something went wrong.