Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test: Adding e2e tests, test README, and pipeline infra for tests #695

Merged
merged 84 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
5266613
first test
gracewehner Nov 16, 2023
b758a5d
test build
gracewehner Nov 27, 2023
3da7a25
add build
gracewehner Nov 27, 2023
4e42b15
test variable
gracewehner Nov 27, 2023
279519c
trivy ignore
gracewehner Nov 27, 2023
8190b93
update when cg runs
gracewehner Nov 27, 2023
def9b23
trivy runs
gracewehner Nov 27, 2023
79c15a6
add to ignore directories
gracewehner Nov 27, 2023
d56c15e
add to skip to all steps but linux
gracewehner Nov 28, 2023
11f5756
change sourcescanpath
gracewehner Nov 28, 2023
c2be307
override cg settings
gracewehner Nov 28, 2023
2311265
fix syntax
gracewehner Nov 28, 2023
cf06279
fix more syntax
gracewehner Nov 28, 2023
3170bde
remove fail on alert
gracewehner Nov 28, 2023
f3d1eb5
add in full test examples
gracewehner Nov 28, 2023
4afd1b0
get in cluster config
gracewehner Nov 28, 2023
e035634
run test
gracewehner Nov 28, 2023
a6ac42b
more logging
gracewehner Nov 28, 2023
7130d24
move testkube version
gracewehner Nov 28, 2023
d381d90
display output
gracewehner Nov 28, 2023
e5a78af
try echo again
gracewehner Nov 28, 2023
3ef0648
fixes
gracewehner Nov 28, 2023
319ea11
get kubectl access
gracewehner Nov 28, 2023
3302948
add in test results
gracewehner Nov 28, 2023
e1a058a
cleanup
gracewehner Nov 29, 2023
405c4be
commit readme changes
gracewehner Nov 29, 2023
9fd7d17
remove e2e task
gracewehner Dec 4, 2023
f31d94d
fix commenting
gracewehner Dec 4, 2023
c79e309
cleanup
gracewehner Dec 12, 2023
f46c74b
Merge branch 'main' into grace/testkube
gracewehner Dec 12, 2023
0463d1e
cleanup
gracewehner Dec 12, 2023
9287444
readme changes
gracewehner Dec 13, 2023
7169ba3
updates
gracewehner Dec 13, 2023
6a510ac
add constant for log lines to exclude in container log error checks
gracewehner Jan 12, 2024
052699e
fix constants
gracewehner Jan 12, 2024
b4957d9
actually fix var
gracewehner Jan 12, 2024
baca9ee
fix bugs, add test for node-exporter
gracewehner Jan 29, 2024
d19a820
fix syntax
gracewehner Jan 29, 2024
7fd5cd6
add one more arc error to ignore
gracewehner Jan 29, 2024
6bf8166
update readme with filtering instructions, up liveness wait time
gracewehner Jan 29, 2024
969801d
increase wait time
gracewehner Jan 30, 2024
7e8e33c
revert wait time
gracewehner Jan 30, 2024
1f7d06a
prom ui and query functions
gracewehner Feb 12, 2024
dba0708
check in go mod tidy
gracewehner Feb 13, 2024
3695d74
add more to readme
gracewehner Feb 13, 2024
00b82cb
add to readme
gracewehner Feb 15, 2024
887e154
add features for github PRs
gracewehner Feb 23, 2024
b0a1a09
add yamls for CI/CD clusters
gracewehner Feb 23, 2024
d7c22e5
update readme
gracewehner Feb 23, 2024
0510dbc
test comments and cleanup
gracewehner Feb 23, 2024
4190d8b
cleanup, refactor, add to readme
gracewehner Feb 27, 2024
aa62c3b
print statements
gracewehner Feb 28, 2024
f07f505
extra print statements
gracewehner Feb 28, 2024
06faae5
log request values
gracewehner Feb 28, 2024
aca3bc0
query fix and error handling for it
gracewehner Feb 28, 2024
96ebe5d
Merge branch 'main' into grace/testkube
gracewehner Feb 28, 2024
05f8b12
Merge remote-tracking branch 'origin/main' into grace/testkube
gracewehner Feb 28, 2024
10c30a4
pipeline to run tests sequentially for commits
gracewehner Feb 29, 2024
0af5d1d
convert indentation to spaces
gracewehner Feb 29, 2024
9814f1f
final changes
gracewehner Mar 4, 2024
6d291f6
add telegraf CVE for trivy
gracewehner Mar 4, 2024
5e8f742
PR feedback
gracewehner Mar 5, 2024
6a48d84
fix pipeline error
gracewehner Mar 5, 2024
11a96a8
Windows tests for container status (#776)
bragi92 Mar 13, 2024
5ec1387
Test: add in operator test examples, refactor liveness probe test for…
gracewehner Mar 19, 2024
d9b372e
go mod tidy tests
gracewehner Mar 19, 2024
b456456
fix operator package
gracewehner Mar 19, 2024
ee69355
one more go mod fix
gracewehner Mar 19, 2024
b3b4b7b
go.mod ginkgo version fix for operator tests
gracewehner Mar 20, 2024
a84385b
fix go.sum
gracewehner Mar 20, 2024
057ab2f
upgrade dependencies
gracewehner Mar 20, 2024
e6f8b05
remove the unecessary utils
gracewehner Mar 21, 2024
31d71fc
add back in utils
gracewehner Mar 21, 2024
420a06b
Test: update go mod for operator tests (#799)
gracewehner Mar 22, 2024
ac32cb3
Add nightly vs merge test suite and the ARM template for ci/cd clusters
gracewehner Mar 27, 2024
a6533dd
Query tests (#802)
bragi92 Mar 28, 2024
4c9af4e
2 more tests and merge from main (#808)
gracewehner Apr 1, 2024
ffe7557
Merge remote-tracking branch 'origin/main' into grace/testkube
gracewehner Apr 1, 2024
37dfa49
Merge branch 'main' into grace/testkube
gracewehner Apr 9, 2024
17612e7
fix syntax
gracewehner Apr 9, 2024
fd7bedf
fix indents from merge
gracewehner Apr 9, 2024
e810bbb
fix parenthesis
gracewehner Apr 9, 2024
07e178f
fix merge changes
gracewehner Apr 11, 2024
55bdd8a
Merge branch 'main' into grace/testkube
gracewehner Apr 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@

[comment]: # (Note that your PR title should follow the conventional commit format: https://conventionalcommits.org/en/v1.0.0/#summary)
# PR Description

[comment]: # (The below checklist is for PRs adding new features. If a box is not checked, add a reason why it's not needed.)
# New Feature Checklist

- [ ] List telemetry added about the feature.
- [ ] Link to the one-pager about the feature.
- [ ] List any tasks necessary for release (3P docs, AKS RP chart changes, etc.) after merging the PR.
- [ ] Attach results of scale and perf testing.

[comment]: # (The below checklist is for code changes. Not all boxes necessarily need to be checked. Build, doc, and template changes do not need to fill out the checklist.)
# Tests Checklist

- [ ] Have end-to-end Ginkgo tests been run on your cluster and passed? To bootstrap your cluster to run the tests, follow [these instructions](/otelcollector/test/README.md#bootstrap-a-dev-cluster-to-run-ginkgo-tests).
- Labels used when running the tests on your cluster:
- [ ] `operator`
- [ ] `windows`
- [ ] `arm64`
- [ ] `arc-extension`
- [ ] Have new tests been added? For features, have tests been added for this feature? For fixes, is there a test that could have caught this issue and could validate that the fix works?
- [ ] Is a new scrape job needed?
- [ ] The scrape job was added to the folder [test-cluster-yamls](/otelcollector/test/test-cluster-yamls/) in the correct configmap or as a CR.
- [ ] Was a new test label added?
- [ ] A string constant for the label was added to [constants.go](/otelcollector/test/utils/constants.go).
- [ ] The label and description was added to the [test README](/otelcollector/test/README.md).
- [ ] The label was added to this [PR checklist](/.github/pull_request_template).
- [ ] The label was added as needed to [testkube-test-crs.yaml](/otelcollector/test/testkube/testkube-test-crs.yaml).
- [ ] Are additional API server permissions needed for the new tests?
- [ ] These permissions have been added to [api-server-permissions.yaml](/otelcollector/test/testkube/api-server-permissions.yaml).
- [ ] Was a new test suite (a new folder under `/tests`) added?
- [ ] The new test suite is included in [testkube-test-crs.yaml](/otelcollector/test/testkube/testkube-test-crs.yaml).
2,485 changes: 1,283 additions & 1,202 deletions .pipelines/azure-pipeline-build.yml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions internal/docs/BUILDANDRELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ Each merge into `main` will push the image to the public mcr and deploy to the d

## Release Process
- **PR 1**: Bump the version in the VERSION file following semantic versioning.
- Add the latest `addon-token-adapter-linux` and `addon-token-adapter-windows` versions in the values-template.yaml file by checking the version [here](https://msazure.visualstudio.com/CloudNativeCompute/_git/aks-rp?path=%2Fccp%2Fcharts%2Fkube-control-plane%2Ftemplates%2F_images.tpl&_a=contents&version=GBmaster).
- If you know your PR with the last feature changes will be the last one before the release, you can do this then.
- **Build 1**: The `values.yaml` and `Chart.yaml` templates for the HELM chart will automatically be replaced with the image tag and the HELM chart version during the CI/CD build.
- **Release**: Create a release in [ADO](https://github-private.visualstudio.com/azure/_release?_a=releases&view=mine&definitionId=79).
Expand Down
2 changes: 1 addition & 1 deletion internal/docs/UpgradeDependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Updating KSM and NE charts
2. Update the Version and Appversion in all the yaml files for both 1p and addon charts from the example PR above.
3. Update both the images in our pipeline build file : azure-pipeline-build.yml
4. Before creating a pull request in the main repository for both KSM and NE, make sure to run the "build and push dependent helm chart pipeline". You can find the pipeline [here](https://github.com/Azure/prometheus-collector/actions/workflows/build-and-push-dependent-helm-charts.yml).
5. The current service principal responsible for controlling the Azure Container Registry (ACR) pull and push on the containerinsightsprod registry can be accessed [here](https://ms.portal.azure.com/#view/Microsoft_AAD_RegisteredApps/ApplicationMenuBlade/~/Credentials/appId/c58817c2-f216-4308-bb6c-126e0d82b824). If necessary, you can renew the password for the service principal from that page. The current password's expiry date is 7/26/2024.
5. The current service principal responsible for controlling the Azure Container Registry (ACR) pull and push on the containerinsightsprod registry can be accessed [here](https://ms.portal.azure.com/#view/Microsoft_AAD_RegisteredApps/ApplicationMenuBlade/~/Credentials/appId/c58817c2-f216-4308-bb6c-126e0d82b824). If necessary, you can renew the password for the service principal from that page. The current password's expiry date is 3/13/2024.
6. If you renew the password, remember to update the following two secrets in the [GitHub Actions settings](https://github.com/Azure/prometheus-collector/settings/secrets/actions):
a. MANAGED_PROM_SERVICE_PRINCIPAL_OBJECT_ID (This will likely remain the same unless you create a new service principal).
b. MANAGED_PROM_SERVICE_PRINCIPAL_PASSWORD
Expand Down
2 changes: 2 additions & 0 deletions internal/referenceapp/prometheus-mtls-ref-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ spec:
ports:
- containerPort: 2112
protocol: TCP
name: "weather-app"
- containerPort: 2113
protocol: TCP
name: "untyped-metrics"
nodeSelector:
kubernetes.io/os: linux
architecture: amd64
Expand Down
5 changes: 4 additions & 1 deletion internal/referenceapp/prometheus-reference-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,19 @@ spec:
ports:
- containerPort: 2112
protocol: TCP
name: "weather-app"
- containerPort: 2113
protocol: TCP
name: "untyped-metrics"
- name: prometheus-reference-app-python
image: mcr.microsoft.com/azuremonitor/containerinsights/cidev/prometheus-collector/images:6.7.5-main-09-12-2023-8fbde9ca-ref-app-python
ports:
- containerPort: 2114
protocol: TCP
name: "python-client"
nodeSelector:
kubernetes.io/os: linux
architecture: amd64
kubernetes.io/arch: amd64
---
apiVersion: v1
kind: Service
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
apiVersion: v1
kind: Namespace
metadata:
name: monitoring
labels:
name: monitoring
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
Expand Down Expand Up @@ -25,7 +32,7 @@ spec:
command: ["powershell"]
args: ["New-NetFirewallRule", "-DisplayName", "'windows-exporter'", "-Direction", "inbound", "-Profile", "Any", "-Action", "Allow", "-LocalPort", "9182", "-Protocol", "TCP"]
containers:
- args:
- args:
- --config.file=%CONTAINER_SANDBOX_MOUNT_POINT%/config.yml
name: windows-exporter
image: ghcr.io/prometheus-community/windows-exporter:latest
Expand Down
Loading
Loading