Skip to content

Commit

Permalink
Kubectl image fix (#209)
Browse files Browse the repository at this point in the history
* set kubectl image with cve fixes

* revert kubectl changes

* revert kubectl changes

* revert kubectl changes

* updated all relative paths of sh in kubectl image
  • Loading branch information
pns-nirmata authored Dec 30, 2023
1 parent aab1c8e commit 28334c7
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion charts/nirmata/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
type: application
name: kyverno
version: 3.0.14
version: 3.0.15
appVersion: v1.10.6-n4k.nirmata.3
icon: https://github.com/kyverno/kyverno/raw/main/img/logo.png
description: Kubernetes Native Policy Management
Expand Down
10 changes: 5 additions & 5 deletions charts/nirmata/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ The chart values are organised per component.
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| webhooksCleanup.enabled | bool | `true` | Create a helm pre-delete hook to cleanup webhooks. |
| webhooksCleanup.image | string | `"bitnami/kubectl:latest"` | `kubectl` image to run commands for deleting webhooks. |
| webhooksCleanup.image | string | `"ghcr.io/nirmata/kubectl:1.28.5"` | `kubectl` image to run commands for deleting webhooks. |
| webhooksCleanup.imagePullSecrets | list | `[]` | Image pull secrets |
| webhooksCleanup.nodeAffinity | object | `{}` | Node affinity constraints. |
| webhooksCleanup.nodeSelector | object | `{}` | Node labels for pod assignment |
Expand Down Expand Up @@ -706,8 +706,8 @@ The chart values are organised per component.
| cleanupJobs.admissionReports.history | object | `{"failure":1,"success":1}` | Cronjob history |
| cleanupJobs.admissionReports.image.pullPolicy | string | `nil` | Image pull policy Defaults to image.pullPolicy if omitted |
| cleanupJobs.admissionReports.image.registry | string | `nil` | Image registry |
| cleanupJobs.admissionReports.image.repository | string | `"bitnami/kubectl"` | Image repository |
| cleanupJobs.admissionReports.image.tag | string | `"1.26.4"` | Image tag Defaults to `latest` if omitted |
| cleanupJobs.admissionReports.image.repository | string | `"ghcr.io/nirmata/kubectl"` | Image repository |
| cleanupJobs.admissionReports.image.tag | string | `"1.28.5"` | Image tag Defaults to `latest` if omitted |
| cleanupJobs.admissionReports.imagePullSecrets | list | `[]` | Image pull secrets |
| cleanupJobs.admissionReports.nodeAffinity | object | `{}` | Node affinity constraints. |
| cleanupJobs.admissionReports.nodeSelector | object | `{}` | Node labels for pod assignment |
Expand All @@ -725,8 +725,8 @@ The chart values are organised per component.
| cleanupJobs.clusterAdmissionReports.history | object | `{"failure":1,"success":1}` | Cronjob history |
| cleanupJobs.clusterAdmissionReports.image.pullPolicy | string | `nil` | Image pull policy Defaults to image.pullPolicy if omitted |
| cleanupJobs.clusterAdmissionReports.image.registry | string | `nil` | Image registry |
| cleanupJobs.clusterAdmissionReports.image.repository | string | `"bitnami/kubectl"` | Image repository |
| cleanupJobs.clusterAdmissionReports.image.tag | string | `"1.26.4"` | Image tag Defaults to `latest` if omitted |
| cleanupJobs.clusterAdmissionReports.image.repository | string | `"ghcr.io/nirmata/kubectl"` | Image repository |
| cleanupJobs.clusterAdmissionReports.image.tag | string | `"1.28.5"` | Image tag Defaults to `latest` if omitted |
| cleanupJobs.clusterAdmissionReports.imagePullSecrets | list | `[]` | Image pull secrets |
| cleanupJobs.clusterAdmissionReports.nodeAffinity | object | `{}` | Node affinity constraints. |
| cleanupJobs.clusterAdmissionReports.nodeSelector | object | `{}` | Node labels for pod assignment |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ spec:
image: {{ (include "kyverno.image" .Values.cleanupJobs.admissionReports) | quote }}
imagePullPolicy: {{ .Values.cleanupJobs.admissionReports.image.pullPolicy }}
command:
- /bin/sh
- sh
- -c
- |
COUNT=$(kubectl get admissionreports.kyverno.io -A | wc -l)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ spec:
image: {{ (include "kyverno.image" .Values.cleanupJobs.clusterAdmissionReports) | quote }}
imagePullPolicy: {{ .Values.cleanupJobs.clusterAdmissionReports.image.pullPolicy }}
command:
- /bin/sh
- sh
- -c
- |
COUNT=$(kubectl get clusteradmissionreports.kyverno.io -A | wc -l)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
command:
- /bin/sh
- sh
- -c
- sleep 20 ; wget -O- -S --no-check-certificate https://{{ template "kyverno.admission-controller.serviceName" . }}.{{ template "kyverno.namespace" . }}:{{ .Values.admissionController.service.port }}/health/liveness
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
command:
- /bin/sh
- sh
- -c
- sleep 20 ; wget -O- -S --no-check-certificate http://{{ template "kyverno.admission-controller.serviceName" . }}-metrics.{{ template "kyverno.namespace" . }}:{{ .Values.admissionController.metricsService.port }}/metrics
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
command:
- /bin/sh
- sh
- -c
- sleep 20 ; wget -O- -S --no-check-certificate https://{{ template "kyverno.admission-controller.serviceName" . }}.{{ template "kyverno.namespace" . }}:{{ .Values.admissionController.service.port }}/health/readiness
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
command:
- /bin/sh
- sh
- -c
- sleep 20 ; wget -O- -S --no-check-certificate https://{{ template "kyverno.cleanup-controller.name" . }}.{{ template "kyverno.namespace" . }}:{{ .Values.cleanupController.service.port }}/health/liveness
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
command:
- /bin/sh
- sh
- -c
- sleep 20 ; wget -O- -S --no-check-certificate http://{{ template "kyverno.cleanup-controller.name" . }}-metrics.{{ template "kyverno.namespace" . }}:{{ .Values.cleanupController.metricsService.port }}/metrics
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
command:
- /bin/sh
- sh
- -c
- sleep 20 ; wget -O- -S --no-check-certificate https://{{ template "kyverno.cleanup-controller.name" . }}.{{ template "kyverno.namespace" . }}:{{ .Values.cleanupController.service.port }}/health/readiness
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
command:
- /bin/sh
- sh
- -c
- sleep 20 ; wget -O- -S --no-check-certificate http://{{ template "kyverno.reports-controller.name" . }}-metrics.{{ template "kyverno.namespace" . }}:{{ .Values.reportsController.metricsService.port }}/metrics
{{- end -}}
10 changes: 5 additions & 5 deletions charts/nirmata/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ webhooksCleanup:
# -- Create a helm pre-delete hook to cleanup webhooks.
enabled: true
# -- `kubectl` image to run commands for deleting webhooks.
image: bitnami/kubectl:latest
image: ghcr.io/nirmata/kubectl:1.28.5
# -- Image pull secrets
imagePullSecrets: []

Expand Down Expand Up @@ -433,10 +433,10 @@ cleanupJobs:
# -- (string) Image registry
registry: ~
# -- Image repository
repository: bitnami/kubectl
repository: ghcr.io/nirmata/kubectl
# -- Image tag
# Defaults to `latest` if omitted
tag: '1.26.4'
tag: '1.28.5'
# -- (string) Image pull policy
# Defaults to image.pullPolicy if omitted
pullPolicy: ~
Expand Down Expand Up @@ -504,10 +504,10 @@ cleanupJobs:
# -- (string) Image registry
registry: ~
# -- Image repository
repository: bitnami/kubectl
repository: ghcr.io/nirmata/kubectl
# -- Image tag
# Defaults to `latest` if omitted
tag: '1.26.4'
tag: '1.28.5'
# -- (string) Image pull policy
# Defaults to image.pullPolicy if omitted
pullPolicy: ~
Expand Down

0 comments on commit 28334c7

Please sign in to comment.