Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
984062c
chore: set version to 5.0.0-SNAPSHOT (#2200)
csviri Jan 18, 2024
5ed04b8
improve: java version minimal 11, tested on 21 (#2207)
csviri Jan 18, 2024
bfc39cf
improve: remove deprecated EventFilter (#2208)
csviri Jan 18, 2024
5ffab28
docs: 5.0 migration guide skeleton (#2210)
csviri Jan 19, 2024
9c42b2a
improve: managed dependent reconciliation results not optional (#2212)
csviri Jan 22, 2024
4da8a06
improve: remove deprecated RetryConfiguration (#2211)
csviri Jan 22, 2024
d5f31c8
feat: JDK client is now the default (#2235)
csviri Feb 6, 2024
9ecb2e0
fix: update SCM information (#2237)
metacosm Feb 7, 2024
ddac34c
feat: move name is directly to dependent resource (#2250)
csviri Mar 4, 2024
990ae76
format
csviri Mar 7, 2024
2df90a6
fix: test after rebase on master (#2270)
csviri Mar 7, 2024
321e772
feat: use java 17 as baseline (#2271)
csviri Mar 8, 2024
9515baa
improve: matcher always considers metadata (#2273)
csviri Mar 9, 2024
eaf8d21
feat: API to check if next reconciliation is imminent (#2272)
csviri Mar 11, 2024
d3c299b
feat: Workflow extracted to a separate annotation (#2274)
csviri Mar 11, 2024
ae5f198
fix: pom properties cleanup (#2280)
csviri Mar 11, 2024
26d94a8
improve: remove EventSourceInitializer (#2257)
csviri Mar 12, 2024
841a09c
refactor: make loadFromProperties private (#2287)
metacosm Mar 13, 2024
5dd6e76
feat: distinguish resources based on desired state (#2252)
csviri Mar 13, 2024
25a6604
feat: explicit workflow invocation (#2289)
csviri Mar 18, 2024
4dbecaa
feat: use ssa for status update by default from `UpdateControl` (#2278)
metacosm Nov 5, 2024
6545826
refactor: make WorkflowSpec an interface (#2300)
metacosm Mar 20, 2024
aefec71
improve: replace current formatting plugins with spotless plugin (#2…
csviri Mar 21, 2024
2efb33d
refactor: make ManagedWorkflowSupport public to be able to reuse it (…
metacosm Mar 21, 2024
c5e65c2
fix: package fix leader election sample (#2303)
csviri Mar 24, 2024
b409b86
feat: remove resource discriminator (#2299)
csviri Mar 25, 2024
d2f8b51
refactor: remove deprecated getTerminationTimeoutSeconds and associat…
metacosm Mar 26, 2024
e0b44d0
improve: additional logging to mysql schema e2e test (#2320)
csviri Mar 27, 2024
e84be1c
feat: handle clustered resource on secondary to primary mapper init (…
metacosm Mar 27, 2024
a2b7a56
feat: using SSA for finalizer and primary patch (#2305)
csviri Apr 8, 2024
b71f679
fix: error with java docs validation (#2336)
csviri Apr 8, 2024
9de0065
chore: reformat, minor fixes
metacosm Aug 29, 2024
96f55a9
fix: remove now unneeded okhttp dependency override, wrong comment (#…
metacosm Apr 11, 2024
74e9213
feat: run spotless on compile (#2330)
metacosm Apr 12, 2024
c27e1ff
refactor: clean-up (#2325)
metacosm Apr 12, 2024
d586f84
improve: samples correctly create status object for SSA (#2365)
csviri Apr 25, 2024
fd04610
improve: named event sources and related changes (#2340)
csviri Apr 28, 2024
27be661
feat: silent exception handling in managed workflows (#2363)
csviri Apr 29, 2024
f0032d8
feat: feature flag to not clone secondary resource on access (#2364)
csviri May 2, 2024
7365fe2
fix: unit test for event processor stopping (#2373)
csviri May 2, 2024
c1d72b5
feat: all event source is resource event source (#2367)
csviri May 2, 2024
c5f8062
feat: read-only bulk dependent (#2372)
csviri May 14, 2024
b2e7cec
feat: remove automatic observed generation handling (#2382)
csviri May 14, 2024
f6eb869
docs: bulk dependent resource migration (#2383)
csviri May 15, 2024
eb4d8c4
fix: correct default secondary to primary mapper (#2386)
csviri May 15, 2024
d77e901
improve: secondaryToPrimary check type of owner reference (#2371)
csviri May 16, 2024
67f3703
improve: remove deprecated APIs (#2375)
csviri May 16, 2024
bb2fa7f
improve: ensure unique name on event sources (#2370)
csviri May 16, 2024
b4be544
docs: migrate v5 changes to docsy (#2397)
csviri May 21, 2024
745d426
docs: @Workflow usage (#2413)
csviri Jun 12, 2024
4538ddb
improve: remove ErrorStatusHandler interface (#2438)
csviri Jun 17, 2024
4ae2650
improve: dependent configuration improvements - context independent (…
csviri Jun 19, 2024
9791eb3
feat: general crd checking activation condition (#2433)
csviri Jun 19, 2024
da4e71e
improve: generics for prepare event source (#2407)
csviri Jun 19, 2024
3a5f03d
fix: improper javadoc preventing release (#2450)
metacosm Jun 20, 2024
d3cd973
docs: use docs dir instead of docsy (#2443)
csviri Jun 20, 2024
c0d1413
refactor: move getResourceClassResolver to BaseConfigurationService (…
metacosm Jun 20, 2024
fa1e6c8
feat: @ControllerConfiguration annotation is optional (#2412)
csviri Jun 21, 2024
b886d10
bump: chore use slf4j v2 (#2406)
csviri Jun 29, 2024
20e7980
feat: integration test to show multiple dependents with activation co…
csviri Jul 1, 2024
82b3c87
refactor: `updateMatcher` removal (#2431)
csviri Jul 2, 2024
4e63b38
chore(docs): add some javadoc (#2452)
metacosm Jul 3, 2024
e6fc247
fix: improper use of @link (#2464)
metacosm Jul 3, 2024
10158b9
feat: move controller informer-related configuration to InformerConfi…
metacosm Jul 8, 2024
f156754
feat: allow returning additional information from conditions (#2426)
metacosm Jul 8, 2024
270c752
feat: support for graceful shutdown based on configuration (#2479)
10000-ki Aug 6, 2024
f41f07c
refactor: move integration tests to feature packages and sub packages…
csviri Aug 8, 2024
053f15b
refactor: clean up informer configuration classes (#2470)
metacosm Aug 9, 2024
a1e6168
improve: replace jenvtest with kube-api-test from fabric8 client (#2497)
csviri Aug 15, 2024
88cdb2e
feat: config option to not exit when stops leading (#2500)
csviri Aug 19, 2024
ba68ac4
refactor: clean up ResourceConfiguration & rename to Informable (#2486)
metacosm Aug 19, 2024
e49d6a1
feat: support to handle different cluster for InformerEventSource (#2…
csviri Aug 20, 2024
5f61245
chore: update comment to reflect change in interface (#2512)
matteriben Aug 21, 2024
c134cad
fix: wrong return type
metacosm Aug 29, 2024
da84cd3
improve: cleaner throws Exception (#2527)
csviri Sep 6, 2024
a8d71f4
feat: explicit node configuration in WorkflowBuilder (#2511)
metacosm Sep 19, 2024
ae05db9
fix: cleanup after rebase on main
csviri Sep 20, 2024
f5677fe
feat: context getSecondary resource is activation condition aware (#2…
csviri Sep 23, 2024
fdc38df
feat: e2e test to demonstrate namespace deletion problem fix (#2528)
csviri Sep 23, 2024
811051e
docs: remove javadoc todos (#2541)
csviri Sep 27, 2024
706ef55
feat: print diff resource as yaml (#2542)
10000-ki Sep 30, 2024
278def8
fix: integration test timeout issue (#2547)
csviri Oct 9, 2024
9b093b6
improve: naming target resource selector method (#2546)
csviri Oct 9, 2024
d0f1be5
feat: improve diff logging (#2544)
bachmanity1 Oct 10, 2024
5f6620d
fix: race condition in workflow reconciler (#2549)
metacosm Oct 10, 2024
c566c3c
feat(ci): split integration tests execution by category (#2548)
metacosm Oct 17, 2024
379de6d
refactor: rename method more appropriately (#2554)
metacosm Oct 17, 2024
e13cce6
improve: workflow builder naming (#2559)
csviri Oct 26, 2024
b9481fe
chore: adapt after rebase
metacosm Nov 5, 2024
0efc6d3
fix: infinite resource updates due to canonical format conversion of …
Donnerbart Nov 6, 2024
998c8f4
refactor: remove now unneeded NameSetter interface
metacosm Oct 15, 2024
c2f4efc
refactor: simplify workflow handling
metacosm Oct 16, 2024
15ec65b
refactor: initial work to combine ManagedWorkflow and regular one
metacosm Oct 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
49 changes: 49 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Build

env:
MAVEN_ARGS: -V -ntp -e

on:
workflow_call:

jobs:
integration_tests:
strategy:
matrix:
java: [ 17, 21 ]
kubernetes: [ 'v1.28.14', 'v1.29.9','1.30.5', '1.31.1' ]
it-category: [ 'baseapi', 'dependent', 'workflow' ]
uses: ./.github/workflows/integration-tests.yml
with:
java-version: ${{ matrix.java }}
kube-version: ${{ matrix.kubernetes }}
it-category: ${{ matrix.it-category }}

http_client_tests:
strategy:
matrix:
java: [ 17, 21 ]
kubernetes: [ 'v1.28.14', 'v1.29.9','1.30.5', '1.31.1' ]
it-category: [ 'baseapi' ]
httpclient: [ 'vertx', 'jdk', 'jetty' ]
uses: ./.github/workflows/integration-tests.yml
with:
java-version: ${{ matrix.java }}
kube-version: ${{ matrix.kubernetes }}
it-category: ${{ matrix.it-category }}
http-client: ${{ matrix.httpclient }}

special_integration_tests:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 17, 21 ]
steps:
- uses: actions/checkout@v4
- name: Set up Java and Maven
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ matrix.java }}
- name: Run Special Integration Tests
run: ./mvnw ${MAVEN_ARGS} -B package -P minimal-watch-timeout-dependent-it --file pom.xml
8 changes: 3 additions & 5 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
sample_operators_tests:
strategy:
matrix:
sample_dir:
sample:
- "sample-operators/mysql-schema"
- "sample-operators/tomcat-operator"
- "sample-operators/webpage"
Expand Down Expand Up @@ -48,12 +48,10 @@ jobs:
run: mvn install -DskipTests

- name: Run integration tests in local mode
working-directory: ${{ matrix.sample_dir }}
run: |
mvn test -P end-to-end-tests
mvn test -P end-to-end-tests -pl ${{ matrix.sample }}

- name: Run E2E tests as a deployment
working-directory: ${{ matrix.sample_dir }}
run: |
eval $(minikube -p minikube docker-env)
mvn jib:dockerBuild test -P end-to-end-tests -Dtest.deployment=remote
mvn jib:dockerBuild test -P end-to-end-tests -Dtest.deployment=remote -pl ${{ matrix.sample }}
42 changes: 2 additions & 40 deletions .github/workflows/fabric8-next-version-schedule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,46 +23,8 @@ jobs:
with:
distribution: temurin
java-version: 17
cache: 'maven'
- name: Run unit tests
run: ./mvnw ${MAVEN_ARGS} clean install --file pom.xml

integration_tests:
strategy:
matrix:
java: [ 11, 17 ]
kubernetes: ['v1.28.12', 'v1.29.7','1.30.3', '1.31.0']
uses: ./.github/workflows/integration-tests.yml
with:
java-version: ${{ matrix.java }}
kube-version: ${{ matrix.kubernetes }}

httpclient-tests:
strategy:
matrix:
httpclient: [ 'vertx', 'jdk', 'jetty' ]
uses: ./.github/workflows/integration-tests.yml
with:
java-version: 17
kube-version: 'v1.29.1'
http-client: ${{ matrix.httpclient }}
experimental: true
checkout-ref: 'fabric8-next-version'

special_integration_tests:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 11, 17 ]
steps:
- uses: actions/checkout@v4
with:
ref: 'fabric8-next-version'
- name: Set up Java and Maven
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ matrix.java }}
cache: 'maven'
- name: Run Special Integration Tests
run: ./mvnw ${MAVEN_ARGS} -B package -P minimal-watch-timeout-dependent-it --file pom.xml
build:
uses: ./.github/workflows/build.yml
6 changes: 3 additions & 3 deletions .github/workflows/hugo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
id: pages
uses: actions/configure-pages@v5
- name: Install Node.js dependencies
working-directory: ./docsy
working-directory: ./docs
run: |
[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true
npm install -D autoprefixer
Expand All @@ -61,7 +61,7 @@ jobs:
HUGO_ENVIRONMENT: production
HUGO_ENV: production
TZ: America/Los_Angeles
working-directory: ./docsy
working-directory: ./docs
run: |
hugo \
--gc \
Expand All @@ -70,7 +70,7 @@ jobs:
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./docsy/public
path: ./docs/public

# Deployment job
deploy:
Expand Down
22 changes: 17 additions & 5 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
http-client:
type: string
required: false
default: 'okhttp'
default: 'vertx'
experimental:
type: boolean
required: false
Expand All @@ -21,6 +21,10 @@ on:
type: string
required: false
default: ''
it-category:
type: string
required: false
default: ''

jobs:
integration_tests:
Expand All @@ -42,9 +46,17 @@ jobs:
- name: Set up Minikube
uses: manusa/[email protected]
with:
minikube version: v1.33.0
kubernetes version: ${{ inputs.kube-version }}
minikube version: 'v1.33.0'
kubernetes version: '${{ inputs.kube-version }}'
driver: 'docker'
github token: ${{ secrets.GITHUB_TOKEN }}
- name: Run integration tests
run: ./mvnw ${MAVEN_ARGS} -B package -P no-unit-tests -Dfabric8-httpclient-impl.name=${{inputs.http-client}} --file pom.xml
- name: "${{inputs.it-category}} integration tests (kube: ${{ inputs.kube-version }} / java: ${{ inputs.java-version }} / client: ${{ inputs.http-client }})"
run: |
if [ -z "${{inputs.it-category}}" ]; then
it_profile="integration-tests"
else
it_profile="integration-tests-${{inputs.it-category}}"
fi
echo "Using profile: ${it_profile}"
./mvnw ${MAVEN_ARGS} -T1C -B install -DskipTests -Pno-apt --file pom.xml
./mvnw ${MAVEN_ARGS} -T1C -B package -P${it_profile} -Dfabric8-httpclient-impl.name=${{inputs.http-client}} --file pom.xml
43 changes: 4 additions & 39 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,44 +26,9 @@ jobs:
cache: 'maven'
- name: Check code format
run: |
./mvnw ${MAVEN_ARGS} formatter:validate -Dconfigfile=$PWD/contributing/eclipse-google-style.xml -pl '!operator-framework-bom' --file pom.xml
./mvnw ${MAVEN_ARGS} impsort:check -pl '!operator-framework-bom' --file pom.xml
./mvnw ${MAVEN_ARGS} spotless:check --file pom.xml
- name: Run unit tests
run: ./mvnw ${MAVEN_ARGS} clean install --file pom.xml
run: ./mvnw ${MAVEN_ARGS} clean install -Pno-apt --file pom.xml

integration_tests:
strategy:
matrix:
java: [ 11, 17 ]
kubernetes: [ 'v1.28.12', 'v1.29.7','1.30.3', '1.31.0' ]
uses: ./.github/workflows/integration-tests.yml
with:
java-version: ${{ matrix.java }}
kube-version: ${{ matrix.kubernetes }}

httpclient-tests:
strategy:
matrix:
httpclient: [ 'vertx', 'jdk', 'jetty' ]
uses: ./.github/workflows/integration-tests.yml
with:
java-version: 17
kube-version: 'v1.29.1'
http-client: ${{ matrix.httpclient }}
experimental: true

special_integration_tests:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 11, 17 ]
steps:
- uses: actions/checkout@v4
- name: Set up Java and Maven
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ matrix.java }}
cache: 'maven'
- name: Run Special Integration Tests
run: ./mvnw ${MAVEN_ARGS} -B package -P minimal-watch-timeout-dependent-it --file pom.xml
build:
uses: ./.github/workflows/build.yml
4 changes: 2 additions & 2 deletions .github/workflows/release-project-in-dir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Set up Java and Maven
uses: actions/setup-java@v4
with:
java-version: 11
java-version: 17
distribution: temurin
cache: 'maven'

Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
- name: Set up Java and Maven
uses: actions/setup-java@v4
with:
java-version: 11
java-version: 17
distribution: temurin
cache: 'maven'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/snapshot-releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
java-version: 17
cache: 'maven'
- name: Build and test project
run: ./mvnw ${MAVEN_ARGS} clean install --file pom.xml
Expand All @@ -34,7 +34,7 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
java-version: 17
cache: 'maven'
- name: Release Maven package
uses: samuelmeuli/action-maven-publish@v1
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ![java-operator-sdk](docsy/static/images/full_logo.png)
# ![java-operator-sdk](docs/static/images/full_logo.png)

![Java CI with Maven](https://github.com/operator-framework/java-operator-sdk/actions/workflows/snapshot-releases.yml/badge.svg)
[![Slack](https://img.shields.io/badge/Slack-4A154B?style=flat-square&logo=slack&logoColor=white)](https://kubernetes.slack.com/archives/CAW0GV7A5 "get invite here: https://communityinviter.com/apps/kubernetes/community" )
Expand Down Expand Up @@ -40,7 +40,6 @@ It makes it easy to implement best practices and patterns for an Operator. Featu
* Handling dependent resources, related events, and caching.
* Automatic Retries
* Smart event scheduling
* Handling Observed Generations automatically
* Easy to use Error Handling
* ... and everything that a batteries included framework needs

Expand Down
56 changes: 28 additions & 28 deletions bootstrapper-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<artifactId>java-operator-sdk</artifactId>
<groupId>io.javaoperatorsdk</groupId>
<version>4.9.6-SNAPSHOT</version>
<artifactId>java-operator-sdk</artifactId>
<version>5.0.0-SNAPSHOT</version>
</parent>

<artifactId>bootstrapper</artifactId>
Expand Down Expand Up @@ -39,7 +39,7 @@
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<artifactId>log4j-slf4j2-impl</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -72,29 +72,29 @@
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>${maven-plugin-plugin.version}</version>
<configuration>
<goalPrefix>josdk-bootstrapper</goalPrefix>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>templating-maven-plugin</artifactId>
<version>${templating-maven-plugin.version}</version>
<executions>
<execution>
<id>filtering-java-templates</id>
<goals>
<goal>filter-sources</goal>
</goals>
</execution>
</executions>
</plugin>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>${maven-plugin-plugin.version}</version>
<configuration>
<goalPrefix>josdk-bootstrapper</goalPrefix>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>templating-maven-plugin</artifactId>
<version>${templating-maven-plugin.version}</version>
<executions>
<execution>
<id>filtering-java-templates</id>
<goals>
<goal>filter-sources</goal>
</goals>
</execution>
</executions>
</plugin>

</plugins>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class Bootstrapper {

private static final Logger log = LoggerFactory.getLogger(Bootstrapper.class);

private MustacheFactory mustacheFactory = new DefaultMustacheFactory();
private final MustacheFactory mustacheFactory = new DefaultMustacheFactory();

// .gitignore gets excluded from resource, using here a prefixed version
private static final Map<String, String> TOP_LEVEL_STATIC_FILES =
Expand Down
Loading
Loading