Skip to content
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 two examples for karmada deploy workloads #3

Merged
merged 1 commit into from
Apr 17, 2023

Conversation

JadeFlute0127
Copy link
Contributor

Signed-off-by: [JadeFlute0127] [1635468471@qq.com]

What this PR does / why we need it:
add two examples for karmada deploy workloads

Which issue(s) this PR fixes:
Part of #1

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

@karmada-bot karmada-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Apr 10, 2023
Copy link
Member

@jwcesign jwcesign left a comment

Choose a reason for hiding this comment

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

Could you please provide the link to the example here?

@@ -0,0 +1,3 @@
**Summary**

In this scenario, we will learn how to deploy workloads across multiple clusters. More specifically, use propagationPolicy and staticWeight to divide nginx deployment.
Copy link
Member

Choose a reason for hiding this comment

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

How about the following description:

In this scenario, we'll learn how to deploy workloads across multiple clusters using PropagationPolicy with StaticWeight configuration to divide the nginx deployment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yours description better

@@ -0,0 +1,156 @@
#!/usr/bin/env bash

set -o errexit
Copy link
Member

Choose a reason for hiding this comment

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

I prefer to give the directory name karmada-division-deploy-example.

@@ -0,0 +1,3 @@
**Summary**

In this scenario, we learned how to deploy workloads across multiple clusters. More specifically, use the propagationPolicy and duplicate modes to deploy nginx.
Copy link
Member

Choose a reason for hiding this comment

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

same with before

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@@ -0,0 +1,147 @@
#!/usr/bin/env bash

set -o errexit
Copy link
Member

Choose a reason for hiding this comment

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

I prefer to give the directory name karmada-duplicate-deploy-example

},
{
"title": "Create propagationPolicy and deploy pods",
"text": "step3/text.md",
Copy link
Member

Choose a reason for hiding this comment

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

Create propagationPolicy and deploy deployment

```
2. Check whether the member cluster has been joined

RUN `kubectl --kubeconfig /etc/karmada/karmada-apiserver.config get cluster`{{exec}}
Copy link
Member

@jwcesign jwcesign Apr 11, 2023

Choose a reason for hiding this comment

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

How about adding a note here (because it may make users confused why checking failed):

PS: Initializing the testing environment may take a few minutes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fix


create deployment named nginx

RUN `kubectl --kubeconfig /etc/karmada/karmada-apiserver.config create -f ~/nginx/nginxDeployment.yaml`{{exec}}
Copy link
Member

Choose a reason for hiding this comment

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

apply is a better choice, it could be applied multiple times without error:
kubectl --kubeconfig /etc/karmada/karmada-apiserver.config apply -f ~/nginx/nginxDeployment.yaml

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fix

@@ -0,0 +1,3 @@
#!/bin/bash

kubectl --kubeconfig /etc/karmada/karmada-apiserver.config get deployment
Copy link
Member

Choose a reason for hiding this comment

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

Verification can be passed even if the deployment has not been created yet.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

kubectl --kubeconfig /etc/karmada/karmada-apiserver.config get deployment nginx

Copy link
Member

@jwcesign jwcesign left a comment

Choose a reason for hiding this comment

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

The other looks good to me.

@@ -0,0 +1,3 @@
**Summary**

In this scenario, we'll learn how to deploy workloads across multiple clusters using PropagationPolicy with StaticWeight configuration to divide the nginx deployment.
Copy link
Member

Choose a reason for hiding this comment

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

In this scenario, we learned how xxxx

@@ -0,0 +1,3 @@
**Summary**

In this scenario, we'll learn how to deploy workloads across multiple clusters using PropagationPolicy to duplicate the nginx deployment.
Copy link
Member

Choose a reason for hiding this comment

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

same with before

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fix

@jwcesign
Copy link
Member

@jwcesign
Copy link
Member

/lgtm

@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label Apr 11, 2023
Copy link
Member

@RainbowMango RainbowMango left a comment

Choose a reason for hiding this comment

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

/assign
I will add it to my queue and will try to review it by the end of this week.

@@ -0,0 +1,36 @@
{
"title": "deploy workload through karmada duplicated type",
Copy link
Member

Choose a reason for hiding this comment

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

The title is based on technology, perhaps it would be better to use a description that reflects value.

Such as

HA workload deployment

@@ -0,0 +1,36 @@
{
"title": "deploy workload through karmada divided type",
Copy link
Member

Choose a reason for hiding this comment

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

Same as the other sceanrio. People might not interested in the propagation mode is divided or duplicated.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The title field will be in the Killercoda sceanrio name. If the previous one is called HA workload deployment, then this one should be different from the previous one's name

@karmada-bot karmada-bot removed the lgtm Indicates that a PR is ready to be merged. label Apr 13, 2023
Signed-off-by: zhangdiandian <1635468471@qq.com>
@JadeFlute0127
Copy link
Contributor Author

I think an effect similar to the following can better distinguish between two scenarios
image

@jwcesign
Copy link
Member

I think an effect similar to the following can better distinguish between two scenarios

I think this description is ok.
cc @RainbowMango for checking

Copy link
Member

@RainbowMango RainbowMango left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label Apr 17, 2023
@karmada-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: RainbowMango

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@karmada-bot karmada-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 17, 2023
@karmada-bot karmada-bot merged commit bad15aa into karmada-io:main Apr 17, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants