Skip to content

Commit 75e0952

Browse files
Add ci
1 parent 4106431 commit 75e0952

File tree

6 files changed

+12
-6
lines changed

6 files changed

+12
-6
lines changed

.ci/tests/integration/cases/functionmesh-with-generic-resources/manifests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: compute.functionmesh.io/v1alpha1
22
kind: FunctionMesh
33
metadata:
4-
name: functionmesh-generic-resources-sample
4+
name: functionmesh-generic-sample
55
spec:
66
genericResources:
77
- apiVersion: "compute.functionmesh.io/v1alpha1"

.ci/tests/integration/cases/functionmesh-with-generic-resources/verify.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,21 +36,21 @@ manifests_file="${BASE_DIR}"/.ci/tests/integration/cases/functionmesh-with-gener
3636

3737
kubectl apply -f "${manifests_file}" > /dev/null 2>&1
3838

39-
verify_fm_result=$(ci::verify_function_mesh functionmesh-generic-resources-sample-java-function 2>&1)
39+
verify_fm_result=$(ci::verify_function_mesh functionmesh-generic-sample-java-function 2>&1)
4040
if [ $? -ne 0 ]; then
4141
echo "$verify_fm_result"
4242
kubectl delete -f "${manifests_file}" > /dev/null 2>&1 || true
4343
exit 1
4444
fi
4545

46-
verify_fm_result=$(ci::verify_function_mesh functionmesh-generic-resources-sample-golang-function 2>&1)
46+
verify_fm_result=$(ci::verify_function_mesh functionmesh-generic-sample-golang-function 2>&1)
4747
if [ $? -ne 0 ]; then
4848
echo "$verify_fm_result"
4949
kubectl delete -f "${manifests_file}" > /dev/null 2>&1 || true
5050
exit 1
5151
fi
5252

53-
verify_fm_result=$(ci::verify_function_mesh functionmesh-generic-resources-sample-python-function 2>&1)
53+
verify_fm_result=$(ci::verify_function_mesh functionmesh-generic-sample-python-function 2>&1)
5454
if [ $? -ne 0 ]; then
5555
echo "$verify_fm_result"
5656
kubectl delete -f "${manifests_file}" > /dev/null 2>&1 || true

.ci/tests/integration/e2e_with_tls.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,3 +131,5 @@ verify:
131131
expected: expected.data.yaml
132132
- query: timeout 5m bash .ci/tests/integration/cases/global-and-namespaced-config/verify.sh
133133
expected: expected.data.yaml
134+
- query: timeout 5m bash .ci/tests/integration/cases/functionmesh-generic-resources/verify.sh
135+
expected: expected.data.yaml

controllers/function_mesh.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ func (r *FunctionMeshReconciler) observeGenericResources(ctx context.Context, me
251251
condition, ok := mesh.Status.GenericResourceConditions[resource.Name]
252252
if !ok {
253253
mesh.Status.GenericResourceConditions[resource.Name] = v1alpha1.ResourceCondition{
254-
Condition: v1alpha1.SinkReady,
254+
Condition: v1alpha1.GenericResourceReady,
255255
Status: metav1.ConditionFalse,
256256
Action: v1alpha1.Create,
257257
ApiVersion: resource.APIVersion,

controllers/functionmesh_controller.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ func (r *FunctionMeshReconciler) Reconcile(ctx context.Context, req ctrl.Request
7272
if mesh.Status.SinkConditions == nil {
7373
mesh.Status.SinkConditions = make(map[string]v1alpha1.ResourceCondition)
7474
}
75+
if mesh.Status.GenericResourceConditions == nil {
76+
mesh.Status.GenericResourceConditions = make(map[string]v1alpha1.ResourceCondition)
77+
}
7578
if mesh.Status.Condition == nil {
7679
mesh.Status.Condition = &v1alpha1.ResourceCondition{}
7780
}

controllers/spec/common.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ import (
3939
autoscalingv2beta2 "k8s.io/api/autoscaling/v2beta2"
4040
v1 "k8s.io/api/batch/v1"
4141
corev1 "k8s.io/api/core/v1"
42+
"k8s.io/apimachinery/pkg/api/equality"
4243
k8serrors "k8s.io/apimachinery/pkg/api/errors"
4344
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
4445
"k8s.io/apimachinery/pkg/types"
@@ -2058,7 +2059,7 @@ func CheckIfStatefulSetSpecIsEqual(spec *appsv1.StatefulSetSpec, desiredSpec *ap
20582059
container.ImagePullPolicy != desiredContainer.ImagePullPolicy ||
20592060
!reflect.DeepEqual(ports, desiredPorts) ||
20602061
!reflect.DeepEqual(containerEnvFrom, desiredContainerEnvFrom) ||
2061-
!reflect.DeepEqual(container.Resources, desiredContainer.Resources) {
2062+
!equality.Semantic.DeepEqual(container.Resources, desiredContainer.Resources) {
20622063
return false
20632064
}
20642065

0 commit comments

Comments
 (0)