diff --git a/go.mod b/go.mod index 918f2505e..e271eef78 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ toolchain go1.22.5 require ( github.com/argoproj-labs/argo-rollouts-manager v0.0.6-0.20250212035559-38faac6d4127 - github.com/argoproj-labs/argocd-operator v0.13.0-rc1.0.20250219054436-548f278bff7e + github.com/argoproj-labs/argocd-operator v0.13.0-rc1.0.20250220070432-0ffa69ea6872 github.com/coreos/prometheus-operator v0.40.0 github.com/go-logr/logr v1.4.2 github.com/google/go-cmp v0.6.0 diff --git a/go.sum b/go.sum index 2c47f0b3e..def2c4d4d 100644 --- a/go.sum +++ b/go.sum @@ -622,8 +622,8 @@ github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb github.com/apache/thrift v0.16.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU= github.com/argoproj-labs/argo-rollouts-manager v0.0.6-0.20250212035559-38faac6d4127 h1:chOb5NQfFybnoDHwdkjhC2Y9YgsSjNxgXIKLEGBgWho= github.com/argoproj-labs/argo-rollouts-manager v0.0.6-0.20250212035559-38faac6d4127/go.mod h1:hX18xfJcnomx/k6urvDp/7+Zwa/y5aF1Mlhz5a2en4k= -github.com/argoproj-labs/argocd-operator v0.13.0-rc1.0.20250219054436-548f278bff7e h1:55snlduYkXFPAeYpXjJS52kvXLnEsfSOB+XaUe0Ga+Y= -github.com/argoproj-labs/argocd-operator v0.13.0-rc1.0.20250219054436-548f278bff7e/go.mod h1:FoPi0HK2noC0QQn/T5UTtD3/845yHhpdd0I6rrsW+2U= +github.com/argoproj-labs/argocd-operator v0.13.0-rc1.0.20250220070432-0ffa69ea6872 h1:SpoL21jH0/6mMWgz1pA4pZ+J4Og0PjYXEJIZP1jFyr8= +github.com/argoproj-labs/argocd-operator v0.13.0-rc1.0.20250220070432-0ffa69ea6872/go.mod h1:FoPi0HK2noC0QQn/T5UTtD3/845yHhpdd0I6rrsW+2U= github.com/argoproj/argo-cd/v2 v2.12.3 h1:Bi4QahHTnKl3esU5MplQP1wraGhaTpvgAV4GsMqc3Zc= github.com/argoproj/argo-cd/v2 v2.12.3/go.mod h1:2fh6q4NX/cylbH6Ktx/KjJsX7sOBwF3jbGnO0IZyNOc= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= diff --git a/test/openshift/e2e/ignore-tests/parallel/1-064_validate_security_contexts/01-assert.yaml b/test/openshift/e2e/ignore-tests/parallel/1-064_validate_security_contexts/01-assert.yaml index 7ebdb2596..9d21a7003 100644 --- a/test/openshift/e2e/ignore-tests/parallel/1-064_validate_security_contexts/01-assert.yaml +++ b/test/openshift/e2e/ignore-tests/parallel/1-064_validate_security_contexts/01-assert.yaml @@ -62,7 +62,8 @@ spec: allowPrivilegeEscalation: false # readOnlyRootFilesystem: true runAsNonRoot: true - runAsUser: 999 + # random runAsUser in openshift + #runAsUser: 999 --- apiVersion: apps/v1 kind: Deployment diff --git a/test/openshift/e2e/parallel/1-064_validate_security_contexts/01-assert.yaml b/test/openshift/e2e/parallel/1-064_validate_security_contexts/01-assert.yaml index 7ebdb2596..9d21a7003 100644 --- a/test/openshift/e2e/parallel/1-064_validate_security_contexts/01-assert.yaml +++ b/test/openshift/e2e/parallel/1-064_validate_security_contexts/01-assert.yaml @@ -62,7 +62,8 @@ spec: allowPrivilegeEscalation: false # readOnlyRootFilesystem: true runAsNonRoot: true - runAsUser: 999 + # random runAsUser in openshift + #runAsUser: 999 --- apiVersion: apps/v1 kind: Deployment diff --git a/test/openshift/e2e/sequential/1-107_validate_redis_ssc/01-assert.yaml b/test/openshift/e2e/sequential/1-107_validate_redis_ssc/01-assert.yaml new file mode 100644 index 000000000..6a6b1bf07 --- /dev/null +++ b/test/openshift/e2e/sequential/1-107_validate_redis_ssc/01-assert.yaml @@ -0,0 +1,15 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 300 +--- +apiVersion: argoproj.io/v1alpha1 +kind: ArgoCD +metadata: + name: argocd + labels: + example: basic +spec: + ha: + enabled: true +status: + redis: Running \ No newline at end of file diff --git a/test/openshift/e2e/sequential/1-107_validate_redis_ssc/01-install.yaml b/test/openshift/e2e/sequential/1-107_validate_redis_ssc/01-install.yaml new file mode 100644 index 000000000..87951fc0f --- /dev/null +++ b/test/openshift/e2e/sequential/1-107_validate_redis_ssc/01-install.yaml @@ -0,0 +1,9 @@ +apiVersion: argoproj.io/v1alpha1 +kind: ArgoCD +metadata: + name: argocd + labels: + example: basic +spec: + ha: + enabled: true \ No newline at end of file diff --git a/test/openshift/e2e/sequential/1-107_validate_redis_ssc/02-check-ha-redis-server-ssc.yaml b/test/openshift/e2e/sequential/1-107_validate_redis_ssc/02-check-ha-redis-server-ssc.yaml new file mode 100644 index 000000000..b0025b995 --- /dev/null +++ b/test/openshift/e2e/sequential/1-107_validate_redis_ssc/02-check-ha-redis-server-ssc.yaml @@ -0,0 +1,14 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: +- script: | + pod_name=$(oc get pod -l app.kubernetes.io/name=argocd-redis-ha -n $NAMESPACE -o jsonpath="{.items[0].metadata.name}") + actual_scc=$(oc get pod $pod_name -n $NAMESPACE -o jsonpath="{.metadata.annotations.openshift\.io/scc}") + expected_scc="restricted-v2" + + if [[ "$actual_scc" != "$expected_scc" ]]; then + echo "SCC check failed: Expected '$expected_scc' but got '$actual_scc'" + exit 1 + else + echo "SCC check passed: '$actual_scc'" + fi \ No newline at end of file diff --git a/test/openshift/e2e/sequential/1-107_validate_redis_ssc/03-check-ha-proxy-ssc.yaml b/test/openshift/e2e/sequential/1-107_validate_redis_ssc/03-check-ha-proxy-ssc.yaml new file mode 100644 index 000000000..fb2540bf6 --- /dev/null +++ b/test/openshift/e2e/sequential/1-107_validate_redis_ssc/03-check-ha-proxy-ssc.yaml @@ -0,0 +1,14 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: +- script: | + pod_name=$(oc get pod -l app.kubernetes.io/name=argocd-redis-ha-haproxy -n $NAMESPACE -o jsonpath="{.items[0].metadata.name}") + actual_scc=$(oc get pod $pod_name -n $NAMESPACE -o jsonpath="{.metadata.annotations.openshift\.io/scc}") + expected_scc="restricted-v2" + + if [[ "$actual_scc" != "$expected_scc" ]]; then + echo "SCC check failed: Expected '$expected_scc' but got '$actual_scc'" + exit 1 + else + echo "SCC check passed: '$actual_scc'" + fi \ No newline at end of file