Skip to content

Commit f5d9744

Browse files
authored
replace kubectl with the alpine version (#479)
allow overriding the kubectl image
1 parent 6e84f09 commit f5d9744

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

helm/krr-enforcer/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ name: krr-enforcer
33
description: KRR enforcer - auto apply KRR recommendations
44
type: application
55

6-
version: 0.3.1
7-
appVersion: 0.3.1
6+
version: 0.3.4
7+
appVersion: 0.3.4

helm/krr-enforcer/templates/enforcer-cert-job.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ spec:
2525
emptyDir: {}
2626
containers:
2727
- name: cert-job
28-
image: "bitnami/kubectl:1.30"
28+
image: {{ .Values.certJob.image | quote }}
2929
workingDir: /tmp/certs
3030
volumeMounts:
3131
- name: workdir
@@ -36,6 +36,12 @@ spec:
3636
- |
3737
set -e
3838
39+
{{- if .Values.certJob.installOpenssl }}
40+
# Install openssl if needed
41+
echo "Installing openssl..."
42+
apk add --no-cache openssl
43+
{{- end }}
44+
3945
# Generate a CA key and certificate
4046
echo "Generating CA certificate..."
4147
openssl genrsa -out ca.key 2048

helm/krr-enforcer/values.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
certificate: "" # base64 encoded
22
logLevel: INFO
33

4+
# Certificate job configuration
5+
certJob:
6+
image: "alpine/k8s:1.30.0" # Image with kubectl for certificate generation
7+
installOpenssl: true # Set to false if the image already includes openssl
8+
49
# fullImage: ~ # full image path can be used to override image.repository/image.name:image.tag
510

611
image:
712
repository: us-central1-docker.pkg.dev/genuine-flight-317411/devel
813
name: krr-enforcer
9-
tag: 0.3.1
14+
tag: 0.3.4
1015
imagePullPolicy: IfNotPresent
1116
resources:
1217
requests:

0 commit comments

Comments
 (0)