-
Notifications
You must be signed in to change notification settings - Fork 753
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add missing seccompProfile to comply with restricted policy (#1493)
* fix: add missing seccompProfile to comply with restricted policy Signed-off-by: hamidos <[email protected]> * Add kuttl e2e test Signed-off-by: Siddhesh Ghadi <[email protected]> * Fix kuttl test Signed-off-by: Siddhesh Ghadi <[email protected]> --------- Signed-off-by: hamidos <[email protected]> Signed-off-by: Siddhesh Ghadi <[email protected]> Co-authored-by: Siddhesh Ghadi <[email protected]>
- Loading branch information
Showing
23 changed files
with
237 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# test will fail on clusters with less than 3 nodes | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: test-1-042-restricted-pss-compliant | ||
labels: | ||
pod-security.kubernetes.io/enforce: restricted | ||
pod-security.kubernetes.io/enforce-version: latest | ||
pod-security.kubernetes.io/warn: restricted | ||
pod-security.kubernetes.io/warn-version: latest | ||
pod-security.kubernetes.io/audit: restricted | ||
pod-security.kubernetes.io/audit-version: latest | ||
--- | ||
apiVersion: argoproj.io/v1beta1 | ||
kind: ArgoCD | ||
metadata: | ||
name: argocd | ||
namespace: test-1-042-restricted-pss-compliant | ||
status: | ||
applicationController: Running | ||
applicationSetController: Running | ||
notificationsController: Running | ||
phase: Available | ||
redis: Running | ||
repo: Running | ||
server: Running | ||
sso: Running |
28 changes: 28 additions & 0 deletions
28
tests/k8s/1-042_restricted_pss_compliant/01-install-argocd-in-restricted-pss-ns copy.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# test will fail on clusters with less than 3 nodes | ||
--- | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: test-1-042-restricted-pss-compliant | ||
labels: | ||
pod-security.kubernetes.io/enforce: restricted | ||
pod-security.kubernetes.io/enforce-version: latest | ||
pod-security.kubernetes.io/warn: restricted | ||
pod-security.kubernetes.io/warn-version: latest | ||
pod-security.kubernetes.io/audit: restricted | ||
pod-security.kubernetes.io/audit-version: latest | ||
--- | ||
apiVersion: argoproj.io/v1beta1 | ||
kind: ArgoCD | ||
metadata: | ||
name: argocd | ||
namespace: test-1-042-restricted-pss-compliant | ||
spec: | ||
applicationSet: | ||
enabled: true | ||
notifications: | ||
enabled: true | ||
sso: | ||
provider: dex | ||
dex: | ||
openShiftOAuth: true |
11 changes: 11 additions & 0 deletions
11
tests/k8s/1-042_restricted_pss_compliant/02-check-pod.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestStep | ||
commands: | ||
- script: sleep 10 | ||
- script: kubectl get pods -n test-1-042-restricted-pss-compliant | grep 'argocd-application-controller' | ||
- script: kubectl get pods -n test-1-042-restricted-pss-compliant | grep 'argocd-applicationset-controller' | ||
- script: kubectl get pods -n test-1-042-restricted-pss-compliant | grep 'argocd-dex-server' | ||
- script: kubectl get pods -n test-1-042-restricted-pss-compliant | grep 'argocd-notifications-controller' | ||
- script: kubectl get pods -n test-1-042-restricted-pss-compliant | grep 'argocd-redis' | ||
- script: kubectl get pods -n test-1-042-restricted-pss-compliant | grep 'argocd-repo-server' | ||
- script: kubectl get pods -n test-1-042-restricted-pss-compliant | grep 'argocd-server' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: argoproj.io/v1beta1 | ||
kind: ArgoCD | ||
metadata: | ||
name: argocd | ||
namespace: test-1-042-restricted-pss-compliant | ||
status: | ||
applicationController: Running | ||
phase: Available | ||
redis: Running | ||
repo: Running | ||
server: Running | ||
#sso: Running # due to bug in keycloak service code, status remains as Pending | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: keycloak | ||
namespace: test-1-042-restricted-pss-compliant |
17 changes: 17 additions & 0 deletions
17
tests/k8s/1-042_restricted_pss_compliant/03-enable-keycloak-sso.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
apiVersion: argoproj.io/v1beta1 | ||
kind: ArgoCD | ||
metadata: | ||
name: argocd | ||
namespace: test-1-042-restricted-pss-compliant | ||
spec: | ||
sso: | ||
provider: keycloak | ||
keycloak: | ||
verifyTLS: false | ||
--- | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestStep | ||
commands: | ||
- script: | | ||
kubectl patch -n test-1-042-restricted-pss-compliant argocd/argocd --type='json' -p='[{"op": "remove", "path": "/spec/sso/dex"}]' | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestStep | ||
commands: | ||
- script: sleep 10 | ||
- script: kubectl get pods -n test-1-042-restricted-pss-compliant | grep 'keycloak' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
apiVersion: argoproj.io/v1beta1 | ||
kind: ArgoCD | ||
metadata: | ||
name: argocd | ||
namespace: test-1-042-restricted-pss-compliant | ||
status: | ||
applicationController: Running | ||
#phase: Available | ||
#redis: Running | ||
repo: Running | ||
server: Running | ||
--- | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: argocd-redis-ha-server | ||
namespace: test-1-042-restricted-pss-compliant | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: argocd-redis-ha-haproxy | ||
namespace: test-1-042-restricted-pss-compliant | ||
|
9 changes: 9 additions & 0 deletions
9
tests/k8s/1-042_restricted_pss_compliant/05-enable-redis-ha.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# test will fail on clusters with less than 3 nodes | ||
apiVersion: argoproj.io/v1beta1 | ||
kind: ArgoCD | ||
metadata: | ||
name: argocd | ||
namespace: test-1-042-restricted-pss-compliant | ||
spec: | ||
ha: | ||
enabled: true |
Oops, something went wrong.