-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #206 from fabiobrz/feat.k8s-take5
PoC for Kubernetes provisioning support (via OLM)
- Loading branch information
Showing
256 changed files
with
6,747 additions
and
3,262 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: Kubernetes E2E Tests | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
paths-ignore: | ||
- 'docs/**' | ||
- 'ide-config/**' | ||
- '**.md' | ||
|
||
concurrency: | ||
# Only run once for latest commit per ref and cancel other (previous) runs. | ||
group: ci-e2e-intersmash-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
minikube: | ||
name: K8S | ||
runs-on: ubuntu-latest | ||
if: github.repository == 'Intersmash/intersmash' | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
kubernetes: [v1.31.0] #, v1.30.0] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Start minikube | ||
uses: medyagh/setup-minikube@latest | ||
with: | ||
kubernetes-version: ${{ matrix.kubernetes }} | ||
- name: Install operator-sdk | ||
run: | | ||
set -x | ||
# | ||
# operator-sdk must be installed manually on K8s | ||
# | ||
export ARCH=$(case $(uname -m) in x86_64) echo -n amd64 ;; aarch64) echo -n arm64 ;; *) echo -n $(uname -m) ;; esac) | ||
export OS=$(uname | awk '{print tolower($0)}') | ||
export OPERATOR_SDK_DL_URL=https://github.com/operator-framework/operator-sdk/releases/download/v1.37.0 | ||
curl -LO ${OPERATOR_SDK_DL_URL}/operator-sdk_${OS}_${ARCH} | ||
chmod +x operator-sdk_${OS}_${ARCH} && sudo mv operator-sdk_${OS}_${ARCH} /usr/local/bin/operator-sdk | ||
operator-sdk olm install | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
cache: 'maven' | ||
- name: Install and Run Integration Tests | ||
run: | | ||
set -x | ||
# | ||
mkdir local-repo | ||
# pre-fetch dependencies | ||
mvn clean install -pl kubernetes-client,core,provisioners,testsuite,testsuite/deployments,testsuite/deployments/deployments-provider -am --batch-mode -Dmaven.repo.local=./local-repo -DskipTests | ||
# run K8s integration tests | ||
mvn test -e --batch-mode -fae -Dmaven.repo.local=./local-repo -pl testsuite/integration-tests -Pts.k8s \ | ||
-Dintersmash.kubernetes.url=https://$(minikube ip):8443 \ | ||
-Dintersmash.kubernetes.route_domain=$(minikube ip) \ | ||
-Dintersmash.kubernetes.hostname=$(minikube ip) \ | ||
-Dintersmash.kubernetes.namespace=test-k8s-1 \ | ||
-Dintersmash.olm.operators.catalog_source=operatorhubio-catalog \ | ||
-Dintersmash.olm.operators.namespace=olm \ | ||
-Dintersmash.hyperfoil.operators.catalog_source=operatorhubio-catalog | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
if: failure() | ||
with: | ||
name: logs-${{ matrix.kubernetes }} | ||
path: | | ||
**/log/* | ||
**/target/surefire-reports/* |
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 |
---|---|---|
|
@@ -12,16 +12,17 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Set up Maven | ||
uses: stCarolas/[email protected] | ||
with: | ||
maven-version: 3.8.7 | ||
- uses: actions/checkout@v3 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
cache: 'maven' | ||
- name: Build with Maven | ||
run: mvn -version ; mvn clean install -U -B -DskipTests ; mvn test -pl testsuite/deployments/deployments-provider,core,provisioners -am | ||
run: mvn -version ; mvn clean install -U -B -DskipTests ; mvn test -B -pl testsuite/deployments/deployments-provider,kubernetes-client,core,provisioners -am |
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
27 changes: 27 additions & 0 deletions
27
core/src/main/java/org/jboss/intersmash/application/openshift/KubernetesApplication.java
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 @@ | ||
/** | ||
* Copyright (C) 2023 Red Hat, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.jboss.intersmash.application.k8s; | ||
|
||
import org.jboss.intersmash.application.Application; | ||
|
||
/** | ||
* Interface representing the Application on Kubernetes. | ||
* | ||
* This interface is not supposed to be implemented by user Applications. See the "Mapping of implemented provisioners" | ||
* section of Intersmash README.md file for the up-to-date list of supported end users Applications. | ||
*/ | ||
public interface KubernetesApplication extends Application { | ||
} |
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
Oops, something went wrong.