Skip to content

Commit f5c1ec0

Browse files
authored
Merge branch 'main' into oci_fallback
2 parents a5983ee + 4975d5e commit f5c1ec0

File tree

17 files changed

+47
-28
lines changed

17 files changed

+47
-28
lines changed

.github/workflows/build-test.yaml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
permissions:
1414
contents: read # for actions/checkout to fetch code
1515
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
16+
checks: write # for golangci/golangci-lint-action to annotate Pull Requests
1617
name: Lint Go code
1718
runs-on: ubuntu-latest
1819
steps:
@@ -21,9 +22,9 @@ jobs:
2122
- name: Setup Golang
2223
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.0
2324
- name: Run golangci-lint
24-
uses: golangci/golangci-lint-action@639cd343e1d3b897ff35927a75193d57cfcba299 # v3.6.0
25+
uses: golangci/golangci-lint-action@3cfe3a4abbb849e10058ce4af15d205b6da42804 # v4.0.0
2526
with:
26-
version: v1.53
27+
version: v1.54
2728
args: --timeout 10m --exclude SA5011 --verbose --issues-exit-code=0
2829
only-new-issues: true
2930

@@ -83,7 +84,18 @@ jobs:
8384
with:
8485
context: .
8586
platforms: ${{ matrix.platform }}
87+
load: true
8688
push: false
8789
tags: quay.io/jetstack/version-checker:${{github.sha}}
8890
cache-from: type=gha
8991
cache-to: type=gha,mode=max
92+
93+
- name: Run Trivy vulnerability scanner
94+
uses: aquasecurity/trivy-action@0.19.0
95+
with:
96+
image-ref: 'quay.io/jetstack/version-checker:${{github.sha}}'
97+
format: 'table'
98+
exit-code: '1'
99+
ignore-unfixed: true
100+
vuln-type: 'os,library'
101+
severity: 'CRITICAL,HIGH'

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ WORKDIR /app/
88
RUN make build
99

1010

11-
FROM alpine:3.18.3
11+
FROM alpine:3.19.1
1212
LABEL description="Kubernetes utility for exposing used image versions compared to the latest version, as metrics."
1313

1414
RUN apk --no-cache add ca-certificates

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ verify: test build ## tests and builds version-checker
2222

2323
image: ## build docker image
2424
GOARCH=$(ARCH) GOOS=linux CGO_ENABLED=0 go build -o ./bin/version-checker-linux ./cmd/.
25-
docker build -t quay.io/jetstack/version-checker:v0.5.2 .
25+
docker build -t quay.io/jetstack/version-checker:v0.5.4 .
2626

2727
clean: ## clean up created files
2828
rm -rf \

deploy/charts/version-checker/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v1
2-
appVersion: "v0.5.2"
3-
version: "v0.5.2"
2+
appVersion: "v0.5.4"
3+
version: "v0.5.4"
44
description: A Helm chart for version-checker
55
home: https://github.com/jetstack/version-checker
66
name: version-checker

deploy/charts/version-checker/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ A Helm chart for version-checker
3737
| image.tag | string | `nil` | Override the chart version |
3838
| livenessProbe | object | `{"enabled":true,"httpGet":{"path":"/readyz","port":8080},"initialDelaySeconds":3,"periodSeconds":3}` | Configure the healthcheck probe for version-checker |
3939
| livenessProbe.enabled | bool | `true` | Enable/Disable the setting of a livenessProbe |
40+
| nodeSelector | object | `{}` | Configure nodeSelector |
4041
| prometheus | object | `{"enabled":false,"replicas":1,"serviceAccountName":"prometheus"}` | Prometheus Operator |
4142
| prometheus.enabled | bool | `false` | Deploy a Prometheus-Operator Prometheus Object to collect version-checker metrics |
4243
| prometheus.serviceAccountName | string | `"prometheus"` | ServiceAccount for new Prometheus Object |
@@ -58,4 +59,4 @@ A Helm chart for version-checker
5859
| versionChecker.testAllContainers | bool | `true` | Enable/Disable the requirement for an enable.version-checker.io annotation on pods. |
5960

6061
----------------------------------------------
61-
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
62+
Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1)

deploy/charts/version-checker/templates/deployment.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,13 @@ spec:
3232
spec:
3333
serviceAccountName: {{ $chartname }}
3434
{{- with .Values.tolerations }}
35-
tolerations:
35+
tolerations:
3636
{{- toYaml . | trim | nindent 8 }}
3737
{{- end }}
38+
{{- with .Values.nodeSelector }}
39+
nodeSelector:
40+
{{- toYaml . | nindent 8 }}
41+
{{- end }}
3842
containers:
3943
- name: {{ $chartname }}
4044
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"

deploy/charts/version-checker/tests/deployment_test.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,15 @@ tests:
5959
name: CUSTOM_ENV_VAR
6060
value: CUSTOM_ENV_VALUE
6161

62+
- it: NodeSelectors Present
63+
set:
64+
nodeSelector:
65+
abc: "123"
66+
asserts:
67+
- equal:
68+
path: spec.template.spec.nodeSelector.abc
69+
value: "123"
70+
6271
# Param changes
6372
- it: imageCacheTimeout
6473
set:

deploy/charts/version-checker/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ image:
2020
# -- Configure tolerations
2121
tolerations: []
2222

23+
# -- Configure nodeSelector
24+
nodeSelector: {}
25+
2326
# -- Configure version-checkers Service
2427
service:
2528
labels: {}

deploy/yaml/deploy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ spec:
4949
spec:
5050
serviceAccountName: version-checker
5151
containers:
52-
- image: quay.io/jetstack/version-checker:v0.5.2
52+
- image: quay.io/jetstack/version-checker:v0.5.4
5353
imagePullPolicy: Always
5454
ports:
5555
- containerPort: 8080

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ require (
9696
golang.org/x/text v0.14.0 // indirect
9797
golang.org/x/time v0.3.0 // indirect
9898
google.golang.org/appengine v1.6.8 // indirect
99-
google.golang.org/protobuf v1.31.0 // indirect
99+
google.golang.org/protobuf v1.33.0 // indirect
100100
gopkg.in/evanphx/json-patch.v5 v5.7.0 // indirect
101101
gopkg.in/inf.v0 v0.9.1 // indirect
102102
gopkg.in/yaml.v2 v2.4.0 // indirect

0 commit comments

Comments
 (0)