Skip to content

feat: image fixes and ci #953

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

Merged
merged 17 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
44 changes: 44 additions & 0 deletions .github/workflows/lint-images.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Lint images

on: push

jobs:
lint-images:
name: Lint images
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Check that global.imageRegistry is applied to all images
run: bash ./image_registry_check.sh
working-directory: ./scripts

- name: Check that global.imagePullSecrets are applied to all images
run: bash ./image_pull_secrets_check.sh
working-directory: ./scripts

- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Install Docker Scout
run: |
curl -fsSL https://raw.githubusercontent.com/docker/scout-cli/main/install.sh | sh

- name: Check to make sure that images do not have critical CVEs
run: bash ./image_cve_check.sh
working-directory: ./scripts
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,6 @@ Chart.lock
**/charts/*.tgz

.monokle

# Scripts output
scripts/*.txt
10 changes: 5 additions & 5 deletions charts/testkube-api/templates/_job-container-template.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -286,12 +286,12 @@ spec:
{{`{{- if .ServiceAccountName }}`}}
serviceAccountName: {{`{{ .ServiceAccountName }}`}}
{{`{{- end }}`}}
{{`{{- if gt (len .ImagePullSecrets) 0 }}`}}
{{ with .Values.global.imagePullSecrets }}
imagePullSecrets:
{{`{{- range $secret := .ImagePullSecrets }}`}}
- name: {{`{{ $secret -}}`}}
{{`{{- end }}`}}
{{`{{- end }}`}}
{{- range . }}
- name: {{ . | quote }}
{{- end }}
{{- end }}
backoffLimit: 0
ttlSecondsAfterFinished: {{`{{ .DelaySeconds }}`}}
{{- end }}
10 changes: 5 additions & 5 deletions charts/testkube-api/templates/_job-scraper-template.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,12 @@ spec:
{{`{{- if .ServiceAccountName }}`}}
serviceAccountName: {{`{{ .ServiceAccountName }}`}}
{{`{{- end }}`}}
{{`{{- if gt (len .ImagePullSecrets) 0 }}`}}
{{ with .Values.global.imagePullSecrets }}
imagePullSecrets:
{{`{{- range $secret := .ImagePullSecrets }}`}}
- name: {{`{{ $secret -}}`}}
{{`{{- end }}`}}
{{`{{- end }}`}}
{{- range . }}
- name: {{ . | quote }}
{{- end }}
{{- end }}
backoffLimit: 0
ttlSecondsAfterFinished: {{`{{ .DelaySeconds }}`}}
{{- end }}
10 changes: 5 additions & 5 deletions charts/testkube-api/templates/_job-template.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -235,12 +235,12 @@ spec:
{{`{{- if .ServiceAccountName }}`}}
serviceAccountName: {{`{{ .ServiceAccountName }}`}}
{{`{{- end }}`}}
{{`{{- if gt (len .ImagePullSecrets) 0 }}`}}
{{ with .Values.global.imagePullSecrets }}
imagePullSecrets:
{{`{{- range $secret := .ImagePullSecrets }}`}}
- name: {{`{{ $secret -}}`}}
{{`{{- end }}`}}
{{`{{- end }}`}}
{{- range . }}
- name: {{ . | quote }}
{{- end }}
{{- end }}
backoffLimit: 0
ttlSecondsAfterFinished: 180
{{- end }}
10 changes: 5 additions & 5 deletions charts/testkube-api/templates/_slave-pod-template.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,10 @@ spec:
{{`{{- if .ServiceAccountName }}`}}
serviceAccountName: {{`{{ .ServiceAccountName }}`}}
{{`{{- end }}`}}
{{`{{- if gt (len .ImagePullSecrets) 0 }}`}}
{{ with .Values.global.imagePullSecrets }}
imagePullSecrets:
{{`{{- range $secret := .ImagePullSecrets }}`}}
- name: {{`{{ $secret -}}`}}
{{`{{- end }}`}}
{{`{{- end }}`}}
{{- range . }}
- name: {{ . | quote }}
{{- end }}
{{- end }}
{{- end }}
4 changes: 2 additions & 2 deletions charts/testkube/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ dependencies:
repository: https://charts.bitnami.com/bitnami
- name: nats
condition: testkube-api.nats.enabled
version: 1.1.7
repository: https://nats-io.github.io/k8s/helm/charts/
version: 1.2.6-1
repository: "file://./charts/nats"
- name: testkube-api
version: 2.1.56
#repository: https://kubeshop.github.io/helm-charts
Expand Down
26 changes: 26 additions & 0 deletions charts/testkube/charts/nats/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/

# template tests
/test
15 changes: 15 additions & 0 deletions charts/testkube/charts/nats/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v2
appVersion: 2.10.22
description: A Helm chart for the NATS.io High Speed Cloud Native Distributed Communications Technology.
name: nats
keywords:
- nats
- messaging
- cncf
version: 1.2.6-1
home: http://github.com/nats-io/k8s
maintainers:
- email: [email protected]
name: The NATS Authors
url: https://github.com/nats-io
icon: https://nats.io/img/nats-icon-color.png
Loading
Loading