Skip to content

chore(deps): update to use Quarkus JOSDK extension 3.0.1 #67

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,37 +48,28 @@ func (f *Controller) SetTemplateDefaults() error {
return nil
}

// TODO: pass in the name of the operator i.e. replace Memcached
const controllerTemplate = `package {{ .Package }};

import io.fabric8.kubernetes.client.KubernetesClient;
import io.javaoperatorsdk.operator.api.*;
import io.javaoperatorsdk.operator.api.Context;
import io.javaoperatorsdk.operator.processing.event.EventSourceManager;
import io.javaoperatorsdk.operator.api.reconciler.Context;
import io.javaoperatorsdk.operator.api.reconciler.Reconciler;
import io.javaoperatorsdk.operator.api.reconciler.UpdateControl;

@Controller
public class {{ .ClassName }}Controller implements ResourceController<{{ .ClassName }}> {
public class {{ .ClassName }}Reconciler implements Reconciler<{{ .ClassName }}> {
private final KubernetesClient client;

private final KubernetesClient client;
public {{ .ClassName }}Reconciler(KubernetesClient client) {
this.client = client;
}

public {{ .ClassName }}Controller(KubernetesClient client) {
this.client = client;
}
// TODO Fill in the rest of the reconciler

// TODO Fill in the rest of the controller
@Override
public UpdateControl<{{ .ClassName }}> reconcile({{ .ClassName }} resource, Context context) {
// TODO: fill in logic

@Override
public void init(EventSourceManager eventSourceManager) {
// TODO: fill in init
}

@Override
public UpdateControl<{{ .ClassName }}> createOrUpdateResource(
{{ .ClassName }} resource, Context<{{ .ClassName }}> context) {
// TODO: fill in logic

return UpdateControl.noUpdate();
}
return UpdateControl.noUpdate();
}
}

`
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ func (f *Model) SetTemplateDefaults() error {
return nil
}

// TODO: pass in the name of the operator i.e. replace Memcached
const modelTemplate = `package {{ .Package }};

{{if .Resource.API.Namespaced}}import io.fabric8.kubernetes.api.model.Namespaced;{{end}}
Expand Down
18 changes: 5 additions & 13 deletions pkg/quarkus/v1alpha/scaffolds/internal/templates/pomxml.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,24 +57,16 @@ const pomxmlTemplate = `<?xml version="1.0" encoding="UTF-8"?>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<fabric8-client.version>5.8.0</fabric8-client.version>
<quarkus-sdk.version>2.0.0</quarkus-sdk.version>
<quarkus.version>2.4.0.Final</quarkus.version>
<quarkus-sdk.version>3.0.1</quarkus-sdk.version>
<quarkus.version>2.6.2.Final</quarkus.version>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-client-bom</artifactId>
<version>${fabric8-client.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-bom</artifactId>
<version>${quarkus.version}</version>
<groupId>io.quarkiverse.operatorsdk</groupId>
<artifactId>quarkus-operator-sdk-bom</artifactId>
<version>${quarkus-sdk.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down