Skip to content

Updates readme to be in sync with java-operator-plugins repo #4

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
Apr 29, 2021
Merged
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
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<img src="https://raw.githubusercontent.com/operator-framework/operator-sdk/master/website/static/operator_logo_sdk_color.svg" height="125px"></img>

# Java Operator SDK
# Java Operator Plugin

## Overview

Expand All @@ -25,10 +25,10 @@ Operator SDK is under Apache 2.0 license. See the [LICENSE][license_file] file f
[of-blog]: https://coreos.com/blog/introducing-operator-framework
[operator-link]: https://coreos.com/operators/

# Enable kubebuilder-plugin for operator-sdk
## Enable java-operator-plugins for operator-sdk


To use kubebuilder-plugin for java operators we need to clone the operator-sdk repo.
To use java-operator-plugins for java operators we need to clone the operator-sdk repo.

### Updates in Operator-SDK go.mod

Expand All @@ -38,36 +38,36 @@ To use kubebuilder-plugin for java operators we need to clone the operator-sdk r
github.com/operator-framework/java-operator-plugins v0.0.0-20210225171707-e42ea87455e3
```

- Replace the kubebuilder-plugin path in go-mod pointing to the local dir of your kube-builder repo. Example.
- Replace the java-operator-plugins path in go-mod pointing to the local dir of your kube-builder repo. Example.

```
github.com/operator-framework/java-operator-plugins => /Users/sushah/go/src/github.com/sujil02/kubebuilder-plugin
github.com/operator-framework/java-operator-plugins => /Users/sushah/go/src/github.com/sujil02/java-operator-plugins
```

### Updates in Operator-SDK `internal/cmd/operator-sdk/cli/cli.go`

- Add the java-operator-sdk import

```
javav1 "github.com/operator-framework/java-operator-plugins/pkg/quarkus/v1"
quarkusv1 "github.com/operator-framework/java-operator-plugins/pkg/quarkus/v1"
```

- Introduce the java bundle in `GetPluginsCLIAndRoot()` method.
```
javaBundle, _ := plugin.NewBundle("quarkus"+plugins.DefaultNameQualifier, plugin.Version{Number: 1},
&javav1.Plugin{},
quarkusBundle, _ := plugin.NewBundle("quarkus"+plugins.DefaultNameQualifier, plugin.Version{Number: 1},
&quarkusv1.Plugin{},
)
```

- Add the created javaBundle to the `cli.New`
- Add the created quarkusBundle to the `cli.New`

```
cli.WithPlugins(
ansibleBundle,
gov2Bundle,
gov3Bundle,
helmBundle,
javaBundle,
quarkusBundle,
),
```

Expand Down