-
Notifications
You must be signed in to change notification settings - Fork 13
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
Add Flow CR documentation #252
Open
SeriyBg
wants to merge
4
commits into
main
Choose a base branch
from
flow-docs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+107
−0
Open
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
apiVersion: hazelcast.com/v1alpha1 | ||
kind: Flow | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: hazelcast-platform-operator | ||
name: flow | ||
spec: | ||
size: 3 | ||
licenseKeySecretName: hazelcast-license-key | ||
externalConnectivity: | ||
ingress: | ||
hostname: "" | ||
ingressClassName: nginx | ||
path: "/" | ||
annotations: | ||
kubernetes.io/ingress.class: "nginx" | ||
nginx.ingress.kubernetes.io/ssl-redirect: "false" | ||
nginx.ingress.kubernetes.io/enable-opentelemetry: "true" | ||
database: | ||
host: "flow-database" | ||
secretName: flow-db-secret | ||
env: | ||
- name: OPTIONS | ||
value: | | ||
--flow.analytics.persistRemoteCallResponses=true | ||
--flow.stream-server.enabled=false | ||
--flow.analytics.persistResults=false | ||
--flow.toggles.dashboard-enabled=true | ||
--flow.config.custom.managementCenterUrl=http://233.252.0.158/mc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
= Deploy Flow | ||
|
||
:description: In this tutorial, you'll deploy a Flow application using Hazelcast Platform Operator for Kubernetes. | ||
|
||
{description} | ||
|
||
== Prerequisites | ||
|
||
- Flow requires the Management Center application to run and be configured properly. The Management Center application should be configured to use FLow. | ||
|
||
[source,yaml] | ||
---- | ||
... | ||
hazelcastClusters: | ||
- address: flow <1> | ||
name: flow <2> | ||
jvm: | ||
args: | ||
- "-Dhazelcast.mc.flow.addresses=http://233.252.0.158/" <3> | ||
- "-Dhazelcast.mc.internal.flowAddresses=http://flow:9021" <4> | ||
... | ||
---- | ||
|
||
<1> The service name of the Flow application. The same as the Flow CR name. | ||
SeriyBg marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<2> Hazelcast cluster name. Should always be `flow`. | ||
<3> Flow Ingress public address. | ||
<4> The internal address of Flow in the format of `http://<service-name>:9021`. The service name is the same as the Flow CR name. | ||
|
||
- To connect to the database you need create a `Secret` with the DB credentials: | ||
|
||
[source,shell] | ||
---- | ||
kubectl create secret generic flow-db-secret \ | ||
--from-literal=database=flow \ | ||
--from-literal=username=flow \ | ||
--from-literal=password="strong-password" | ||
---- | ||
|
||
In the created secret `username` and `password` are required, whereas `database` field is optional and will default to `flow` if not provided. | ||
|
||
== Run Flow | ||
|
||
To run Flow on Kubernetes using Hazelcast Platform Operator you need to create a Flow CR. | ||
|
||
[source,yaml,subs="attributes+"] | ||
---- | ||
include::ROOT:example$/flow.yaml[] | ||
---- | ||
|
||
Additional flow configuration can be accheived by providing additional parameters via `OPTIONS` environment variable. | ||
SeriyBg marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
NOTE: Parameters managed by the Hazelcat Platform Operator are not allowed in the `OPTIONS`. E.g., the Database configuration can only be done via `spec.database` in the Flow CR. | ||
SeriyBg marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
=== Configure OpenID support | ||
|
||
You can enable OpenID support with Management Center deployment on Flow. In order to configure OpenID, you need to provide the required parameters to the `OPTIONS` environment variable: | ||
SeriyBg marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
[source,yaml] | ||
---- | ||
... | ||
- name: OPTIONS | ||
value: | | ||
--flow.security.openIdp.enabled=true | ||
--flow.security.openIdp.jwks-uri=http://233.252.0.158/mc/oauth2/jwks | ||
--flow.security.openIdp.issuerUrl=http://233.252.0.158/mc | ||
--flow.security.openIdp.clientId=flow-client | ||
--flow.security.openIdp.require-https=false | ||
--flow.security.open-idp.roles.format=path | ||
--flow.security.open-idp.roles.path=roles | ||
--flow.security.open-idp.refreshTokensDisabled=true | ||
... | ||
---- |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please mention FLOW MC image should be used here -->
docker.io/hazelcast/management-center-flow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added it to the example config with the following description