File tree 7 files changed +39
-37
lines changed
7 files changed +39
-37
lines changed Original file line number Diff line number Diff line change @@ -6,8 +6,11 @@ resources:
6
6
- ../rbac
7
7
- ../manager
8
8
9
- commonLabels :
10
- app.kubernetes.io/part-of : trustyai
9
+ labels :
10
+ - pairs :
11
+ app.kubernetes.io/part-of : trustyai
12
+ includeSelectors : true
13
+ includeTemplates : true
11
14
12
15
configMapGenerator :
13
16
- env : params.env
@@ -19,32 +22,17 @@ configurations:
19
22
generatorOptions :
20
23
disableNameSuffixHash : true
21
24
22
- vars :
23
- - name : trustyaiServiceImage
24
- objref :
25
+ replacements :
26
+ # Operator image replacement
27
+ - source :
25
28
kind : ConfigMap
26
29
name : config
27
- apiVersion : v1
28
- fieldref :
29
- fieldpath : data.trustyaiServiceImage
30
- - name : trustyaiOperatorImage
31
- objref :
32
- kind : ConfigMap
33
- name : config
34
- apiVersion : v1
35
- fieldref :
36
- fieldpath : data.trustyaiOperatorImage
37
- - name : oauthProxyImage
38
- objref :
39
- kind : ConfigMap
40
- name : config
41
- apiVersion : v1
42
- fieldref :
43
- fieldpath : data.oauthProxyImage
44
- - name : kServeServerless
45
- objref :
46
- kind : ConfigMap
47
- name : config
48
- apiVersion : v1
49
- fieldref :
50
- fieldpath : data.kServeServerless
30
+ version : v1
31
+ fieldPath : data.trustyaiOperatorImage
32
+ targets :
33
+ - select :
34
+ group : apps
35
+ kind : Deployment
36
+ name : controller-manager
37
+ fieldPaths :
38
+ - spec.template.spec.containers.0.image
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ resources:
4
4
- bases/trustyai.opendatahub.io_guardrailsorchestrators.yaml
5
5
# +kubebuilder:scaffold:crdkustomizeresource
6
6
7
- patchesStrategicMerge : []
7
+ patches : []
8
8
# +kubebuilder:scaffold:crdkustomizewebhookpatch
9
9
# +kubebuilder:scaffold:crdkustomizecainjectionpatch
10
10
Original file line number Diff line number Diff line change 34
34
- --leader-elect
35
35
- --enable-services
36
36
- " TAS,LMES,GORCH"
37
- image : $(trustyaiOperatorImage)
37
+ image : " quay.io/trustyai/trustyai-service-operator:latest "
38
38
name : manager
39
39
securityContext :
40
40
runAsNonRoot : true
Original file line number Diff line number Diff line change @@ -4,5 +4,5 @@ kind: Kustomization
4
4
resources :
5
5
- ../../base
6
6
7
- patchesStrategicMerge :
8
- - lmes-only-patch.yaml
7
+ patches :
8
+ - path : lmes-only-patch.yaml
Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ kind: Kustomization
4
4
resources :
5
5
- ../../base
6
6
7
- patchesStrategicMerge :
8
- - patch.yaml
7
+ patches :
8
+ - path : patch.yaml
9
9
10
10
configMapGenerator :
11
11
- env : params.env
Original file line number Diff line number Diff line change 1
1
resources :
2
2
- ../../base
3
3
4
- patchesStrategicMerge :
5
- - image-pull-policy.yaml
4
+ patches :
5
+ - path : image-pull-policy.yaml
Original file line number Diff line number Diff line change @@ -10,6 +10,10 @@ CRD_PATH="./tests/smoke/manifests/trustyai-cr.yaml"
10
10
PVC_NAME=" trustyai-service-pvc"
11
11
SERVICE_NAME_1=" trustyai-service"
12
12
SERVICE_NAME_2=" trustyai-service-tls"
13
+ DEPLOYMENT_NAME=" trustyai-service-operator"
14
+
15
+ EXPECTED_IMAGE=" smoke/operator:pr-${{ github.event.pull_request.number || env.PR_NUMBER } }"
16
+
13
17
14
18
log_success () {
15
19
local message=$1
@@ -56,6 +60,16 @@ check_resource service "$SERVICE_NAME_2" "$NAMESPACE"
56
60
# Check for the PVC creation
57
61
check_resource pvc " $PVC_NAME " " $NAMESPACE "
58
62
63
+ # Check for correct Operator image assignment
64
+ OPERATOR_IMAGE=$( kubectl get deployment " ${DEPLOYMENT_NAME} " -n system \
65
+ -o jsonpath=' {.spec.template.spec.containers[0].image}' )
66
+
67
+ if [[ " ${OPERATOR_IMAGE} " == " ${EXPECTED_IMAGE} " ]]; then
68
+ log_success " Operator image is correct: ${OPERATOR_IMAGE} "
69
+ else
70
+ log_failure " Operator image mismatch! Expected ${EXPECTED_IMAGE} , got ${OPERATOR_IMAGE} "
71
+ fi
72
+
59
73
kubectl delete namespace " $NAMESPACE "
60
74
61
75
sleep 10
You can’t perform that action at this time.
0 commit comments