Skip to content

Commit

Permalink
Merge branch 'main' into issue-5795
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelMorrisEst authored Oct 31, 2024
2 parents 1519683 + 129c3e6 commit 292c6c8
Show file tree
Hide file tree
Showing 518 changed files with 17,519 additions and 28,595 deletions.
96 changes: 96 additions & 0 deletions .github/workflows/e2e-crc-okd-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
#
# Copyright (C) 2015 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.
#

name: E2E CRC-OKD Tests

on:
workflow_dispatch:
pull_request:
paths:
- .github/workflows/e2e-crc-okd-tests.yml
schedule:
- cron: '0 4 * * *' # Every day at 4am

concurrency:
group: single-instance-for-crc-okd-cluster
cancel-in-progress: true

env:
IT_MODULE: kubernetes-itests
MAVEN_ARGS: -B -C -V -ntp -Dhttp.keepAlive=false -e
SHELL: /bin/bash

jobs:
e2e:
name: CRC ${{ matrix.crc }} / OKD ${{ matrix.okd }}
runs-on: ubuntu-24.04
if: github.repository == 'fabric8io/kubernetes-client'
strategy:
fail-fast: false
matrix:
# There is some problem with latest version of crc configured with okd preset. I
# wasn't able to run tests successfully on latest version of crc. See linked issue:
# https://github.com/crc-org/crc/issues/4382
# TODO: Update CRC version to latest when aforementioned issue gets resolved
# https://github.com/fabric8io/kubernetes-client/issues/6415
okd: [ v4.14.0 ]
crc: [ 2.32.0 ]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Java 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
- name: Install required virtualization software
run: |
sudo apt-get update
sudo apt install qemu-kvm libvirt-daemon libvirt-daemon-system
# This package may not be present depending on Ubuntu version
sudo apt install virtiofsd || true
sudo adduser $USER libvirt
sudo adduser $USER kvm
sudo usermod -a -G libvirt $USER
- name: Remove unwanted stuff to free up disk image
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf /opt/hostedtoolcache/CodeQL
sudo docker image prune --all --force
sudo swapoff -a
sudo rm -f /mnt/swapfile
- name: Download CRC
run: |
wget https://developers.redhat.com/content-gateway/file/pub/openshift-v4/clients/crc/${{ matrix.crc }}/crc-linux-amd64.tar.xz
tar -xJf crc-linux-amd64.tar.xz
sudo cp crc-linux-${{ matrix.crc }}-amd64/crc /usr/local/bin/crc
- name: Set the crc config
run: |
crc config set preset okd
crc config set network-mode user
- name: Setup CRC
run: sudo -su $USER crc setup
- name: Start CRC
run: sudo -su $USER crc start
- name: Install Kubernetes Client
run: make quickly
- name: Install and Run Integration Tests
run: ./mvnw ${MAVEN_ARGS} -Pitests -pl $IT_MODULE verify
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ openapi-generate-java-classes:
cd kubernetes-model-generator && mvn $(MAVEN_ARGS) -Pgenerate clean install
# TODO: run generate from extensions module root once all extensions are migrated
cd extensions && mvn $(MAVEN_ARGS) -N clean install
cd extensions/istio && mvn $(MAVEN_ARGS) -N clean install
cd extensions/istio/model && mvn $(MAVEN_ARGS) -Pgenerate clean install
cd extensions/knative && mvn $(MAVEN_ARGS) -N clean install
cd extensions/knative/model && mvn $(MAVEN_ARGS) -Pgenerate clean install
cd extensions/tekton && mvn $(MAVEN_ARGS) -N clean install
Expand Down
18 changes: 18 additions & 0 deletions doc/MIGRATION-v7.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- [Removed deprecated types for network.openshift.io (OpenShift-SDN-only)](#openshift-network-removed)
- [Renamed clusterautoscaling to autoscaling](#openshift-clusterautoscaling-to-autoscaling)
- [Renamed machineconfig to machineconfiguration](#openshift-machineconfig-to-machineconfiguration)
- [Istio Extension](#istio-extension)
- [Tekton Extension](#tekton-extension)
- [Vertical Pod Autoscaler Extension](#vertical-pod-autoscaler-extension)
- [MockWebServer is based on Vert.x](#mockwebserver-vertx)
Expand Down Expand Up @@ -108,6 +109,23 @@ The package has also been renamed from `io.fabric8.openshift.api.model.machineco

The OpenShiftClient DSL entry-point remains the same: `OpenShiftClient.machineConfigurations()`.

### Istio Extension <a href="#istio-extension" id="istio-extension"/>

All the model modules for the Istio extension have been merged into a single module `io.fabric8:istio-model`.
You will be able to find the packages from `io:fabric8:istio-model-v1alpha3` and `io:fabric8:istio-model-v1beta1` in the new module artifact.

Many of the classes have also been moved to a nested `api` package following the Go types structure.
The following packages are now available:
- `io.fabric8.istio.api.api.meta.v1alpha1`
- `io.fabric8.istio.api.api.type.v1beta1`
- `io.fabric8.istio.api.api.analysis.v1alpha1`
- `io.fabric8.istio.api.api.extensions.v1alpha1`
- `io.fabric8.istio.api.api.networking.v1alpha3`
- `io.fabric8.istio.api.api.networking.v1beta1`
- `io.fabric8.istio.api.api.security.v1alpha1`
- `io.fabric8.istio.api.api.security.v1beta1`
- `io.fabric8.istio.api.api.telemetry.v1alpha1`

### Tekton Extension <a href="#tekton-extension" id="tekton-extension"/>

All the model modules for the Tekton extension have been merged into a single module `io.fabric8:tekton-model`.
Expand Down
25 changes: 1 addition & 24 deletions extensions/istio/client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,9 @@
</properties>

<dependencies>
<dependency>
<groupId>io.sundr</groupId>
<artifactId>builder-annotations</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.sundr</groupId>
<artifactId>transform-annotations</artifactId>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>istio-model-v1alpha3</artifactId>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>istio-model-v1beta1</artifactId>
<artifactId>istio-model</artifactId>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
Expand All @@ -78,16 +65,6 @@
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-client-api</artifactId>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@
*/
package io.fabric8.istio.api.examples.v1beta1;

import io.fabric8.istio.api.security.v1beta1.AuthorizationPolicyAction;
import io.fabric8.istio.api.api.security.v1beta1.AuthorizationPolicyAction;
import io.fabric8.istio.api.api.security.v1beta1.ConditionBuilder;
import io.fabric8.istio.api.api.security.v1beta1.OperationBuilder;
import io.fabric8.istio.api.api.security.v1beta1.RuleBuilder;
import io.fabric8.istio.api.api.security.v1beta1.RuleFromBuilder;
import io.fabric8.istio.api.api.security.v1beta1.RuleToBuilder;
import io.fabric8.istio.api.api.security.v1beta1.SourceBuilder;
import io.fabric8.istio.api.api.type.v1beta1.WorkloadSelectorBuilder;
import io.fabric8.istio.api.security.v1beta1.AuthorizationPolicyBuilder;
import io.fabric8.istio.api.security.v1beta1.AuthorizationPolicyList;
import io.fabric8.istio.api.security.v1beta1.ConditionBuilder;
import io.fabric8.istio.api.security.v1beta1.OperationBuilder;
import io.fabric8.istio.api.security.v1beta1.RuleBuilder;
import io.fabric8.istio.api.security.v1beta1.RuleFromBuilder;
import io.fabric8.istio.api.security.v1beta1.RuleToBuilder;
import io.fabric8.istio.api.security.v1beta1.SourceBuilder;
import io.fabric8.istio.api.type.v1beta1.WorkloadSelectorBuilder;
import io.fabric8.istio.client.IstioClient;
import io.fabric8.kubernetes.client.KubernetesClientException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
*/
package io.fabric8.istio.api.examples.v1beta1;

import io.fabric8.istio.api.api.networking.v1alpha3.LoadBalancerSettingsBuilder;
import io.fabric8.istio.api.api.networking.v1alpha3.LoadBalancerSettingsSimple;
import io.fabric8.istio.api.api.networking.v1alpha3.LoadBalancerSettingsSimpleLB;
import io.fabric8.istio.api.networking.v1beta1.DestinationRuleBuilder;
import io.fabric8.istio.api.networking.v1beta1.DestinationRuleList;
import io.fabric8.istio.api.networking.v1beta1.LoadBalancerSettingsBuilder;
import io.fabric8.istio.api.networking.v1beta1.LoadBalancerSettingsSimple;
import io.fabric8.istio.api.networking.v1beta1.LoadBalancerSettingsSimpleLB;
import io.fabric8.istio.client.IstioClient;
import io.fabric8.kubernetes.client.KubernetesClientException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
*/
package io.fabric8.istio.api.examples.v1beta1;

import io.fabric8.istio.api.api.networking.v1alpha3.PortBuilder;
import io.fabric8.istio.api.api.networking.v1alpha3.ServerBuilder;
import io.fabric8.istio.api.api.networking.v1alpha3.ServerTLSSettingsBuilder;
import io.fabric8.istio.api.networking.v1beta1.GatewayBuilder;
import io.fabric8.istio.api.networking.v1beta1.GatewayList;
import io.fabric8.istio.api.networking.v1beta1.PortBuilder;
import io.fabric8.istio.api.networking.v1beta1.ServerBuilder;
import io.fabric8.istio.api.networking.v1beta1.ServerTLSSettingsBuilder;
import io.fabric8.istio.client.IstioClient;
import io.fabric8.kubernetes.client.KubernetesClientException;

Expand Down Expand Up @@ -49,7 +49,7 @@ public static void createResource(IstioClient client) {
.withNewSpec()
.withSelector(Collections.singletonMap("app", "my-gateway-controller"))
.withServers(new ServerBuilder()
.withPort(new PortBuilder().withNumber(80).withProtocol("HTTP").withName("http").build())
.withPort(new PortBuilder().withNumber(80L).withProtocol("HTTP").withName("http").build())
.withHosts("uk.bookinfo.com", "eu.bookinfo.com")
.withTls(new ServerTLSSettingsBuilder().withHttpsRedirect(true).build())
.build())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
*/
package io.fabric8.istio.api.examples.v1beta1;

import io.fabric8.istio.api.api.security.v1beta1.PeerAuthenticationMutualTLSBuilder;
import io.fabric8.istio.api.api.security.v1beta1.PeerAuthenticationMutualTLSMode;
import io.fabric8.istio.api.api.type.v1beta1.WorkloadSelectorBuilder;
import io.fabric8.istio.api.security.v1beta1.PeerAuthenticationBuilder;
import io.fabric8.istio.api.security.v1beta1.PeerAuthenticationList;
import io.fabric8.istio.api.security.v1beta1.PeerAuthenticationMutualTLSBuilder;
import io.fabric8.istio.api.security.v1beta1.PeerAuthenticationMutualTLSMode;
import io.fabric8.istio.api.type.v1beta1.WorkloadSelectorBuilder;
import io.fabric8.istio.client.IstioClient;
import io.fabric8.kubernetes.client.KubernetesClientException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
*/
package io.fabric8.istio.api.examples.v1beta1;

import io.fabric8.istio.api.api.networking.v1alpha3.ServiceEntryLocation;
import io.fabric8.istio.api.api.networking.v1alpha3.ServicePortBuilder;
import io.fabric8.istio.api.networking.v1beta1.ServiceEntryBuilder;
import io.fabric8.istio.api.networking.v1beta1.ServiceEntryList;
import io.fabric8.istio.api.networking.v1beta1.ServiceEntryLocation;
import io.fabric8.istio.api.networking.v1beta1.ServicePortBuilder;
import io.fabric8.istio.client.IstioClient;
import io.fabric8.kubernetes.client.KubernetesClientException;

Expand Down Expand Up @@ -46,7 +46,7 @@ public static void createResource(IstioClient client) {
.withNewSpec()
.withHosts("api.dropboxapi.com", "www.googleapis.com")
.withLocation(ServiceEntryLocation.MESH_INTERNAL)
.withPorts(new ServicePortBuilder().withName("https").withProtocol("TLS").withNumber(443).build())
.withPorts(new ServicePortBuilder().withName("https").withProtocol("TLS").withNumber(443L).build())
.endSpec()
.build());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
package io.fabric8.istio.api.examples.v1beta1;

import io.fabric8.istio.api.networking.v1beta1.IstioEgressListenerBuilder;
import io.fabric8.istio.api.api.networking.v1alpha3.IstioEgressListenerBuilder;
import io.fabric8.istio.api.networking.v1beta1.SidecarBuilder;
import io.fabric8.istio.api.networking.v1beta1.SidecarList;
import io.fabric8.istio.client.IstioClient;
Expand Down
1 change: 0 additions & 1 deletion extensions/istio/generator-v1alpha3/.gitignore

This file was deleted.

28 changes: 0 additions & 28 deletions extensions/istio/generator-v1alpha3/Makefile

This file was deleted.

Loading

0 comments on commit 292c6c8

Please sign in to comment.