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 DeleteYurthubSetting to revert #492

Merged
merged 1 commit into from
Sep 24, 2021

Conversation

adamzhoul
Copy link
Member

What type of PR is this?

/kind bug

What this PR does / why we need it:

clean all resource, when do revert

Which issue(s) this PR fixes:

Fixes #489

Special notes for your reviewer:

Does this PR introduce a user-facing change?


other Note

@openyurt-bot
Copy link
Collaborator

@adamzhoul: GitHub didn't allow me to assign the following users: your_reviewer.

Note that only openyurtio members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

What type of PR is this?

/kind bug

What this PR does / why we need it:

clean all resource, when do revert

Which issue(s) this PR fixes:

Fixes #489

Special notes for your reviewer:

Does this PR introduce a user-facing change?


other Note

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openyurt-bot openyurt-bot added the size/M size/M: 30-99 label Sep 23, 2021
@rambohe-ch
Copy link
Member

@adamzhoul Another resource named yurt-hub-cfg confgmap has been added for yurthub, how about add create/delete yurt-hub-cfg configmap for yurthub?

The definition of yurt-hub-cfg configmap is here: https://github.com/openyurtio/openyurt/blob/master/config/setup/yurthub-cfg.yaml#L42-L48

@adamzhoul
Copy link
Member Author

is this using now? I can't find any place using this yet.
besides: do you mean put clusterrolebinding 、clusterrole configs into configmap , use operator to create or delete resource?

@rambohe-ch
Copy link
Member

is this using now? I can't find any place using this yet.
besides: do you mean put clusterrolebinding 、clusterrole configs into configmap , use operator to create or delete resource?

@adamzhoul This configmap is used by yurthub. so we need to add creation of this configmap in https://github.com/openyurtio/openyurt/blob/master/pkg/yurtctl/util/kubernetes/apply_addons.go#L206-L218. not add clusterrolebinding 、clusterrole configs into configmap.

@rambohe-ch
Copy link
Member

is this using now? I can't find any place using this yet.
besides: do you mean put clusterrolebinding 、clusterrole configs into configmap , use operator to create or delete resource?

@adamzhoul yurthub list/watch this configmap at here: https://github.com/openyurtio/openyurt/blob/master/pkg/yurthub/cachemanager/cache_agent.go#L98-L105

@adamzhoul
Copy link
Member Author

now I understand.
I will put create in :

func DeployYurthubSetting(client *kubernetes.Clientset) error {
// 1. create the ClusterRole
if err := CreateClusterRoleFromYaml(client, edgenode.YurthubClusterRole); err != nil {
return err
}
// 2. create the ClusterRoleBinding
if err := CreateClusterRoleBindingFromYaml(client, edgenode.YurthubClusterRoleBinding); err != nil {
return err
}
return nil
}

and put delete in the new function DeleteYurthubSetting.

@rambohe-ch
Copy link
Member

/lgtm
/approve

@openyurt-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adamzhoul, rambohe-ch

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

@openyurt-bot openyurt-bot added the approved approved label Sep 24, 2021
@openyurt-bot openyurt-bot merged commit 4fa1d93 into openyurtio:master Sep 24, 2021
YRXING pushed a commit to YRXING/openyurt that referenced this pull request Oct 9, 2021
Co-authored-by: zhoulei5 <zhoulei5@lixiang.com>
MrGirl pushed a commit to MrGirl/openyurt that referenced this pull request Mar 29, 2022
Co-authored-by: zhoulei5 <zhoulei5@lixiang.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved approved lgtm lgtm size/M size/M: 30-99
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feature request] DeployYurthubSetting, not delete when revert
3 participants