Skip to content

Commit

Permalink
chore(pomi): update appVersion (#425)
Browse files Browse the repository at this point in the history
* chore(pomi): update appVersion

* chore(pomi): removed -3 since helm3 is now default

* chore(unit-test): the format to access dictionaries changed

* chore(tests): update minikube version

* chore(tests): change minikube driver

* chore(comment): cleaning up an old comment
  • Loading branch information
paologallinaharbur authored Jun 23, 2023
1 parent 3297ad5 commit 30d5917
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 31 deletions.
19 changes: 3 additions & 16 deletions .github/workflows/load_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,12 @@ jobs:
run: |
sudo wget -O /usr/local/bin/skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-amd64
sudo chmod +x /usr/local/bin/skaffold
# Load test uses skaffold to run `nri-prometheus` in the cluster. skaffold is not compatible with minikube when the
# clusters do not use docker as CRI giving this error:
#
# invalid skaffold config: getting minikube env: running [/home/runner/work/_temp/minikube docker-env --shell none -p minikube --user=skaffold]
# - stdout: "false exit code 14\n"
# - stderr: "X Exiting due to MK_USAGE: The docker-env command is only compatible with the \"docker\" runtime, but this cluster was configured to use the \"containerd\" runtime.\n"
# - cause: exit status 14
#
# Se we are in a dependency cycle:
# - Minikube with Kubernetes > 1.24 needs the CRI to NOT be docker
# - Skaffold needs the CRI to be docker
#
# Here we test `nri-prometheus`, Kubernetes is just a tool we use for testing, so we should not care about the version
# of Kubernetes and we should not upgrade it so the test keeps working.
- name: Setup Minikube
uses: manusa/[email protected]
with:
minikube version: v1.15.1
kubernetes version: v1.19.4
minikube version: v1.30.1
kubernetes version: v1.25.6
driver: docker
github token: ${{ secrets.GITHUB_TOKEN }}

- name: Run load tests
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/push_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
helm plugin install https://github.com/helm-unittest/helm-unittest
for chart in $(ct --config .github/ct.yaml list-changed); do
if [ -d "$chart/tests/" ]; then
helm unittest -3 $chart
helm unittest $chart
else
echo "No unit tests found for $chart"
fi
Expand All @@ -51,7 +51,8 @@ jobs:
uses: manusa/[email protected]
if: steps.list-changed.outputs.changed == 'true'
with:
minikube version: v1.29.0
minikube version: v1.30.1
driver: docker
kubernetes version: ${{ matrix.kubernetes-version }}
github token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-go@v4
Expand Down
4 changes: 2 additions & 2 deletions charts/nri-prometheus/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ sources:
- https://github.com/newrelic/nri-prometheus
- https://github.com/newrelic/nri-prometheus/tree/main/charts/nri-prometheus

version: 2.1.16
appVersion: 2.18.0
version: 2.1.17
appVersion: 2.18.4

dependencies:
- name: common-library
Expand Down
6 changes: 3 additions & 3 deletions charts/nri-prometheus/tests/configmap_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ tests:
cluster: my-cluster-name
asserts:
- equal:
path: data.config\.yaml
path: data["config.yaml"]
value: |-
cluster_name: my-cluster-name
audit: false
Expand All @@ -28,7 +28,7 @@ tests:
lowDataMode: true
asserts:
- equal:
path: data.config\.yaml
path: data["config.yaml"]
value: |-
cluster_name: my-cluster-name
audit: false
Expand Down Expand Up @@ -61,7 +61,7 @@ tests:
container_name: containerName
asserts:
- equal:
path: data.config\.yaml
path: data["config.yaml"]
value: |-
cluster_name: my-cluster-name
audit: false
Expand Down
6 changes: 3 additions & 3 deletions charts/nri-prometheus/tests/deployment_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ tests:
cluster: test
asserts:
- equal:
path: spec.template.metadata.labels.[app.kubernetes.io/instance]
path: spec.template.metadata.labels["app.kubernetes.io/instance"]
value: release
template: templates/deployment.yaml
- equal:
path: spec.template.metadata.labels.[app.kubernetes.io/name]
path: spec.template.metadata.labels["app.kubernetes.io/name"]
value: nri-prometheus
template: templates/deployment.yaml
- equal:
Expand All @@ -26,7 +26,7 @@ tests:
app.kubernetes.io/name: nri-prometheus
template: templates/deployment.yaml
- isNotEmpty:
path: spec.template.metadata.annotations.[checksum/config]
path: spec.template.metadata.annotations["checksum/config"]
template: templates/deployment.yaml

- it: adds METRIC_API_URL when nrStaging is true.
Expand Down
10 changes: 5 additions & 5 deletions charts/nri-prometheus/tests/labels_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ tests:
cluster: test
asserts:
- equal:
path: metadata.labels.[app.kubernetes.io/instance]
path: metadata.labels["app.kubernetes.io/instance"]
value: release
- equal:
path: metadata.labels.[app.kubernetes.io/managed-by]
path: metadata.labels["app.kubernetes.io/managed-by"]
value: Helm
- equal:
path: metadata.labels.[app.kubernetes.io/name]
path: metadata.labels["app.kubernetes.io/name"]
value: nri-prometheus
- isNotEmpty:
path: metadata.labels.[app.kubernetes.io/version]
path: metadata.labels["app.kubernetes.io/version"]
- isNotEmpty:
path: metadata.labels.[helm.sh/chart]
path: metadata.labels["helm.sh/chart"]

0 comments on commit 30d5917

Please sign in to comment.