Skip to content

Commit

Permalink
Add specific feature-environment for hypershift testing
Browse files Browse the repository at this point in the history
  • Loading branch information
sshnaidm committed Jul 4, 2024
1 parent 0ceae3c commit c6bf453
Show file tree
Hide file tree
Showing 21 changed files with 148 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
bases:
- ../../deploy/container-mount-namespace/
5 changes: 5 additions & 0 deletions feature-configs/hypershift-ci/fec/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

bases:
- ../../deploy/fec
8 changes: 8 additions & 0 deletions feature-configs/hypershift-ci/gatekeeper/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

bases:
- ../../deploy/gatekeeper

patchesStrategicMerge:
- subscription.yaml
10 changes: 10 additions & 0 deletions feature-configs/hypershift-ci/gatekeeper/subscription.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: gatekeeper-operator-product
namespace: openshift-operators
spec:
channel: stable
name: gatekeeper-operator
source: ci-index
sourceNamespace: openshift-marketplace
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

bases:
- ../../deploy/localhost-workaround
8 changes: 8 additions & 0 deletions feature-configs/hypershift-ci/metallb/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

bases:
- ../../deploy/metallb

patchesStrategicMerge:
- operator_subscription.yaml
10 changes: 10 additions & 0 deletions feature-configs/hypershift-ci/metallb/operator_subscription.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: metallb-operator-sub
namespace: openshift-metallb-system
spec:
name: metallb-operator
channel: "alpha"
source: ci-index
sourceNamespace: openshift-marketplace
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

bases:
- ../../deploy/multinetworkpolicy
5 changes: 5 additions & 0 deletions feature-configs/hypershift-ci/n3000/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

bases:
- ../../deploy/n3000
9 changes: 9 additions & 0 deletions feature-configs/hypershift-ci/ptp/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

bases:
- ../../deploy/ptp

patchesStrategicMerge:
- subscription.yaml

11 changes: 11 additions & 0 deletions feature-configs/hypershift-ci/ptp/subscription.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: ptp-operator-subscription
namespace: openshift-ptp
spec:
channel: "alpha"
name: ptp-operator
source: ci-index
sourceNamespace: openshift-marketplace
9 changes: 9 additions & 0 deletions feature-configs/hypershift-ci/s2i/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Note: This feature request to deploy the sriov feature and the performance also in the cluster
# For example:
# FEATURES_ENVIRONMENT=demo FEATURES="performance sriov s2i" make feature-deploy

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

bases:
- ../../deploy/s2i
1 change: 1 addition & 0 deletions feature-configs/hypershift-ci/s2i/post_deploy.sh
5 changes: 5 additions & 0 deletions feature-configs/hypershift-ci/sctp/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

bases:
- ../../deploy/sctp
8 changes: 8 additions & 0 deletions feature-configs/hypershift-ci/sriov/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

bases:
- ../../deploy/sriov

patchesStrategicMerge:
- sriov-subscription.yaml
13 changes: 13 additions & 0 deletions feature-configs/hypershift-ci/sriov/sriov-subscription.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: sriov-network-operator-subscription
namespace: openshift-sriov-network-operator
spec:
channel: alpha
config:
nodeSelector:
node-role.kubernetes.io/worker: ""
name: sriov-network-operator
source: ci-index
sourceNamespace: openshift-marketplace
9 changes: 9 additions & 0 deletions feature-configs/hypershift-ci/sro/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

bases:
- ../../deploy/sro

patchesStrategicMerge:
- nfd-subscription.yaml
- sro-subscription.yaml
10 changes: 10 additions & 0 deletions feature-configs/hypershift-ci/sro/nfd-subscription.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: nfd-operator-subscription
namespace: openshift-nfd
spec:
channel: "stable"
name: nfd
source: ci-index
sourceNamespace: openshift-marketplace
10 changes: 10 additions & 0 deletions feature-configs/hypershift-ci/sro/sro-subscription.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: sro-operator-subscription
namespace: openshift-special-resource-operator
spec:
channel: "4.11"
name: openshift-special-resource-operator
source: ci-index
sourceNamespace: openshift-marketplace
1 change: 1 addition & 0 deletions hack/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export OC_TOOL="${OC_TOOL:-oc}"
export CONTAINER_MGMT_CLI="${CONTAINER_MGMT_CLI:-podman}"
export TESTS_IN_CONTAINER="${TESTS_IN_CONTAINER:-false}"

export HYPERSHIFT_ENVIRONMENT="${HYPERSHIFT_ENVIRONMENT:-false}"
# Map for the tests paths
declare -A TESTS_PATHS=\
(["configsuite nto"]="cnf-tests/submodules/cluster-node-tuning-operator/test/e2e/performanceprofile/functests/0_config"\
Expand Down
2 changes: 2 additions & 0 deletions hack/setup-test-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ do
${OC_TOOL} label --overwrite $node ptp/slave=""
done

if [ "${HYPERSHIFT_ENVIRONMENT}" == "false" ]; then
# Note: this is intended to be the only pool we apply all mcs to.
# Additional mcs must be added to this poll in the selector
cat <<EOF | ${OC_TOOL} apply -f -
Expand All @@ -67,6 +68,7 @@ spec:
node-role.kubernetes.io/${ROLE_WORKER_CNF}: ""
---
EOF
fi

# Note: Patch the openshift network operator.
# Add a dummy dhcp network to start the dhcp daemonset by the operator.
Expand Down

0 comments on commit c6bf453

Please sign in to comment.