Skip to content

Commit

Permalink
test ocp 4.9 compatibility (#5)
Browse files Browse the repository at this point in the history
* test ocp 4.9 compatibility

* Use rancher to test k8s versions

* Tested versions
  • Loading branch information
carlosthe19916 authored Jul 8, 2024
1 parent 1078f0f commit 1c9bb5d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 14 deletions.
14 changes: 3 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
kubernetes_version: [ v1.25.3, v1.26.3, v1.27.5, v1.28.1 ]
kubernetes_version: [ v1.23.17-k3s1, v1.24.17-k3s1, v1.25.16-k3s4, v1.26.15-k3s1, v1.27.15-k3s2, v1.28.11-k3s2 ]
fail-fast: false
steps:
- uses: actions/checkout@v3
Expand All @@ -25,16 +25,8 @@ jobs:
distribution: 'temurin'
java-version: '17'
cache: 'maven'
- name: Setup Minikube-Kubernetes
# check version in https://github.com/manusa/actions-setup-minikube/releases
uses: manusa/[email protected]
with:
# check version in https://github.com/kubernetes/minikube/releases
minikube version: 'v1.32.0'
start args: '--addons=ingress'
kubernetes version: ${{ matrix.kubernetes_version }}
github token: ${{ secrets.GITHUB_TOKEN }}
driver: 'docker'
- name: Test
env:
KUBERNETES_VERSION: ${{ matrix.kubernetes_version }}
run: |
mvn verify
2 changes: 1 addition & 1 deletion bundle.Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ source "$HOME/.sdkman/bin/sdkman-init.sh" && \
sdk install java && \
sdk install groovy && \
groovy scripts/enrichCSV.groovy /code/target/bundle/trustify-operator/manifests/trustify-operator.clusterserviceversion.yaml && \
echo ' com.redhat.openshift.versions: "v4.9"' >> /code/target/bundle/trustify-operator/metadata/annotations.yaml
echo ' com.redhat.openshift.versions: "v4.10"' >> /code/target/bundle/trustify-operator/metadata/annotations.yaml

FROM scratch
# Core bundle labels.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/trustify/operator/TrustiCSVMetadata.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
}]
"""
),
minKubeVersion = "1.16.0"
minKubeVersion = "1.23.0"
)
public class TrustiCSVMetadata implements SharedCSVMetadata {
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
import org.testcontainers.utility.DockerImageName;

import java.util.Map;
import java.util.Optional;

public class K3sResource implements QuarkusTestResourceLifecycleManager {
static K3sContainer k3sContainer = new K3sContainer(DockerImageName.parse("rancher/k3s:latest"));
static K3sContainer k3sContainer = new K3sContainer(DockerImageName.parse("rancher/k3s:" + Optional.ofNullable(System.getenv("KUBERNETES_VERSION")).orElse("latest")));

@Override
public Map<String, String> start() {
Expand Down

0 comments on commit 1c9bb5d

Please sign in to comment.