Added patch to configure spo image repository and image tag to pick the correct version while appying the application

Test Plan:
PASS: Build for package stx-security-profiles-operator-helm
PASS: AIO-SX app upload/apply -- image getting pulled and pods are in running state
PASS: AIO-SX creation of apparmor profiles
PASS: AIO-DX app upload/apply/remove -- image getting pulled and pods are in running state
PASS: AIO-DX creation of apparmor profiles
PASS: Patch of spo image in iso. Verified that the package is copied to "/usr/local/share/applications/helm/" after installation.

Story: 2010310
Task: 47043

Signed-off-by: Rahul Roshan Kachchap <rahulroshan.kachchap@windriver.com>
Change-Id: I307163248c5f36b91ed085946b34f1a08c03feae
This commit is contained in:
Rahul Roshan Kachchap 2022-12-20 11:18:54 -05:00
parent b9884b4276
commit fcbf1e9e37
6 changed files with 78 additions and 20 deletions

View File

@ -33,6 +33,8 @@ override_dh_auto_build:
cd fluxcd/helm-charts/ && patch --no-backup-if-mismatch --fuzz=0 -p1 < ../../files/0001-remove-namespace-creation.patch
cd fluxcd/helm-charts/ && patch --no-backup-if-mismatch --fuzz=0 -p1 < ../../files/0002-add-images.patch
cd fluxcd/helm-charts/ && patch --no-backup-if-mismatch --fuzz=0 -p1 < ../../files/0003-config-apparmor.patch
cd fluxcd/helm-charts/ && patch --no-backup-if-mismatch --fuzz=0 -p1 < ../../files/0004-config-spo-image.patch
cd fluxcd/helm-charts/ && patch --no-backup-if-mismatch --fuzz=0 -p1 < ../../files/0005-add-image-pull-secrets.patch
cd fluxcd/helm-charts/ && cp ../../files/config.yaml templates/config.yaml
# create a tgz file

View File

@ -9,20 +9,20 @@ templates/static-resources.yaml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/values.yaml b/values.yaml
index f80a78b..4159d91 100644
index f80a78b3..33162a0f 100644
--- a/values.yaml
+++ b/values.yaml
@@ -13,6 +13,10 @@ serviceAccount:
# If not set and create is true, a name is generated using the fullname template
name: ""
+Images:
+ # image
+ security-profiles-operator: gcr.io/k8s-staging-sp-operator/security-profiles-operator:latest
@@ -1,6 +1,11 @@
# Default values for security-profiles-operator.
replicaCount: 3
+
podAnnotations: {}
podSecurityContext: {}
+image:
+ repository: registry.k8s.io/security-profiles-operator/security-profiles-operator
+ tag: v0.6.0
+
nameOverride: ""
fullnameOverride: ""
--
2.25.1

View File

@ -4,18 +4,24 @@ Subject: [PATCH] config-apparmor
Signed-off-by: Rahul Roshan Kachchap <rahulroshan.kachchap@windriver.com>
---
values.yaml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/values.yaml b/values.yaml
index f80a78b3..49942e33 100644
--- a/values.yaml
+++ b/values.yaml
@@ -1,6 +1,10 @@
# Default values for security-profiles-operator.
replicaCount: 3
@@ -4,6 +4,10 @@ replicaCount: 3
nameOverride: ""
fullnameOverride: ""
+enableSelinux: false
+enableLogEnricher: false
+enableAppArmor: true
+
nameOverride: ""
fullnameOverride: ""
serviceAccount:
# Specifies whether a service account should be created
create: true
--
2.25.1

View File

@ -0,0 +1,25 @@
From: Rahul Roshan Kachchap <rahulroshan.kachchap@windriver.com>
Date: Mon, 19 Dev 2022 03:55:02 -0500
Subject: [PATCH] config-spo-image
Signed-off-by: Rahul Roshan Kachchap <rahulroshan.kachchap@windriver.com>
---
templates/deployment.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/templates/deployment.yaml b/templates/deployment.yaml
index 2a9b7fb3..38d9a84c 100644
--- a/templates/deployment.yaml
+++ b/templates/deployment.yaml
@@ -34,7 +34,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- image: gcr.io/k8s-staging-sp-operator/security-profiles-operator:latest
+ image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
imagePullPolicy: Always
name: {{ .Chart.Name }}
resources:
--
2.25.1

View File

@ -0,0 +1,25 @@
From: Rahul Roshan Kachchap <rahulroshan.kachchap@windriver.com>
Date: Mon, 19 Dev 2022 03:55:02 -0500
Subject: [PATCH] config-spo-image
Signed-off-by: Rahul Roshan Kachchap <rahulroshan.kachchap@windriver.com>
---
templates/deployment.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/templates/deployment.yaml b/templates/deployment.yaml
index 0f86aa95..3a4868cf 100644
--- a/templates/deployment.yaml
+++ b/templates/deployment.yaml
@@ -22,6 +22,8 @@ spec:
app: security-profiles-operator
name: security-profiles-operator
spec:
+ imagePullSecrets:
+ - name: default-registry-key
containers:
- args:
- manager
--
2.25.1

View File

@ -5,5 +5,5 @@
#
image:
repository: gcr.io/k8s-staging-sp-operator/security-profiles-operator
tag: latest
repository: registry.k8s.io/security-profiles-operator/security-profiles-operator
tag: v0.6.0