1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 21:46:22 +01:00
Files
openshift-docs/operators/operator_sdk/java/osdk-java-tutorial.adoc

63 lines
3.3 KiB
Plaintext
Raw Normal View History

:_content-type: ASSEMBLY
[id="osdk-java-tutorial"]
= Operator SDK tutorial for Java-based Operators
include::_attributes/common-attributes.adoc[]
:context: osdk-java-tutorial
:FeatureName: Java-based Operator SDK
include::snippets/technology-preview.adoc[]
toc::[]
Operator developers can take advantage of Java programming language support in the Operator SDK to build an example Java-based Operator for Memcached, a distributed key-value store, and manage its lifecycle.
This process is accomplished using two centerpieces of the Operator Framework:
Operator SDK:: The `operator-sdk` CLI tool and `java-operator-sdk` library API
Operator Lifecycle Manager (OLM):: Installation, upgrade, and role-based access control (RBAC) of Operators on a cluster
[NOTE]
====
This tutorial goes into greater detail than xref:../../../operators/operator_sdk/java/osdk-java-quickstart.adoc#osdk-java-quickstart[Getting started with Operator SDK for Java-based Operators].
====
include::modules/osdk-common-prereqs.adoc[leveloffset=+1]
[role="_additional-resources"]
.Additional resources
* xref:../../../operators/operator_sdk/osdk-installing-cli.adoc#osdk-installing-cli[Installing the Operator SDK CLI]
* xref:../../../cli_reference/openshift_cli/getting-started-cli.adoc#getting-started-cli[Getting started with the OpenShift CLI]
include::modules/osdk-create-project.adoc[leveloffset=+1]
include::modules/osdk-project-file.adoc[leveloffset=+2]
include::modules/osdk-java-create-api-controller.adoc[leveloffset=+1]
include::modules/osdk-java-define-api.adoc[leveloffset=+2]
include::modules/osdk-java-generate-crd.adoc[leveloffset=+2]
include::modules/osdk-java-create-cr.adoc[leveloffset=+2]
include::modules/osdk-java-implement-controller.adoc[leveloffset=+1]
The next subsections explain how the controller in the example implementation watches resources and how the reconcile loop is triggered. You can skip these subsections to go directly to xref:../../../operators/operator_sdk/java/osdk-java-tutorial.adoc#osdk-run-operator_osdk-java-tutorial[Running the Operator].
include::modules/osdk-java-controller-reconcile-loop.adoc[leveloffset=+2]
include::modules/osdk-java-controller-labels-memcached.adoc[leveloffset=+2]
include::modules/osdk-java-controller-memcached-deployment.adoc[leveloffset=+2]
include::modules/osdk-run-operator.adoc[leveloffset=+1]
include::modules/osdk-run-locally.adoc[leveloffset=+2]
include::modules/osdk-run-deployment.adoc[leveloffset=+2]
[id="osdk-bundle-deploy-olm_{context}"]
=== Bundling an Operator and deploying with Operator Lifecycle Manager
include::modules/osdk-bundle-operator.adoc[leveloffset=+3]
include::modules/osdk-deploy-olm.adoc[leveloffset=+3]
[role="_additional-resources"]
[id="additional-resources_osdk-java-tutorial"]
== Additional resources
* See xref:../../../operators/operator_sdk/java/osdk-java-project-layout.adoc#osdk-java-project-layout[Project layout for Java-based Operators] to learn about the directory structures created by the Operator SDK.
* If a xref:../../../networking/enable-cluster-wide-proxy.adoc#enable-cluster-wide-proxy[cluster-wide egress proxy is configured], cluster administrators can xref:../../../operators/admin/olm-configuring-proxy-support.adoc#olm-configuring-proxy-support[override the proxy settings or inject a custom CA certificate] for specific Operators running on Operator Lifecycle Manager (OLM).