Skip to content

Add three-tier demo SP and Kind run docs#29

Merged
gciavarrini merged 4 commits into
dcm-project:mainfrom
gciavarrini:add-three-tier-app
Apr 21, 2026
Merged

Add three-tier demo SP and Kind run docs#29
gciavarrini merged 4 commits into
dcm-project:mainfrom
gciavarrini:add-three-tier-app

Conversation

@gciavarrini
Copy link
Copy Markdown
Contributor

Adds the three-tier demo service provider to the Compose and documents how to run it in a Kind cluster.

Based on @ebichman-1 work in #26 — thanks for the initial push.

Copy link
Copy Markdown
Contributor

@ygalblum ygalblum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General comment, should we use the CLI instead of curl calls? Again, not a must

Comment thread .env.example Outdated
# K8S_CONTAINER_SP_EXTERNAL_SVC_TYPE=NodePort

# Three-tier demo app service provider (profile: three-tier)
# Kubeconfig: use K8S_CONTAINER_SP_KUBECONFIG.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

THREE_TIER_SP_NAMESPACE should follow the same as it must be the same

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, See 19e9b67

Comment thread RUN.md Outdated

```bash
export THREE_TIER_SP_NAME=my-provider
export THREE_TIER_SP_NAMESPACE=default
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned in .env.example the namespace must match the one used for the container service

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See 19e9b67

Comment thread docs/three-tier-app-kind.md Outdated
"policy_type": "GLOBAL",
"enabled": true,
"priority": 100,
"rego_code": "package policies.three_tier_default\n\nmain := {\n \"rejected\": false,\n \"selected_provider\": \"three-tier-provider\"\n}\n"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a must, but maybe check the payload to see that it points to the pet-clinic catalog item (in it's catalog_item_id field). This will allow using this policy also when other policies are used for other service types

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You right, see line 85 and line 148

@gciavarrini
Copy link
Copy Markdown
Contributor Author

General comment, should we use the CLI instead of curl calls? Again, not a must

That's a nice idea, I added instruction for using the CLI too. See line 64-132

I think the curl commands may be useful for inspecting issue or developement, we can remove that section in a follow up PR if needed. Does it make sense?

@gciavarrini gciavarrini requested a review from ygalblum April 21, 2026 09:36
Comment thread docs/three-tier-app-kind.md
@gciavarrini
Copy link
Copy Markdown
Contributor Author

FYI @ygalblum and @machacekondra I know there are conflicts, once the PR is approved I'll take care of them :)

Copy link
Copy Markdown
Contributor

@ygalblum ygalblum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small nit. Not blocking


```bash
curl -s http://localhost:9080/api/v1alpha1/health/providers | jq .
curl -s http://localhost:9080/api/v1alpha1/providers | jq '.providers[] | {name, health_status}'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use the CLI for this one as well

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ops i missed that! Updated here feaa688

Create the three-tier-sp database in init SQL and register the
three-tier-demo-service-provider in compose.

Assisted-by: Claude (Anthropic)
Signed-off-by: Gloria Ciavarrini <gciavarrini@redhat.com>
Assisted-by: Claude (Anthropic)
Signed-off-by: Gloria Ciavarrini <gciavarrini@redhat.com>
Assisted-by: Claude (Anthropic)
Signed-off-by: Gloria Ciavarrini <gciavarrini@redhat.com>
Assisted-by: Claude (Anthropic)
Signed-off-by: Gloria Ciavarrini <gciavarrini@redhat.com>
@gciavarrini gciavarrini merged commit 95db424 into dcm-project:main Apr 21, 2026
3 checks passed
@gciavarrini gciavarrini deleted the add-three-tier-app branch April 21, 2026 14:11
@machacekondra
Copy link
Copy Markdown
Contributor

General comment, should we use the CLI instead of curl calls? Again, not a must

How would then users enjoy our amazing feature AEP? :))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants